Skip to content

Commit 1b78ac2

Browse files
fix permadiff on google_identity_platform_config.authorized_domains (#8740) (#15607)
Signed-off-by: Modular Magician <[email protected]>
1 parent 9a2b54f commit 1b78ac2

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

.changelog/8740.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
identityplatform: fixed a permadiff on `authorized_domains` in `google_identity_platform_config` resource
3+
```

google/services/identityplatform/resource_identity_platform_config.go

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func ResourceIdentityPlatformConfig() *schema.Resource {
5050
Schema: map[string]*schema.Schema{
5151
"authorized_domains": {
5252
Type: schema.TypeList,
53+
Computed: true,
5354
Optional: true,
5455
Description: `List of domains authorized for OAuth redirects.`,
5556
Elem: &schema.Schema{

google/services/identityplatform/resource_identity_platform_config_generated_test.go

+50
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,53 @@ resource "google_identity_platform_config" "default" {
101101
}
102102
`, context)
103103
}
104+
105+
func TestAccIdentityPlatformConfig_identityPlatformConfigMinimalExample(t *testing.T) {
106+
acctest.SkipIfVcr(t)
107+
t.Parallel()
108+
109+
context := map[string]interface{}{
110+
"org_id": envvar.GetTestOrgFromEnv(t),
111+
"billing_acct": envvar.GetTestBillingAccountFromEnv(t),
112+
"random_suffix": acctest.RandString(t, 10),
113+
}
114+
115+
acctest.VcrTest(t, resource.TestCase{
116+
PreCheck: func() { acctest.AccTestPreCheck(t) },
117+
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
118+
Steps: []resource.TestStep{
119+
{
120+
Config: testAccIdentityPlatformConfig_identityPlatformConfigMinimalExample(context),
121+
},
122+
{
123+
ResourceName: "google_identity_platform_config.default",
124+
ImportState: true,
125+
ImportStateVerify: true,
126+
},
127+
},
128+
})
129+
}
130+
131+
func testAccIdentityPlatformConfig_identityPlatformConfigMinimalExample(context map[string]interface{}) string {
132+
return acctest.Nprintf(`
133+
resource "google_project" "default" {
134+
project_id = "tf-test-my-project-1%{random_suffix}"
135+
name = "tf-test-my-project-1%{random_suffix}"
136+
org_id = "%{org_id}"
137+
billing_account = "%{billing_acct}"
138+
labels = {
139+
firebase = "enabled"
140+
}
141+
}
142+
143+
resource "google_project_service" "identitytoolkit" {
144+
project = google_project.default.project_id
145+
service = "identitytoolkit.googleapis.com"
146+
}
147+
148+
149+
resource "google_identity_platform_config" "default" {
150+
project = google_project.default.project_id
151+
}
152+
`, context)
153+
}

0 commit comments

Comments
 (0)