diff --git a/quickstart/301-service-fabric-apim/apim.tf b/quickstart/301-service-fabric-apim/apim.tf index 15e9e426e..c35d09ebb 100644 --- a/quickstart/301-service-fabric-apim/apim.tf +++ b/quickstart/301-service-fabric-apim/apim.tf @@ -1,14 +1,11 @@ resource "azurerm_api_management" "default" { name = "${var.dns_prefix}-${var.name}-${var.environment}-apim" - location = "${azurerm_resource_group.default.location}" - resource_group_name = "${azurerm_resource_group.default.name}" - publisher_name = "${var.api_publisher_name}" - publisher_email = "${var.api_publisher_email}" + location = azurerm_resource_group.default.location + resource_group_name = azurerm_resource_group.default.name + publisher_name = var.api_publisher_name + publisher_email = var.api_publisher_email - sku { - name = "Developer" - capacity = 1 - } + sku_name = "Developer_1" # Ignore certificate changes in the future lifecycle { @@ -26,8 +23,8 @@ resource "azurerm_api_management" "default" { resource "azurerm_api_management_api" "default" { name = "demo" - resource_group_name = "${azurerm_resource_group.default.name}" - api_management_name = "${azurerm_api_management.default.name}" + resource_group_name = azurerm_resource_group.default.name + api_management_name = azurerm_api_management.default.name revision = "1" display_name = "Demo API" path = "" @@ -36,23 +33,23 @@ resource "azurerm_api_management_api" "default" { resource "azurerm_api_management_backend" "sf" { name = "service-fabric-backend" - resource_group_name = "${azurerm_resource_group.default.name}" - api_management_name = "${azurerm_api_management.default.name}" + resource_group_name = azurerm_resource_group.default.name + api_management_name = azurerm_api_management.default.name protocol = "http" url = "fabric:/fake/service" - resource_id = "${azurerm_service_fabric_cluster.default.management_endpoint}" + resource_id = azurerm_service_fabric_cluster.default.management_endpoint service_fabric_cluster { - client_certificate_thumbprint = "${azurerm_key_vault_certificate.client.thumbprint}" - server_certificate_thumbprints = ["${azurerm_key_vault_certificate.cluster.thumbprint}"] - management_endpoints = ["${azurerm_service_fabric_cluster.default.management_endpoint}"] - max_partition_resolution_retries = 3 + client_certificate_thumbprint = azurerm_key_vault_certificate.client.thumbprint + server_certificate_thumbprints = ["${azurerm_key_vault_certificate.cluster.thumbprint}"] + management_endpoints = ["${azurerm_service_fabric_cluster.default.management_endpoint}"] + max_partition_resolution_retries = 3 } } resource "azurerm_application_insights" "default" { name = "${var.name}-${var.environment}-ai" location = "West US 2" - resource_group_name = "${azurerm_resource_group.default.name}" + resource_group_name = azurerm_resource_group.default.name application_type = "web" -} \ No newline at end of file +} diff --git a/quickstart/301-service-fabric-apim/azuread.tf b/quickstart/301-service-fabric-apim/azuread.tf index 4fb11b9f9..a8b3f2c9e 100644 --- a/quickstart/301-service-fabric-apim/azuread.tf +++ b/quickstart/301-service-fabric-apim/azuread.tf @@ -7,14 +7,8 @@ resource "azuread_service_principal" "cluster" { application_id = azuread_application.cluster.application_id } -resource "random_string" "cluster_password" { - length = 32 - special = true -} - resource "azuread_service_principal_password" "cluster" { service_principal_id = azuread_service_principal.cluster.id - value = random_string.cluster_password.result end_date = "2099-01-01T01:00:00Z" } @@ -26,8 +20,8 @@ resource "random_uuid" "reader" { # Service Fabric Client resource "azuread_application" "client" { - display_name = "${var.name}-client-${var.environment}" - reply_urls = ["https://${azurerm_public_ip.sf.fqdn}:19080/Explorer/index.html"] + display_name = "${var.name}-client-${var.environment}" + redirect_uris = ["https://${azurerm_public_ip.sf.fqdn}:19080/Explorer/index.html"] app_role { id = random_uuid.admin.result