Skip to content

Commit

Permalink
add time sleep for secret version creation
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-cit committed Oct 29, 2024
1 parent 3da92c9 commit bfdad96
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/tf_cloudbuild_builder_simple_github/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,18 @@ module "git_repo_connection" {
repository_url = local.repoURL
},
}

depends_on = [time_sleep.propagation_secret_version]
}

resource "time_sleep" "propagation_secret_version" {
create_duration = "30s"
}

data "google_secret_manager_secret_version_access" "github_pat" {
secret = var.github_pat_secret_id

depends_on = [time_sleep.propagation_secret_version]
}

# Bootstrap GitHub with Dockerfile
Expand Down
8 changes: 8 additions & 0 deletions examples/tf_cloudbuild_builder_simple_gitlab/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,18 @@ module "git_repo_connection" {
repository_url = var.repository_uri
},
}

depends_on = [time_sleep.propagation_secret_version]
}

resource "time_sleep" "propagation_secret_version" {
create_duration = "30s"
}

data "google_secret_manager_secret_version_access" "gitlab_api_access_token" {
secret = var.gitlab_authorizer_secret_id

depends_on = [time_sleep.propagation_secret_version]
}

# Bootstrap GitLab with Dockerfile
Expand Down
8 changes: 8 additions & 0 deletions examples/tf_cloudbuild_workspace_simple_github/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,18 @@ module "git_repo_connection" {
repository_url = local.repoURL
},
}

depends_on = [time_sleep.propagation_secret_version]
}

resource "time_sleep" "propagation_secret_version" {
create_duration = "30s"
}

data "google_secret_manager_secret_version_access" "github_pat" {
secret = var.github_pat_secret_id

depends_on = [time_sleep.propagation_secret_version]
}

module "bootstrap_github_repo" {
Expand Down
8 changes: 8 additions & 0 deletions examples/tf_cloudbuild_workspace_simple_gitlab/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,18 @@ module "git_repo_connection" {
repository_url = var.repository_uri
},
}

depends_on = [time_sleep.propagation_secret_version]
}

resource "time_sleep" "propagation_secret_version" {
create_duration = "30s"
}

data "google_secret_manager_secret_version_access" "gitlab_api_access_token" {
secret = var.gitlab_authorizer_secret_id

depends_on = [time_sleep.propagation_secret_version]
}

module "bootstrap_github_repo" {
Expand Down

0 comments on commit bfdad96

Please sign in to comment.