From 529b0abbae111073284bd61b06ce0c18e605e06e Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 25 Aug 2020 13:18:11 -0700 Subject: [PATCH] fix active directory domain sweeper (#3902) (#7106) Signed-off-by: Modular Magician --- .changelog/3902.txt | 3 +++ google/resource_active_directory_domain_generated_test.go | 2 +- google/resource_active_directory_domain_sweeper_test.go | 2 +- google/resource_active_directory_domain_update_test.go | 2 +- website/docs/r/active_directory_domain.html.markdown | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .changelog/3902.txt diff --git a/.changelog/3902.txt b/.changelog/3902.txt new file mode 100644 index 00000000000..8ec013c0699 --- /dev/null +++ b/.changelog/3902.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google/resource_active_directory_domain_generated_test.go b/google/resource_active_directory_domain_generated_test.go index 2a95be448e7..39a34cb7b73 100644 --- a/google/resource_active_directory_domain_generated_test.go +++ b/google/resource_active_directory_domain_generated_test.go @@ -51,7 +51,7 @@ func TestAccActiveDirectoryDomain_activeDirectoryDomainBasicExample(t *testing.T func testAccActiveDirectoryDomain_activeDirectoryDomainBasicExample(context map[string]interface{}) string { return Nprintf(` resource "google_active_directory_domain" "ad-domain" { - domain_name = "name%{random_suffix}.org.com" + domain_name = "tfgen%{random_suffix}.org.com" locations = ["us-central1"] reserved_ip_range = "192.168.255.0/24" } diff --git a/google/resource_active_directory_domain_sweeper_test.go b/google/resource_active_directory_domain_sweeper_test.go index ec4ed3886e8..e3dad7891f1 100644 --- a/google/resource_active_directory_domain_sweeper_test.go +++ b/google/resource_active_directory_domain_sweeper_test.go @@ -61,7 +61,7 @@ func testSweepActiveDirectoryDomain(region string) error { }, } - listTemplate := strings.Split("https://managedidentities.googleapis.com/v1/projects/{{project}}/locations/global/domains?domainName={{domain_name}}", "?")[0] + listTemplate := strings.Split("https://managedidentities.googleapis.com/v1/projects/{{project}}/locations/global/domains", "?")[0] listUrl, err := replaceVars(d, config, listTemplate) if err != nil { log.Printf("[INFO][SWEEPER_LOG] error preparing sweeper list url: %s", err) diff --git a/google/resource_active_directory_domain_update_test.go b/google/resource_active_directory_domain_update_test.go index fd832566b5c..f8f772bb138 100644 --- a/google/resource_active_directory_domain_update_test.go +++ b/google/resource_active_directory_domain_update_test.go @@ -10,7 +10,7 @@ import ( func TestAccActiveDirectoryDomain_update(t *testing.T) { t.Parallel() - domain := fmt.Sprintf("mydomain%s.org1.com", randString(t, 5)) + domain := fmt.Sprintf("tf-test%s.org1.com", randString(t, 5)) context := map[string]interface{}{ "domain": domain, "resource_name": "ad-domain", diff --git a/website/docs/r/active_directory_domain.html.markdown b/website/docs/r/active_directory_domain.html.markdown index a95a7d7b4c0..fa40aa00f7c 100644 --- a/website/docs/r/active_directory_domain.html.markdown +++ b/website/docs/r/active_directory_domain.html.markdown @@ -41,7 +41,7 @@ To get more information about Domain, see: ```hcl resource "google_active_directory_domain" "ad-domain" { - domain_name = "name.org.com" + domain_name = "tfgen.org.com" locations = ["us-central1"] reserved_ip_range = "192.168.255.0/24" }