Skip to content

Commit 6bd1fb8

Browse files
Fix TestAccIapWebTypeAppEngine* tests (#8474) (#15330)
Signed-off-by: Modular Magician <[email protected]>
1 parent 26c0d5c commit 6bd1fb8

File tree

2 files changed

+53
-32
lines changed

2 files changed

+53
-32
lines changed

.changelog/8474.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google/iam_iap_web_type_app_engine_generated_test.go

+50-32
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ func TestAccIapWebTypeAppEngineIamBindingGenerated(t *testing.T) {
3232
t.Parallel()
3333

3434
context := map[string]interface{}{
35-
"random_suffix": acctest.RandString(t, 10),
36-
"role": "roles/iap.httpsResourceAccessor",
37-
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
38-
"org_id": envvar.GetTestOrgFromEnv(t),
35+
"random_suffix": acctest.RandString(t, 10),
36+
"role": "roles/iap.httpsResourceAccessor",
37+
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
38+
"org_id": envvar.GetTestOrgFromEnv(t),
39+
"billing_account": envvar.GetTestBillingAccountFromEnv(t),
3940

4041
"condition_title": "expires_after_2019_12_31",
4142
"condition_expr": `request.time < timestamp(\"2020-01-01T00:00:00Z\")`,
@@ -79,10 +80,11 @@ func TestAccIapWebTypeAppEngineIamMemberGenerated(t *testing.T) {
7980
t.Parallel()
8081

8182
context := map[string]interface{}{
82-
"random_suffix": acctest.RandString(t, 10),
83-
"role": "roles/iap.httpsResourceAccessor",
84-
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
85-
"org_id": envvar.GetTestOrgFromEnv(t),
83+
"random_suffix": acctest.RandString(t, 10),
84+
"role": "roles/iap.httpsResourceAccessor",
85+
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
86+
"org_id": envvar.GetTestOrgFromEnv(t),
87+
"billing_account": envvar.GetTestBillingAccountFromEnv(t),
8688

8789
"condition_title": "expires_after_2019_12_31",
8890
"condition_expr": `request.time < timestamp(\"2020-01-01T00:00:00Z\")`,
@@ -117,10 +119,11 @@ func TestAccIapWebTypeAppEngineIamPolicyGenerated(t *testing.T) {
117119
t.Parallel()
118120

119121
context := map[string]interface{}{
120-
"random_suffix": acctest.RandString(t, 10),
121-
"role": "roles/iap.httpsResourceAccessor",
122-
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
123-
"org_id": envvar.GetTestOrgFromEnv(t),
122+
"random_suffix": acctest.RandString(t, 10),
123+
"role": "roles/iap.httpsResourceAccessor",
124+
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
125+
"org_id": envvar.GetTestOrgFromEnv(t),
126+
"billing_account": envvar.GetTestBillingAccountFromEnv(t),
124127

125128
"condition_title": "expires_after_2019_12_31",
126129
"condition_expr": `request.time < timestamp(\"2020-01-01T00:00:00Z\")`,
@@ -164,10 +167,11 @@ func TestAccIapWebTypeAppEngineIamBindingGenerated_withCondition(t *testing.T) {
164167
t.Parallel()
165168

166169
context := map[string]interface{}{
167-
"random_suffix": acctest.RandString(t, 10),
168-
"role": "roles/iap.httpsResourceAccessor",
169-
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
170-
"org_id": envvar.GetTestOrgFromEnv(t),
170+
"random_suffix": acctest.RandString(t, 10),
171+
"role": "roles/iap.httpsResourceAccessor",
172+
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
173+
"org_id": envvar.GetTestOrgFromEnv(t),
174+
"billing_account": envvar.GetTestBillingAccountFromEnv(t),
171175

172176
"condition_title": "expires_after_2019_12_31",
173177
"condition_expr": `request.time < timestamp(\"2020-01-01T00:00:00Z\")`,
@@ -203,10 +207,11 @@ func TestAccIapWebTypeAppEngineIamBindingGenerated_withAndWithoutCondition(t *te
203207
t.Parallel()
204208

205209
context := map[string]interface{}{
206-
"random_suffix": acctest.RandString(t, 10),
207-
"role": "roles/iap.httpsResourceAccessor",
208-
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
209-
"org_id": envvar.GetTestOrgFromEnv(t),
210+
"random_suffix": acctest.RandString(t, 10),
211+
"role": "roles/iap.httpsResourceAccessor",
212+
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
213+
"org_id": envvar.GetTestOrgFromEnv(t),
214+
"billing_account": envvar.GetTestBillingAccountFromEnv(t),
210215

211216
"condition_title": "expires_after_2019_12_31",
212217
"condition_expr": `request.time < timestamp(\"2020-01-01T00:00:00Z\")`,
@@ -252,10 +257,11 @@ func TestAccIapWebTypeAppEngineIamMemberGenerated_withCondition(t *testing.T) {
252257
t.Parallel()
253258

254259
context := map[string]interface{}{
255-
"random_suffix": acctest.RandString(t, 10),
256-
"role": "roles/iap.httpsResourceAccessor",
257-
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
258-
"org_id": envvar.GetTestOrgFromEnv(t),
260+
"random_suffix": acctest.RandString(t, 10),
261+
"role": "roles/iap.httpsResourceAccessor",
262+
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
263+
"org_id": envvar.GetTestOrgFromEnv(t),
264+
"billing_account": envvar.GetTestBillingAccountFromEnv(t),
259265

260266
"condition_title": "expires_after_2019_12_31",
261267
"condition_expr": `request.time < timestamp(\"2020-01-01T00:00:00Z\")`,
@@ -291,10 +297,11 @@ func TestAccIapWebTypeAppEngineIamMemberGenerated_withAndWithoutCondition(t *tes
291297
t.Parallel()
292298

293299
context := map[string]interface{}{
294-
"random_suffix": acctest.RandString(t, 10),
295-
"role": "roles/iap.httpsResourceAccessor",
296-
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
297-
"org_id": envvar.GetTestOrgFromEnv(t),
300+
"random_suffix": acctest.RandString(t, 10),
301+
"role": "roles/iap.httpsResourceAccessor",
302+
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
303+
"org_id": envvar.GetTestOrgFromEnv(t),
304+
"billing_account": envvar.GetTestBillingAccountFromEnv(t),
298305

299306
"condition_title": "expires_after_2019_12_31",
300307
"condition_expr": `request.time < timestamp(\"2020-01-01T00:00:00Z\")`,
@@ -340,10 +347,11 @@ func TestAccIapWebTypeAppEngineIamPolicyGenerated_withCondition(t *testing.T) {
340347
t.Parallel()
341348

342349
context := map[string]interface{}{
343-
"random_suffix": acctest.RandString(t, 10),
344-
"role": "roles/iap.httpsResourceAccessor",
345-
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
346-
"org_id": envvar.GetTestOrgFromEnv(t),
350+
"random_suffix": acctest.RandString(t, 10),
351+
"role": "roles/iap.httpsResourceAccessor",
352+
"project_id": fmt.Sprintf("tf-test%s", acctest.RandString(t, 10)),
353+
"org_id": envvar.GetTestOrgFromEnv(t),
354+
"billing_account": envvar.GetTestBillingAccountFromEnv(t),
347355

348356
"condition_title": "expires_after_2019_12_31",
349357
"condition_expr": `request.time < timestamp(\"2020-01-01T00:00:00Z\")`,
@@ -389,6 +397,7 @@ resource "google_project" "project" {
389397
name = "%{project_id}"
390398
project_id = "%{project_id}"
391399
org_id = "%{org_id}"
400+
billing_account = "%{billing_account}"
392401
}
393402
394403
resource "time_sleep" "wait_60_seconds" {
@@ -426,6 +435,7 @@ resource "google_project" "project" {
426435
name = "%{project_id}"
427436
project_id = "%{project_id}"
428437
org_id = "%{org_id}"
438+
billing_account = "%{billing_account}"
429439
}
430440
431441
resource "time_sleep" "wait_60_seconds" {
@@ -477,6 +487,7 @@ resource "google_project" "project" {
477487
name = "%{project_id}"
478488
project_id = "%{project_id}"
479489
org_id = "%{org_id}"
490+
billing_account = "%{billing_account}"
480491
}
481492
482493
resource "time_sleep" "wait_60_seconds" {
@@ -516,6 +527,7 @@ resource "google_project" "project" {
516527
name = "%{project_id}"
517528
project_id = "%{project_id}"
518529
org_id = "%{org_id}"
530+
billing_account = "%{billing_account}"
519531
}
520532
521533
resource "time_sleep" "wait_60_seconds" {
@@ -553,6 +565,7 @@ resource "google_project" "project" {
553565
name = "%{project_id}"
554566
project_id = "%{project_id}"
555567
org_id = "%{org_id}"
568+
billing_account = "%{billing_account}"
556569
}
557570
558571
resource "time_sleep" "wait_60_seconds" {
@@ -590,6 +603,7 @@ resource "google_project" "project" {
590603
name = "%{project_id}"
591604
project_id = "%{project_id}"
592605
org_id = "%{org_id}"
606+
billing_account = "%{billing_account}"
593607
}
594608
595609
resource "time_sleep" "wait_60_seconds" {
@@ -632,6 +646,7 @@ resource "google_project" "project" {
632646
name = "%{project_id}"
633647
project_id = "%{project_id}"
634648
org_id = "%{org_id}"
649+
billing_account = "%{billing_account}"
635650
}
636651
637652
resource "time_sleep" "wait_60_seconds" {
@@ -694,6 +709,7 @@ resource "google_project" "project" {
694709
name = "%{project_id}"
695710
project_id = "%{project_id}"
696711
org_id = "%{org_id}"
712+
billing_account = "%{billing_account}"
697713
}
698714
699715
resource "time_sleep" "wait_60_seconds" {
@@ -736,6 +752,7 @@ resource "google_project" "project" {
736752
name = "%{project_id}"
737753
project_id = "%{project_id}"
738754
org_id = "%{org_id}"
755+
billing_account = "%{billing_account}"
739756
}
740757
741758
resource "time_sleep" "wait_60_seconds" {
@@ -798,6 +815,7 @@ resource "google_project" "project" {
798815
name = "%{project_id}"
799816
project_id = "%{project_id}"
800817
org_id = "%{org_id}"
818+
billing_account = "%{billing_account}"
801819
}
802820
803821
resource "time_sleep" "wait_60_seconds" {

0 commit comments

Comments
 (0)