diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/main.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/main.tf index 39959e882..23c4b2a60 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/main.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/main.tf @@ -59,7 +59,7 @@ module "fabric_capacity" { source = "./modules/fabric/capacity" create_fabric_capacity = var.create_fabric_capacity capacity_name = local.fabric_capacity_name - resource_group_id = data.azurerm_resource_group.rg.id + resource_group_name = data.azurerm_resource_group.rg.name location = data.azurerm_resource_group.rg.location admin_members = local.fabric_capacity_admins sku = "F2" diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/adls/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/adls/versions.tf index 7d0da5fcd..6fab3ada5 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/adls/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/adls/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.9.0" + version = "4.14.0" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/appinsights/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/appinsights/versions.tf index 7d0da5fcd..6fab3ada5 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/appinsights/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/appinsights/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.9.0" + version = "4.14.0" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/capacity/main.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/capacity/main.tf index aef9cdd66..194dd8d99 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/capacity/main.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/capacity/main.tf @@ -1,33 +1,37 @@ -resource "azapi_resource" "fab_capacity" { - count = var.create_fabric_capacity ? 1 : 0 - type = "Microsoft.Fabric/capacities@2023-11-01" - name = var.capacity_name - parent_id = var.resource_group_id - location = var.location - schema_validation_enabled = false +resource "azurerm_fabric_capacity" "capacity" { + count = var.create_fabric_capacity ? 1 : 0 + name = var.capacity_name + resource_group_name = var.resource_group_name + location = var.location + administration_members = var.admin_members - body = { - properties = { - administration = { - members = var.admin_members - } - } - sku = { - name = var.sku, - tier = "Fabric" - } + sku { + name = var.sku + tier = "Fabric" } - - tags = var.tags - ignore_missing_property = true + tags = var.tags } data "fabric_capacity" "created_capacity_id" { count = var.create_fabric_capacity ? 1 : 0 - display_name = resource.azapi_resource.fab_capacity[0].name + display_name = resource.azurerm_fabric_capacity.capacity[0].name + + lifecycle { + postcondition { + condition = self.state == "Active" + error_message = "Fabric Capacity is not in Active state. Please check the Fabric Capacity status." + } + } } data "fabric_capacity" "provided_capacity_id" { count = var.create_fabric_capacity ? 0 : 1 display_name = var.capacity_name + + lifecycle { + postcondition { + condition = self.state == "Active" + error_message = "Fabric Capacity is not in Active state. Please check the Fabric Capacity status." + } + } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/capacity/variables.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/capacity/variables.tf index 73d45d854..523601322 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/capacity/variables.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/capacity/variables.tf @@ -8,18 +8,18 @@ variable "capacity_name" { description = "Name of the Fabric capacity." } -variable "resource_group_id" { +variable "resource_group_name" { type = string - description = "Resource group id" + description = "Resource group name where the Fabric capacity will be created" } variable "location" { - description = "The Azure region where the resources will be created" + description = "The Azure region where the Fabric capacity will be created" type = string } variable "admin_members" { - type = list(string) + type = set(string) description = "Fabric capacity admin members, can be email (for user) or id (for service principal)" } @@ -27,6 +27,11 @@ variable "sku" { type = string description = "Fabric capacity SKU name" default = "F2" + + validation { + condition = contains(["F2", "F4", "F8", "F16", "F32", "F64", "F128", "F256", "F512", "F1024", "F2048"], var.sku) + error_message = "Please specify a valid Fabric Capacity SKU. Valid values are: [ 'F2', 'F4', 'F8', 'F16', 'F32', 'F64', 'F128', 'F256', 'F512', 'F1024', 'F2048' ]." + } } variable "tags" { diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/capacity/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/capacity/versions.tf index 3f1419118..c490ba9db 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/capacity/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/capacity/versions.tf @@ -2,13 +2,13 @@ terraform { required_version = ">= 1.9.8, < 2.0" required_providers { - azapi = { - source = "azure/azapi" - version = "2.0.1" + azurerm = { + source = "hashicorp/azurerm" + version = "4.14.0" } fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/data_pipeline/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/data_pipeline/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/data_pipeline/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/data_pipeline/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/domain/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/domain/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/domain/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/domain/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/domain_role_assignments/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/domain_role_assignments/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/domain_role_assignments/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/domain_role_assignments/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/domain_workspace_assignments/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/domain_workspace_assignments/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/domain_workspace_assignments/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/domain_workspace_assignments/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/environment/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/environment/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/environment/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/environment/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/eventhouse/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/eventhouse/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/eventhouse/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/eventhouse/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/git_integration/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/git_integration/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/git_integration/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/git_integration/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/kql_database/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/kql_database/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/kql_database/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/kql_database/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/lakehouse/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/lakehouse/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/lakehouse/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/lakehouse/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/notebook/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/notebook/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/notebook/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/notebook/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/spark_custom_pool/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/spark_custom_pool/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/spark_custom_pool/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/spark_custom_pool/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/spark_environment_settings/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/spark_environment_settings/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/spark_environment_settings/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/spark_environment_settings/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/spark_workspace_settings/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/spark_workspace_settings/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/spark_workspace_settings/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/spark_workspace_settings/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/warehouse/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/warehouse/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/warehouse/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/warehouse/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/workspace/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/workspace/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/workspace/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/workspace/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/workspace_role_assignment/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/workspace_role_assignment/versions.tf index 6e4440212..c124dcfdb 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/workspace_role_assignment/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/fabric/workspace_role_assignment/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/keyvault/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/keyvault/versions.tf index 7d0da5fcd..6fab3ada5 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/keyvault/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/keyvault/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.9.0" + version = "4.14.0" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/keyvault_secret/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/keyvault_secret/versions.tf index 7d0da5fcd..6fab3ada5 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/keyvault_secret/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/keyvault_secret/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.9.0" + version = "4.14.0" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/loganalytics/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/loganalytics/versions.tf index 7d0da5fcd..6fab3ada5 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/loganalytics/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/loganalytics/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.9.0" + version = "4.14.0" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/role_assignment/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/role_assignment/versions.tf index 7d0da5fcd..6fab3ada5 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/role_assignment/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/modules/role_assignment/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.9.0" + version = "4.14.0" } } } diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/providers.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/providers.tf index 0007b8c4b..12e246d36 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/providers.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/providers.tf @@ -27,12 +27,3 @@ provider "azurerm" { } } } - -provider "azapi" { - tenant_id = var.tenant_id - subscription_id = var.subscription_id - client_id = var.use_msi || var.use_cli ? null : var.client_id - client_secret = var.use_msi || var.use_cli ? null : var.client_secret - use_msi = var.use_msi - use_cli = var.use_cli -} diff --git a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/versions.tf b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/versions.tf index 7e7fabb4f..cd374cb22 100644 --- a/e2e_samples/fabric_dataops_sample/infrastructure/terraform/versions.tf +++ b/e2e_samples/fabric_dataops_sample/infrastructure/terraform/versions.tf @@ -4,19 +4,15 @@ terraform { required_providers { fabric = { source = "microsoft/fabric" - version = "0.1.0-beta.4" + version = "0.1.0-beta.6" } azurerm = { source = "hashicorp/azurerm" - version = "4.9.0" + version = "4.14.0" } azuread = { source = "hashicorp/azuread" - version = "2.53.1" - } - azapi = { - source = "azure/azapi" - version = "2.0.1" + version = "3.0.2" } random = { source = "hashicorp/random"