-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from PerfectThymeTech/marvinbuss/fabcric_works…
…pace_test Add Fabric Workspace Test with Capacity
- Loading branch information
Showing
14 changed files
with
186 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
locals { | ||
fabric_capity_ids = [ | ||
for value in data.fabric_capacities.capacities.values : | ||
value.id if value.display_name == one(data.azapi_resource.fabric_capacity[*].name) && value.region == one(data.azapi_resource.fabric_capacity[*].location) && value.sku == one(data.azapi_resource.fabric_capacity[*].sku) | ||
] | ||
fabric_capity_id = length(local.fabric_capity_ids) > 0 ? local.fabric_capity_ids[0] : null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
locals { | ||
prefix = "${lower(var.prefix)}-${var.environment}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module "fabric_capacity" { | ||
source = "github.com/PerfectThymeTech/terraform-azurerm-modules//modules/fabriccapacity?ref=main" | ||
providers = { | ||
azurerm = azurerm | ||
azapi = azapi | ||
} | ||
|
||
location = var.location | ||
resource_group_name = var.resource_group_name | ||
tags = var.tags | ||
fabric_capacity_name = replace("${local.prefix}-cpcty001", "-", "") | ||
fabric_capacity_admin_emails = [] | ||
fabric_capacity_sku = "F2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
output "fabric_capacity_id" { | ||
description = "Specifies the id of the fabric capacity." | ||
value = module.fabric_capacity.fabric_capacity_id | ||
sensitive = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
terraform { | ||
required_version = ">=0.13" | ||
|
||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = ">= 4.0.0" | ||
} | ||
azapi = { | ||
source = "Azure/azapi" | ||
version = ">= 1.14.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# General variables | ||
variable "location" { | ||
description = "Specifies the location of all resources." | ||
type = string | ||
sensitive = false | ||
} | ||
|
||
variable "environment" { | ||
description = "Specifies the environment of the deployment." | ||
type = string | ||
sensitive = false | ||
default = "dev" | ||
validation { | ||
condition = contains(["int", "dev", "tst", "qa", "prd"], var.environment) | ||
error_message = "Please use an allowed value: \"int\", \"dev\", \"tst\", \"qa\" or \"prd\"." | ||
} | ||
} | ||
|
||
variable "prefix" { | ||
description = "Specifies the prefix for all resources created in this deployment." | ||
type = string | ||
sensitive = false | ||
validation { | ||
condition = length(var.prefix) >= 2 && length(var.prefix) <= 10 | ||
error_message = "Please specify a prefix with more than two and less than 10 characters." | ||
} | ||
} | ||
|
||
variable "resource_group_name" { | ||
description = "Specifies the resource group name in which all resources will get deployed." | ||
type = string | ||
sensitive = false | ||
nullable = false | ||
validation { | ||
condition = length(var.resource_group_name) >= 2 | ||
error_message = "Please specify a valid resource group name." | ||
} | ||
} | ||
|
||
variable "tags" { | ||
description = "Specifies a key value map of tags to set on every taggable resources." | ||
type = map(string) | ||
sensitive = false | ||
default = {} | ||
} | ||
|
||
# Service variables | ||
|
||
# Network variables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters