Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rcwbr authored Oct 7, 2024
1 parent cb5a7b0 commit bf3b18b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ resource "google_project_service" "crm" {
// WIF access and identity resources
resource "google_iam_workload_identity_pool" "github_actions" {
workload_identity_pool_id = "github-actions"
display_name = "GitHub Actions plan pool"
display_name = "GitHub Actions plan pool"
}
resource "google_iam_workload_identity_pool_provider" "github_actions" {
workload_identity_pool_id = google_iam_workload_identity_pool.github_actions.workload_identity_pool_id
workload_identity_pool_id = google_iam_workload_identity_pool.github_actions.workload_identity_pool_id
workload_identity_pool_provider_id = "github-actions"
display_name = "GitHub Actions plan provider"
display_name = "GitHub Actions plan provider"

// GitHub Actions-GCP OIDC basic config (see https://github.com/terraform-google-modules/terraform-google-github-actions-runners/tree/master/modules/gh-oidc)
oidc {
issuer_uri = "https://token.actions.githubusercontent.com"
}
attribute_mapping = {
"google.subject" = "assertion.sub"
"attribute.actor" = "assertion.actor"
"google.subject" = "assertion.sub"
"attribute.actor" = "assertion.actor"
"attribute.repository" = "assertion.repository"
"attribute.ref" = "assertion.ref"
"attribute.ref" = "assertion.ref"
}

// Condition (https://cloud.google.com/iam/docs/reference/rest/v1/projects.locations.workloadIdentityPools.providers#WorkloadIdentityPoolProvider.FIELDS.attribute_condition)
Expand Down Expand Up @@ -83,13 +83,13 @@ resource "google_service_account_iam_policy" "github_actions_apply" {
// Grant apply service account roles to administer project resources
resource "google_project_iam_member" "github_actions_apply_sa_admin" {
for_each = toset(var.apply_action_project_roles)
project = var.gcp_project
role = each.key
member = google_service_account.github_actions_apply.member
project = var.gcp_project
role = each.key
member = google_service_account.github_actions_apply.member
}

// OpenTofu state bucket access
resource "google_storage_bucket_iam_policy" "state_bucket_policy" {
bucket = data.google_storage_bucket.state_bucket.name
bucket = data.google_storage_bucket.state_bucket.name
policy_data = data.google_iam_policy.state_bucket.policy_data
}

0 comments on commit bf3b18b

Please sign in to comment.