diff --git a/examples/app-service-certificate/stored-in-keyvault/main.tf b/examples/app-service-certificate/stored-in-keyvault/main.tf index 05ca21c1961f..c9ff8a643c83 100644 --- a/examples/app-service-certificate/stored-in-keyvault/main.tf +++ b/examples/app-service-certificate/stored-in-keyvault/main.tf @@ -34,7 +34,7 @@ resource "azurerm_key_vault_access_policy" "current_user" { } data "azuread_service_principal" "web_app_resource_provider" { - application_id = "abfa0a7c-a6b6-4736-8310-5855508787cd" + client_id = data.azurerm_client_config.current.client_id } resource "azurerm_key_vault_access_policy" "web_app_resource_provider" { diff --git a/examples/app-service/docker-authentication/main.tf b/examples/app-service/docker-authentication/main.tf index 87097fb67c33..715e764c90e0 100644 --- a/examples/app-service/docker-authentication/main.tf +++ b/examples/app-service/docker-authentication/main.tf @@ -32,8 +32,8 @@ resource "azurerm_linux_web_app" "example" { site_config { application_stack { - docker_image = "jackofallops/azure-containerapps-python-acctest" - docker_image_tag = "v0.0.1" + docker_image_name = "nginx:latest" + docker_registry_url = "https://index.docker.io" } } diff --git a/examples/azure-monitoring/eventhub_integration/main.tf b/examples/azure-monitoring/eventhub_integration/main.tf index 2c4de161a6e3..a6f36ea51a9c 100644 --- a/examples/azure-monitoring/eventhub_integration/main.tf +++ b/examples/azure-monitoring/eventhub_integration/main.tf @@ -48,27 +48,13 @@ resource "azurerm_monitor_diagnostic_setting" "example" { eventhub_name = azurerm_eventhub.example.name eventhub_authorization_rule_id = azurerm_eventhub_namespace_authorization_rule.example.id - dynamic "log" { - for_each = data.azurerm_monitor_diagnostic_categories.example.logs + dynamic "enabled_log" { + for_each = data.azurerm_monitor_diagnostic_categories.example.log_category_types content { - category = log.key - - retention_policy { - enabled = false - days = 0 - } + category = enabled_log.key } } - dynamic "metric" { - for_each = data.azurerm_monitor_diagnostic_categories.example.metrics - - content { - category = metric.key - - retention_policy { - enabled = false - days = 0 - } - } + metric { + category = "AllMetrics" } } diff --git a/examples/batch/custom-image/main.tf b/examples/batch/custom-image/main.tf index 7b9157b07efe..4f1374a24f58 100644 --- a/examples/batch/custom-image/main.tf +++ b/examples/batch/custom-image/main.tf @@ -107,11 +107,12 @@ resource "azurerm_image" "example" { resource_group_name = azurerm_resource_group.example.name os_disk { - os_type = "Linux" - os_state = "Generalized" - blob_uri = azurerm_virtual_machine.example.storage_os_disk.0.vhd_uri - size_gb = 30 - caching = "None" + os_type = "Linux" + os_state = "Generalized" + blob_uri = azurerm_virtual_machine.example.storage_os_disk.0.vhd_uri + size_gb = 30 + caching = "None" + storage_type = "Standard_LRS" } tags = { diff --git a/examples/cosmos-db/failover/main.tf b/examples/cosmos-db/failover/main.tf index 9aa3c1ecf0b1..859329799d94 100644 --- a/examples/cosmos-db/failover/main.tf +++ b/examples/cosmos-db/failover/main.tf @@ -21,7 +21,7 @@ resource "azurerm_cosmosdb_account" "example" { // set ip_range_filter to allow azure services (0.0.0.0) and azure portal. // https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-the-azure-portal // https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-global-azure-datacenters-or-other-sources-within-azure - ip_range_filter = "0.0.0.0,104.42.195.92,40.76.54.131,52.176.6.30,52.169.50.45,52.187.184.26" + ip_range_filter = ["0.0.0.0", "104.42.195.92", "40.76.54.131", "52.176.6.30", "52.169.50.45", "52.187.184.26"] consistency_policy { consistency_level = "BoundedStaleness" diff --git a/examples/hdinsight/enterprise-security-package/main.tf b/examples/hdinsight/enterprise-security-package/main.tf index df449e2d4970..6359eaf029bd 100644 --- a/examples/hdinsight/enterprise-security-package/main.tf +++ b/examples/hdinsight/enterprise-security-package/main.tf @@ -42,7 +42,7 @@ resource "azurerm_subnet" "example" { name = "${var.prefix}-subnet" resource_group_name = azurerm_resource_group.example.name virtual_network_name = azurerm_virtual_network.example.name - address_prefixes = [cidrsubnet(azurerm_virtual_network.example.address_space.0, 8, 0)] + address_prefixes = azurerm_virtual_network.example.address_space } resource "azurerm_network_security_group" "example" { diff --git a/examples/image/from_vhd/main.tf b/examples/image/from_vhd/main.tf index 245fb3c81678..2bbae5978c42 100644 --- a/examples/image/from_vhd/main.tf +++ b/examples/image/from_vhd/main.tf @@ -89,9 +89,10 @@ resource "azurerm_image" "example" { resource_group_name = azurerm_resource_group.example.name os_disk { - os_type = "Linux" - os_state = "Generalized" - blob_uri = azurerm_virtual_machine.example.storage_os_disk[0].vhd_uri - size_gb = 30 + os_type = "Linux" + os_state = "Generalized" + blob_uri = azurerm_virtual_machine.example.storage_os_disk[0].vhd_uri + size_gb = 30 + storage_type = "Standard_LRS" } } diff --git a/examples/kubernetes/egress-with-udr-azure-cni/main.tf b/examples/kubernetes/egress-with-udr-azure-cni/main.tf index d96a5f7524bc..c607e46b0e71 100644 --- a/examples/kubernetes/egress-with-udr-azure-cni/main.tf +++ b/examples/kubernetes/egress-with-udr-azure-cni/main.tf @@ -28,7 +28,7 @@ resource "azurerm_route_table" "example" { name = "${var.prefix}fwrt" location = azurerm_resource_group.example.location resource_group_name = azurerm_resource_group.example.name - disable_bgp_route_propagation = false + bgp_route_propagation_enabled = true route { name = "${var.prefix}fwrn" diff --git a/examples/kubernetes/egress-with-udr-kubenet/main.tf b/examples/kubernetes/egress-with-udr-kubenet/main.tf index a286f81562e7..19078f902ad8 100644 --- a/examples/kubernetes/egress-with-udr-kubenet/main.tf +++ b/examples/kubernetes/egress-with-udr-kubenet/main.tf @@ -28,7 +28,7 @@ resource "azurerm_route_table" "example" { name = "${var.prefix}fwrt" location = azurerm_resource_group.example.location resource_group_name = azurerm_resource_group.example.name - disable_bgp_route_propagation = false + bgp_route_propagation_enabled = true route { name = "${var.prefix}fwrn" diff --git a/examples/media-services/basic-with-assets/README.md b/examples/media-services/basic-with-assets/README.md deleted file mode 100644 index 4e37b3ae1313..000000000000 --- a/examples/media-services/basic-with-assets/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## Example: Media Services - -This example provisions a Media Service with a single Storage Account and with a single Media Asset. - -### Variables - -* `prefix` - (Required) The prefix used for all resources in this example. - -* `location` - (Required) The Azure Region in which the resources in this example should be created. diff --git a/examples/media-services/basic-with-assets/main.tf b/examples/media-services/basic-with-assets/main.tf deleted file mode 100644 index f2ff9d5a71f2..000000000000 --- a/examples/media-services/basic-with-assets/main.tf +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "example" { - name = "${var.prefix}-resources" - location = var.location -} - -resource "azurerm_storage_account" "example" { - name = "${var.prefix}storacc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" - - tags = { - environment = "staging" - } -} - -resource "azurerm_media_services_account" "example" { - name = "${var.prefix}mediasvc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -resource "azurerm_media_asset" "example" { - name = "Asset1" - description = "Asset description" - resource_group_name = azurerm_resource_group.example.name - media_services_account_name = azurerm_media_services_account.example.name -} - -output "rendered" { - value = azurerm_media_asset.example.id -} diff --git a/examples/media-services/basic-with-assets/variables.tf b/examples/media-services/basic-with-assets/variables.tf deleted file mode 100644 index 3d161bddd568..000000000000 --- a/examples/media-services/basic-with-assets/variables.tf +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -variable "prefix" { - description = "The Prefix used for all resources in this example." -} - -variable "location" { - description = "The Azure Region in which all resources in this example should be created." -} diff --git a/examples/media-services/basic/README.md b/examples/media-services/basic/README.md deleted file mode 100644 index be2a1dcda2b3..000000000000 --- a/examples/media-services/basic/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## Example: Media Services - -This example provisions a Media Service with a single Storage Account. - -### Variables - -* `prefix` - (Required) The prefix used for all resources in this example. - -* `location` - (Required) The Azure Region in which the resources in this example should be created. diff --git a/examples/media-services/basic/main.tf b/examples/media-services/basic/main.tf deleted file mode 100644 index 19d0c249f0a1..000000000000 --- a/examples/media-services/basic/main.tf +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "example" { - name = "${var.prefix}-resources" - location = var.location -} - -resource "azurerm_storage_account" "example" { - name = "${var.prefix}storacc" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" - - tags = { - environment = "staging" - } -} - -resource "azurerm_media_services_account" "example" { - name = "${var.prefix}mediasvc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } -} - -output "rendered" { - value = azurerm_media_services_account.example.id -} diff --git a/examples/media-services/basic/variables.tf b/examples/media-services/basic/variables.tf deleted file mode 100644 index 839c05dff550..000000000000 --- a/examples/media-services/basic/variables.tf +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -variable "prefix" { - description = "The Prefix used for all resources in this example" -} - -variable "location" { - description = "The Azure Region in which all resources in this example should be created." -} diff --git a/examples/media-services/multiple-storage-accounts/README.md b/examples/media-services/multiple-storage-accounts/README.md deleted file mode 100644 index 947277237a61..000000000000 --- a/examples/media-services/multiple-storage-accounts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## Example: Media Services - -This example provisions a Media Service with multiple Storage Accounts. - -### Variables - -* `prefix` - (Required) The prefix used for all resources in this example. - -* `location` - (Required) The Azure Region in which the resources in this example should be created. diff --git a/examples/media-services/multiple-storage-accounts/main.tf b/examples/media-services/multiple-storage-accounts/main.tf deleted file mode 100644 index 0d9eb3a43ca9..000000000000 --- a/examples/media-services/multiple-storage-accounts/main.tf +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -provider "azurerm" { - features {} -} - -resource "azurerm_resource_group" "example" { - name = "${var.prefix}-resources" - location = var.location -} - -resource "azurerm_storage_account" "example" { - name = "${var.prefix}stor1" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" -} - -resource "azurerm_storage_account" "example2" { - name = "${var.prefix}stor2" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_tier = "Standard" - account_replication_type = "GRS" - - tags = { - environment = "staging" - } -} - -resource "azurerm_media_services_account" "example" { - name = "${var.prefix}-mediasvc" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - - storage_account { - id = azurerm_storage_account.example.id - is_primary = true - } - - storage_account { - id = azurerm_storage_account.example2.id - is_primary = false - } -} - -output "rendered" { - value = azurerm_media_services_account.example.id -} diff --git a/examples/media-services/multiple-storage-accounts/variables.tf b/examples/media-services/multiple-storage-accounts/variables.tf deleted file mode 100644 index 839c05dff550..000000000000 --- a/examples/media-services/multiple-storage-accounts/variables.tf +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -variable "prefix" { - description = "The Prefix used for all resources in this example" -} - -variable "location" { - description = "The Azure Region in which all resources in this example should be created." -} diff --git a/examples/netapp/nfsv3_volume_with_backup_policy/main.tf b/examples/netapp/nfsv3_volume_with_backup_policy/main.tf index bff4aadd06f3..a8db38001743 100755 --- a/examples/netapp/nfsv3_volume_with_backup_policy/main.tf +++ b/examples/netapp/nfsv3_volume_with_backup_policy/main.tf @@ -4,7 +4,7 @@ provider "azurerm" { features { netapp { - prevent_volume_destruction = false + prevent_volume_destruction = false delete_backups_on_backup_vault_destroy = true } } @@ -59,7 +59,7 @@ resource "azurerm_netapp_backup_policy" "example" { daily_backups_to_keep = 2 weekly_backups_to_keep = 2 monthly_backups_to_keep = 2 - enabled = true + enabled = true } resource "azurerm_netapp_pool" "example" { @@ -95,9 +95,9 @@ resource "azurerm_netapp_volume" "example" { } export_policy_rule { - rule_index = 1 - allowed_clients = ["0.0.0.0/0"] + rule_index = 1 + allowed_clients = ["0.0.0.0/0"] protocols_enabled = ["NFSv3"] - unix_read_write = true + unix_read_write = true } } diff --git a/examples/paloalto/ngfw-virtual-network-rulestack/main.tf b/examples/paloalto/ngfw-virtual-network-rulestack/main.tf index bfd8d54aa156..75cbcdc0e538 100644 --- a/examples/paloalto/ngfw-virtual-network-rulestack/main.tf +++ b/examples/paloalto/ngfw-virtual-network-rulestack/main.tf @@ -100,6 +100,7 @@ resource "azurerm_palo_alto_local_rulestack_rule" "example" { rulestack_id = azurerm_palo_alto_local_rulestack.example.id priority = 9999 action = "DenySilent" + protocol = "application-default" applications = ["any"] diff --git a/examples/private-endpoint/application-gateway/main.tf b/examples/private-endpoint/application-gateway/main.tf index 338527251735..7a5d81d292c6 100644 --- a/examples/private-endpoint/application-gateway/main.tf +++ b/examples/private-endpoint/application-gateway/main.tf @@ -32,7 +32,7 @@ resource "azurerm_subnet" "endpoint" { virtual_network_name = azurerm_virtual_network.example.name address_prefixes = ["10.0.2.0/24"] - private_endpoint_network_policies_enabled = false + private_endpoint_network_policies = "Disabled" } resource "azurerm_public_ip" "example" { diff --git a/examples/private-endpoint/postgresql/main.tf b/examples/private-endpoint/postgresql/main.tf index d05d27dd56dc..9c8468a0bba3 100644 --- a/examples/private-endpoint/postgresql/main.tf +++ b/examples/private-endpoint/postgresql/main.tf @@ -23,7 +23,7 @@ resource "azurerm_subnet" "endpoint" { virtual_network_name = azurerm_virtual_network.example.name address_prefixes = ["10.0.2.0/24"] - private_endpoint_network_policies_enabled = false + private_endpoint_network_policies = "Disabled" } resource "azurerm_postgresql_server" "example" { diff --git a/examples/private-endpoint/private-dns-group/main.tf b/examples/private-endpoint/private-dns-group/main.tf index c4b59df7d0a3..5d2a187e0bae 100644 --- a/examples/private-endpoint/private-dns-group/main.tf +++ b/examples/private-endpoint/private-dns-group/main.tf @@ -23,7 +23,7 @@ resource "azurerm_subnet" "endpoint" { virtual_network_name = azurerm_virtual_network.example.name address_prefixes = ["10.0.2.0/24"] - private_endpoint_network_policies_enabled = false + private_endpoint_network_policies = "Disabled" } resource "azurerm_private_dns_zone" "example" { diff --git a/examples/private-endpoint/private-link-service/main.tf b/examples/private-endpoint/private-link-service/main.tf index 327cfb51d426..8efe79750f9c 100644 --- a/examples/private-endpoint/private-link-service/main.tf +++ b/examples/private-endpoint/private-link-service/main.tf @@ -25,7 +25,7 @@ resource "azurerm_subnet" "service" { virtual_network_name = azurerm_virtual_network.example.name address_prefixes = ["10.0.1.0/24"] - private_link_service_network_policies_enabled = false + private_endpoint_network_policies = "Disabled" } resource "azurerm_subnet" "endpoint" { @@ -34,7 +34,7 @@ resource "azurerm_subnet" "endpoint" { virtual_network_name = azurerm_virtual_network.example.name address_prefixes = ["10.0.2.0/24"] - private_endpoint_network_policies_enabled = false + private_endpoint_network_policies = "Disabled" } resource "azurerm_public_ip" "example" { diff --git a/examples/redis-cache/basic/main.tf b/examples/redis-cache/basic/main.tf index f50fe40a1369..dad8ccfcae6b 100644 --- a/examples/redis-cache/basic/main.tf +++ b/examples/redis-cache/basic/main.tf @@ -12,11 +12,11 @@ resource "azurerm_resource_group" "example" { # NOTE: the Name used for Redis needs to be globally unique resource "azurerm_redis_cache" "example" { - name = "${var.prefix}-redis" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - capacity = 0 - family = "C" - sku_name = "Basic" - enable_non_ssl_port = false + name = "${var.prefix}-redis" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + capacity = 0 + family = "C" + sku_name = "Basic" + non_ssl_port_enabled = false } diff --git a/examples/redis-cache/premium-with-backup/main.tf b/examples/redis-cache/premium-with-backup/main.tf index 03d99dc664c7..fc735d94e1f2 100644 --- a/examples/redis-cache/premium-with-backup/main.tf +++ b/examples/redis-cache/premium-with-backup/main.tf @@ -20,13 +20,13 @@ resource "azurerm_storage_account" "example" { # NOTE: the Name used for Redis needs to be globally unique resource "azurerm_redis_cache" "example" { - name = "${var.prefix}-cache" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - capacity = 3 - family = "P" - sku_name = "Premium" - enable_non_ssl_port = false + name = "${var.prefix}-cache" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + capacity = 3 + family = "P" + sku_name = "Premium" + non_ssl_port_enabled = false redis_configuration { rdb_backup_enabled = true diff --git a/examples/redis-cache/premium-with-clustering/main.tf b/examples/redis-cache/premium-with-clustering/main.tf index 4ab761496fee..0b8604c1b7af 100644 --- a/examples/redis-cache/premium-with-clustering/main.tf +++ b/examples/redis-cache/premium-with-clustering/main.tf @@ -12,14 +12,14 @@ resource "azurerm_resource_group" "example" { # NOTE: the Name used for Redis needs to be globally unique resource "azurerm_redis_cache" "example" { - name = "${var.prefix}-cache" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - capacity = 1 - family = "P" - sku_name = "Premium" - enable_non_ssl_port = false - shard_count = 3 + name = "${var.prefix}-cache" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + capacity = 1 + family = "P" + sku_name = "Premium" + non_ssl_port_enabled = false + shard_count = 3 redis_configuration { maxmemory_reserved = 2 diff --git a/examples/redis-cache/standard/main.tf b/examples/redis-cache/standard/main.tf index 42553fdb1d79..b662fc688a01 100644 --- a/examples/redis-cache/standard/main.tf +++ b/examples/redis-cache/standard/main.tf @@ -12,14 +12,14 @@ resource "azurerm_resource_group" "example" { # NOTE: the Name used for Redis needs to be globally unique resource "azurerm_redis_cache" "example" { - name = "${var.prefix}-cache" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - capacity = 2 - family = "C" - sku_name = "Standard" - enable_non_ssl_port = false - minimum_tls_version = "1.2" + name = "${var.prefix}-cache" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + capacity = 2 + family = "C" + sku_name = "Standard" + non_ssl_port_enabled = false + minimum_tls_version = "1.2" redis_configuration {} } diff --git a/examples/servicebus/basic/main.tf b/examples/servicebus/basic/main.tf index df431de58de8..bd46f7445154 100644 --- a/examples/servicebus/basic/main.tf +++ b/examples/servicebus/basic/main.tf @@ -26,9 +26,9 @@ resource "azurerm_servicebus_namespace_authorization_rule" "example" { } resource "azurerm_servicebus_topic" "example" { - name = "${var.prefix}-sbtopic" - namespace_id = azurerm_servicebus_namespace.example.id - enable_partitioning = true + name = "${var.prefix}-sbtopic" + namespace_id = azurerm_servicebus_namespace.example.id + partitioning_enabled = true } resource "azurerm_servicebus_subscription" "example" { @@ -38,7 +38,7 @@ resource "azurerm_servicebus_subscription" "example" { } resource "azurerm_servicebus_queue" "example" { - name = "${var.prefix}-sbqueue" - namespace_id = azurerm_servicebus_namespace.example.id - enable_partitioning = true + name = "${var.prefix}-sbqueue" + namespace_id = azurerm_servicebus_namespace.example.id + partitioning_enabled = true } diff --git a/examples/servicebus/forwarding/main.tf b/examples/servicebus/forwarding/main.tf index faefd8502a4e..6f563b9a0d29 100644 --- a/examples/servicebus/forwarding/main.tf +++ b/examples/servicebus/forwarding/main.tf @@ -26,9 +26,9 @@ resource "azurerm_servicebus_namespace_authorization_rule" "example" { } resource "azurerm_servicebus_topic" "source" { - name = "${var.prefix}-sbt-source" - namespace_id = azurerm_servicebus_namespace.example.id - enable_partitioning = true + name = "${var.prefix}-sbt-source" + namespace_id = azurerm_servicebus_namespace.example.id + partitioning_enabled = true } resource "azurerm_servicebus_topic_authorization_rule" "example" { @@ -40,9 +40,9 @@ resource "azurerm_servicebus_topic_authorization_rule" "example" { } resource "azurerm_servicebus_topic" "destination" { - name = "${var.prefix}-sbt-destination" - namespace_id = azurerm_servicebus_namespace.example.id - enable_partitioning = true + name = "${var.prefix}-sbt-destination" + namespace_id = azurerm_servicebus_namespace.example.id + partitioning_enabled = true } resource "azurerm_servicebus_subscription" "example" { diff --git a/examples/sql-azure/database/main.tf b/examples/sql-azure/database/main.tf index 575e43d523b6..219fef4f4083 100644 --- a/examples/sql-azure/database/main.tf +++ b/examples/sql-azure/database/main.tf @@ -10,7 +10,7 @@ resource "azurerm_resource_group" "example" { location = var.location } -resource "azurerm_sql_server" "example" { +resource "azurerm_mssql_server" "example" { name = "${var.prefix}-sqlsvr" resource_group_name = azurerm_resource_group.example.name location = azurerm_resource_group.example.location @@ -19,23 +19,18 @@ resource "azurerm_sql_server" "example" { administrator_login_password = "4-v3ry-53cr37-p455w0rd" } -resource "azurerm_sql_database" "example" { - name = "${var.prefix}-db" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - server_name = azurerm_sql_server.example.name - edition = "Basic" - collation = "SQL_Latin1_General_CP1_CI_AS" - create_mode = "Default" - requested_service_objective_name = "Basic" +resource "azurerm_mssql_database" "example" { + name = "${var.prefix}-db" + server_id = azurerm_mssql_server.example.id + collation = "SQL_Latin1_General_CP1_CI_AS" + create_mode = "Default" } # Enables the "Allow Access to Azure services" box as described in the API docs # https://docs.microsoft.com/en-us/rest/api/sql/firewallrules/createorupdate -resource "azurerm_sql_firewall_rule" "example" { - name = "allow-azure-services" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_sql_server.example.name - start_ip_address = "0.0.0.0" - end_ip_address = "0.0.0.0" +resource "azurerm_mssql_firewall_rule" "example" { + name = "allow-azure-services" + server_id = azurerm_mssql_server.example.id + start_ip_address = "0.0.0.0" + end_ip_address = "0.0.0.0" } diff --git a/examples/sql-azure/database/outputs.tf b/examples/sql-azure/database/outputs.tf index bc05fdfaff29..82ce6f543034 100644 --- a/examples/sql-azure/database/outputs.tf +++ b/examples/sql-azure/database/outputs.tf @@ -2,9 +2,9 @@ # SPDX-License-Identifier: MPL-2.0 output "sql_server_fqdn" { - value = azurerm_sql_server.example.fully_qualified_domain_name + value = azurerm_mssql_server.example.fully_qualified_domain_name } output "database_name" { - value = azurerm_sql_database.example.name + value = azurerm_mssql_database.example.name } diff --git a/examples/sql-azure/failover_group/main.tf b/examples/sql-azure/failover_group/main.tf index fa7067f707ca..b82b9ee079e7 100644 --- a/examples/sql-azure/failover_group/main.tf +++ b/examples/sql-azure/failover_group/main.tf @@ -43,13 +43,12 @@ resource "azurerm_mssql_database" "secondary" { creation_source_database_id = azurerm_mssql_database.example.id } -resource "azurerm_sql_failover_group" "example" { - name = "${var.prefix}-failover-group" - resource_group_name = azurerm_resource_group.example.name - server_name = azurerm_mssql_server.example.name - databases = [azurerm_mssql_database.example.id] +resource "azurerm_mssql_failover_group" "example" { + name = "${var.prefix}-failover-group" + server_id = azurerm_mssql_server.example.id + databases = [azurerm_mssql_database.example.id] - partner_servers { + partner_server { id = azurerm_mssql_server.secondary.id } diff --git a/examples/sql-azure/managed_instance_failover_group/main.tf b/examples/sql-azure/managed_instance_failover_group/main.tf index b9794a0dd63b..deaf4df2b9cb 100644 --- a/examples/sql-azure/managed_instance_failover_group/main.tf +++ b/examples/sql-azure/managed_instance_failover_group/main.tf @@ -64,11 +64,10 @@ module "vnet_gateway" { gateway_subnet_range_2 = "10.0.2.0/24" } -resource "azurerm_sql_managed_instance_failover_group" "example" { +resource "azurerm_mssql_managed_instance_failover_group" "example" { name = "${var.prefix}-fog" - resource_group_name = azurerm_resource_group.primary.name location = azurerm_resource_group.primary.location - managed_instance_name = module.primary.managed_instance_name + managed_instance_id = module.primary.managed_instance_id partner_managed_instance_id = module.secondary.managed_instance_id read_write_endpoint_failover_policy { @@ -78,6 +77,7 @@ resource "azurerm_sql_managed_instance_failover_group" "example" { depends_on = [ module.vnet_gateway ] + } diff --git a/examples/sql-azure/managed_instance_failover_group/modules/sql_managed_instance/main.tf b/examples/sql-azure/managed_instance_failover_group/modules/sql_managed_instance/main.tf index 3884efde5eb3..8942569396ee 100644 --- a/examples/sql-azure/managed_instance_failover_group/modules/sql_managed_instance/main.tf +++ b/examples/sql-azure/managed_instance_failover_group/modules/sql_managed_instance/main.tf @@ -207,7 +207,7 @@ resource "azurerm_route_table" "rt" { name = "${var.prefix}-mi-rt" location = var.location resource_group_name = var.resource_group_name - disable_bgp_route_propagation = false + bgp_route_propagation_enabled = true route { name = "subnet-to-vnetlocal" @@ -1190,7 +1190,7 @@ resource "azurerm_subnet_route_table_association" "subnet_rt" { route_table_id = azurerm_route_table.rt.id } -resource "azurerm_sql_managed_instance" "mi" { +resource "azurerm_mssql_managed_instance" "mi" { name = "${var.prefix}-mi" resource_group_name = var.resource_group_name location = var.location diff --git a/examples/sql-azure/managed_instance_failover_group/modules/sql_managed_instance/output.tf b/examples/sql-azure/managed_instance_failover_group/modules/sql_managed_instance/output.tf index ff8e630aff7a..c6e359a2bd7f 100644 --- a/examples/sql-azure/managed_instance_failover_group/modules/sql_managed_instance/output.tf +++ b/examples/sql-azure/managed_instance_failover_group/modules/sql_managed_instance/output.tf @@ -2,11 +2,11 @@ # SPDX-License-Identifier: MPL-2.0 output "managed_instance_id" { - value = azurerm_sql_managed_instance.mi.id + value = azurerm_mssql_managed_instance.mi.id } output "managed_instance_name" { - value = azurerm_sql_managed_instance.mi.name + value = azurerm_mssql_managed_instance.mi.name } output "vnet_name" { diff --git a/examples/sql-azure/sql_auditing_eventhub/main.tf b/examples/sql-azure/sql_auditing_eventhub/main.tf index 570629530737..8778427f11ee 100644 --- a/examples/sql-azure/sql_auditing_eventhub/main.tf +++ b/examples/sql-azure/sql_auditing_eventhub/main.tf @@ -54,25 +54,16 @@ resource "azurerm_monitor_diagnostic_setting" "example" { eventhub_authorization_rule_id = azurerm_eventhub_namespace_authorization_rule.example.id eventhub_name = azurerm_eventhub.example.name - log { + enabled_log { category = "SQLSecurityAuditEvents" - enabled = true - - retention_policy { - enabled = false - } } metric { category = "AllMetrics" - - retention_policy { - enabled = false - } } lifecycle { - ignore_changes = [log, metric] + ignore_changes = [metric] } } diff --git a/examples/storage/storage-container/main.tf b/examples/storage/storage-container/main.tf index 16ff4ff6cbf4..41f5f3370476 100644 --- a/examples/storage/storage-container/main.tf +++ b/examples/storage/storage-container/main.tf @@ -18,7 +18,7 @@ resource "azurerm_storage_account" "example" { account_tier = "Standard" account_kind = "StorageV2" account_replication_type = "LRS" - enable_https_traffic_only = true + https_traffic_only_enabled = true access_tier = "Hot" allow_nested_items_to_be_public = true } @@ -37,7 +37,7 @@ resource "azurerm_storage_account" "example2" { account_tier = "Standard" account_kind = "StorageV2" account_replication_type = "LRS" - enable_https_traffic_only = true + https_traffic_only_enabled = true access_tier = "Hot" allow_nested_items_to_be_public = true } diff --git a/examples/virtual-networks/azure-firewall/main.tf b/examples/virtual-networks/azure-firewall/main.tf index 62d80c44e7a9..a0707c37dde5 100644 --- a/examples/virtual-networks/azure-firewall/main.tf +++ b/examples/virtual-networks/azure-firewall/main.tf @@ -39,7 +39,7 @@ resource "azurerm_route_table" "azurt" { name = "AzfwRouteTable" resource_group_name = azurerm_resource_group.azurg.name location = azurerm_resource_group.azurg.location - disable_bgp_route_propagation = false + bgp_route_propagation_enabled = true route { name = "AzfwDefaultRoute" diff --git a/examples/virtual-networks/virtual-network-peering/main.tf b/examples/virtual-networks/virtual-network-peering/main.tf index 97f28b9f2054..a2598eab6083 100644 --- a/examples/virtual-networks/virtual-network-peering/main.tf +++ b/examples/virtual-networks/virtual-network-peering/main.tf @@ -17,8 +17,8 @@ resource "azurerm_virtual_network" "first" { address_space = ["10.0.0.0/24"] subnet { - name = "subnet1" - address_prefix = "10.0.0.0/24" + name = "subnet1" + address_prefixes = ["10.0.0.0/24"] } } @@ -29,8 +29,8 @@ resource "azurerm_virtual_network" "second" { address_space = ["192.168.0.0/24"] subnet { - name = "subnet1" - address_prefix = "192.168.0.0/24" + name = "subnet1" + address_prefixes = ["192.168.0.0/24"] } }