Skip to content

Commit 0aa420b

Browse files
committed
fix: cloud build integration tests
1 parent f1fe2eb commit 0aa420b

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

examples/simple_bucket/main.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,4 @@ module "bucket" {
5858
retention_policy = {
5959
retention_period = 2
6060
}
61-
62-
ip_filter = {
63-
mode = "Enabled"
64-
public_network_source = {
65-
allowed_ip_cidr_ranges = ["0.0.0.0/0"]
66-
}
67-
allow_all_service_agent_access = true
68-
}
6961
}

test/setup/iam.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,18 @@ locals {
3535
"roles/cloudkms.cryptoKeyEncrypterDecrypter",
3636
"roles/iam.serviceAccountUser",
3737
"roles/storage.admin",
38+
"projects/${module.project.project_id}/roles/${google_project_iam_custom_role.int_test.role_id}",
3839
], flatten(values(local.per_module_roles)))
3940
}
4041

42+
resource "google_project_iam_custom_role" "int_test" {
43+
project = module.project.project_id
44+
role_id = "BypassBucketIPfiltering"
45+
title = "Bypass bucket IP filtering"
46+
description = "Allow test service account to bypass bucket ip filtering rules"
47+
permissions = ["storage.buckets.exemptFromIpFilter"]
48+
}
49+
4150
resource "google_service_account" "int_test" {
4251
project = module.project.project_id
4352
account_id = "ci-cloud-storage"

0 commit comments

Comments
 (0)