From 2e05de6fb2d9cd8aae6059c32e0e4aed9d042728 Mon Sep 17 00:00:00 2001 From: Nikita Barichev Date: Mon, 23 Dec 2024 02:38:00 +0100 Subject: [PATCH] Fix terraform blocks --- ...nvironment_managed_certificate_resource_test.go | 14 ++++++++------ ...p_environment_managed_certificate.html.markdown | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/internal/services/containerapps/container_app_environment_managed_certificate_resource_test.go b/internal/services/containerapps/container_app_environment_managed_certificate_resource_test.go index 1d959d1150be..f2b66d30a91c 100644 --- a/internal/services/containerapps/container_app_environment_managed_certificate_resource_test.go +++ b/internal/services/containerapps/container_app_environment_managed_certificate_resource_test.go @@ -83,7 +83,7 @@ provider "azurerm" { %[1]s resource "azurerm_container_app_environment_managed_certificate" "test" { - name = "acctest-cacert%[2]d" + name = "acctest-cacert%[2]d" container_app_environment_id = azurerm_container_app_environment.test.id subject_name = azurerm_container_app_custom_domain.test.name @@ -101,7 +101,7 @@ provider "azurerm" { %[1]s resource "azurerm_container_app_environment_managed_certificate" "test" { - name = "acctest-cacert%[2]d" + name = "acctest-cacert%[2]d" container_app_environment_id = azurerm_container_app_environment.test.id subject_name = azurerm_container_app_custom_domain.test.name @@ -120,7 +120,7 @@ func (r ContainerAppEnvironmentManagedCertificateResource) requiresImport(data a %[1]s resource "azurerm_container_app_environment_managed_certificate" "import" { - name = azurerm_container_app_environment_managed_certificate.test.name + name = azurerm_container_app_environment_managed_certificate.test.name container_app_environment_id = azurerm_container_app_environment_managed_certificate.test.container_app_environment_id subject_name = azurerm_container_app_environment_managed_certificate.test.subject_name @@ -135,6 +135,7 @@ func (r ContainerAppEnvironmentManagedCertificateResource) template(data accepta return fmt.Sprintf(` + data "azurerm_dns_zone" "test" { name = "%[3]s" resource_group_name = "%[4]s" @@ -146,9 +147,9 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_container_app_environment" "test" { - name = "acctest-CAEnv%[1]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location + name = "acctest-CAEnv%[1]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location } resource "azurerm_container_app" "test" { @@ -209,5 +210,6 @@ resource "azurerm_container_app_custom_domain" "test" { depends_on = [azurerm_dns_cname_record.test, azurerm_dns_txt_record.test] } + `, data.RandomInteger, data.Locations.Primary, dnsZone, dataResourceGroup) } diff --git a/website/docs/r/container_app_environment_managed_certificate.html.markdown b/website/docs/r/container_app_environment_managed_certificate.html.markdown index aa31c8e0d52c..16e545fb3cde 100644 --- a/website/docs/r/container_app_environment_managed_certificate.html.markdown +++ b/website/docs/r/container_app_environment_managed_certificate.html.markdown @@ -19,9 +19,9 @@ resource "azurerm_resource_group" "example" { } resource "azurerm_container_app_environment" "example" { - name = "myEnvironment" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name + name = "myEnvironment" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name } resource "azurerm_dns_cname_record" "example" {