Skip to content

Commit

Permalink
wait for SA to propagate on beyondcord app (#12365) (#860)
Browse files Browse the repository at this point in the history
[upstream:318f4febb184cd6bbcbe9c957c396c042e67ba7b]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Nov 20, 2024
1 parent f841537 commit 1a8a421
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions beyondcorp_app_connection_basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,18 @@ resource "google_service_account" "service_account" {
display_name = "Test Service Account"
}

# wait for service account to propagate -- can be needed due to
# SA eventual consistency issue
resource "time_sleep" "wait_120_seconds" {
depends_on = [google_service_account.service_account]

create_duration = "120s"
}


resource "google_beyondcorp_app_connector" "app_connector" {
depends_on = [time_sleep.wait_120_seconds]

name = "my-app-connector-${local.name_suffix}"
principal_info {
service_account {
Expand Down
10 changes: 10 additions & 0 deletions beyondcorp_app_connection_full/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@ resource "google_service_account" "service_account" {
display_name = "Test Service Account"
}

# wait for service account to propagate -- can be needed due to
# SA eventual consistency issue
resource "time_sleep" "wait_120_seconds" {
depends_on = [google_service_account.service_account]

create_duration = "120s"
}

resource "google_beyondcorp_app_gateway" "app_gateway" {
name = "my-app-gateway-${local.name_suffix}"
type = "TCP_PROXY"
host_type = "GCP_REGIONAL_MIG"
}

resource "google_beyondcorp_app_connector" "app_connector" {
depends_on = [time_sleep.wait_120_seconds]

name = "my-app-connector-${local.name_suffix}"
principal_info {
service_account {
Expand Down

0 comments on commit 1a8a421

Please sign in to comment.