Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCP OIDC simplification #4

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

Halama
Copy link
Member

@Halama Halama commented Nov 20, 2024

Terraform plan for CI update:

Terraform will perform the following actions:

  # azuread_application.go_cloud_encrypt will be updated in-place
  ~ resource "azuread_application" "go_cloud_encrypt" {
        id                             = "/applications/416e7640-356a-4c51-a43b-1d7c854810bf"
      ~ owners                         = [
          - "a2e33a9f-bef5-4a23-9f38-1e91f859be4b",
          + "5a5fbaf1-8467-4341-bc4e-d5a9e2c1262a",
        ]
        tags                           = []
        # (24 unchanged attributes hidden)

        # (6 unchanged blocks hidden)
    }

  # azuread_service_principal.go_cloud_encrypt will be updated in-place
  ~ resource "azuread_service_principal" "go_cloud_encrypt" {
        id                            = "/servicePrincipals/0aa7be8e-a269-47e0-89c0-c3c5a7318a39"
      ~ owners                        = [
          - "a2e33a9f-bef5-4a23-9f38-1e91f859be4b",
          + "5a5fbaf1-8467-4341-bc4e-d5a9e2c1262a",
        ]
        tags                          = []
        # (23 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # google_iam_workload_identity_pool.go_cloud_encrypt will be destroyed
  # (because google_iam_workload_identity_pool.go_cloud_encrypt is not in configuration)
  - resource "google_iam_workload_identity_pool" "go_cloud_encrypt" {
      - disabled                  = false -> null
      - id                        = "projects/go-team-ci/locations/global/workloadIdentityPools/ci-go-cloud-encrypt" -> null
      - name                      = "projects/592579407407/locations/global/workloadIdentityPools/ci-go-cloud-encrypt" -> null
      - project                   = "go-team-ci" -> null
      - state                     = "ACTIVE" -> null
      - workload_identity_pool_id = "ci-go-cloud-encrypt" -> null
        # (2 unchanged attributes hidden)
    }

  # google_iam_workload_identity_pool_provider.go_cloud_encrypt will be destroyed
  # (because google_iam_workload_identity_pool_provider.go_cloud_encrypt is not in configuration)
  - resource "google_iam_workload_identity_pool_provider" "go_cloud_encrypt" {
      - attribute_condition                = <<-EOT
            attribute.repository == "keboola/go-cloud-encrypt"
        EOT -> null
      - attribute_mapping                  = {
          - "attribute.actor"      = "assertion.actor"
          - "attribute.aud"        = "assertion.aud"
          - "attribute.repository" = "assertion.repository"
          - "google.subject"       = "assertion.sub"
        } -> null
      - disabled                           = false -> null
      - id                                 = "projects/go-team-ci/locations/global/workloadIdentityPools/ci-go-cloud-encrypt/providers/go-cloud-encrypt" -> null
      - name                               = "projects/592579407407/locations/global/workloadIdentityPools/ci-go-cloud-encrypt/providers/go-cloud-encrypt" -> null
      - project                            = "go-team-ci" -> null
      - state                              = "ACTIVE" -> null
      - workload_identity_pool_id          = "ci-go-cloud-encrypt" -> null
      - workload_identity_pool_provider_id = "go-cloud-encrypt" -> null
        # (2 unchanged attributes hidden)

      - oidc {
          - allowed_audiences = [] -> null
          - issuer_uri        = "https://token.actions.githubusercontent.com" -> null
            # (1 unchanged attribute hidden)
        }
    }

  # google_kms_crypto_key_iam_binding.go_cloud_encrypt_iam will be updated in-place
  ~ resource "google_kms_crypto_key_iam_binding" "go_cloud_encrypt_iam" {
        id            = "projects/go-team-ci/locations/global/keyRings/ci-go-cloud-encrypt/cryptoKeys/ci-go-cloud-encrypt/roles/cloudkms.cryptoKeyEncrypterDecrypter"
      ~ members       = [
          - "serviceAccount:[email protected]",
          + "principalSet://iam.googleapis.com/projects/594833180351/locations/global/workloadIdentityPools/github/providers/keboola/attribute.repository/keboola/go-cloud-encrypt",
        ]
        # (3 unchanged attributes hidden)
    }

  # google_service_account.go_cloud_encrypt_service_account will be destroyed
  # (because google_service_account.go_cloud_encrypt_service_account is not in configuration)
  - resource "google_service_account" "go_cloud_encrypt_service_account" {
      - account_id   = "ci-go-cloud-encrypt" -> null
      - disabled     = false -> null
      - display_name = "ci Go Cloud Encrypt DEV" -> null
      - email        = "[email protected]" -> null
      - id           = "projects/go-team-ci/serviceAccounts/[email protected]" -> null
      - member       = "serviceAccount:[email protected]" -> null
      - name         = "projects/go-team-ci/serviceAccounts/[email protected]" -> null
      - project      = "go-team-ci" -> null
      - unique_id    = "102524001773285695130" -> null
        # (1 unchanged attribute hidden)
    }

  # google_service_account_iam_member.go_cloud_encrypt will be destroyed
  # (because google_service_account_iam_member.go_cloud_encrypt is not in configuration)
  - resource "google_service_account_iam_member" "go_cloud_encrypt" {
      - etag               = "BwYnRDPzDbg=" -> null
      - id                 = "projects/go-team-ci/serviceAccounts/[email protected]/roles/iam.serviceAccountTokenCreator/principalSet://iam.googleapis.com/projects/592579407407/locations/global/workloadIdentityPools/ci-go-cloud-encrypt/attribute.repository/keboola/go-cloud-encrypt" -> null
      - member             = "principalSet://iam.googleapis.com/projects/592579407407/locations/global/workloadIdentityPools/ci-go-cloud-encrypt/attribute.repository/keboola/go-cloud-encrypt" -> null
      - role               = "roles/iam.serviceAccountTokenCreator" -> null
      - service_account_id = "projects/go-team-ci/serviceAccounts/[email protected]" -> null
    }

  # google_service_account_key.go_cloud_encrypt_key will be destroyed
  # (because google_service_account_key.go_cloud_encrypt_key is not in configuration)
  - resource "google_service_account_key" "go_cloud_encrypt_key" {
      - id                 = "projects/go-team-ci/serviceAccounts/[email protected]/keys/af7a21d8b8c9ad63157bbce5a1ccbf2c68539a00" -> null
      - key_algorithm      = "KEY_ALG_RSA_2048" -> null
      - name               = "projects/go-team-ci/serviceAccounts/[email protected]/keys/af7a21d8b8c9ad63157bbce5a1ccbf2c68539a00" -> null
      - private_key        = (sensitive value) -> null
      - private_key_type   = "TYPE_GOOGLE_CREDENTIALS_FILE" -> null
      - public_key         = "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvRENDQWVTZ0F3SUJBZ0lJRFExZkZJclNyY0l3RFFZSktvWklodmNOQVFFRkJRQXdJREVlTUJ3R0ExVUUKQXd3Vk1UQXlOVEkwTURBeE56Y3pNamcxTmprMU1UTXdNQ0FYRFRJME1URXdPREV3T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aGdLcmJLWHZueVhUeTQ5anY2UmhBVkxOdHd2T0dYOGNnRjZpWFBqVHJBNlpoYlhTTkNNTCs4MXhGTDhuCkZSdmJGb2hjbTR1R1IybTFoZ3ByUTNjZzZpcU1Wa2svZnNwbTJaRmxxQktFZHB4blF1QnIwWCtON1ZkWDBWa2UKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=" -> null
      - public_key_type    = "TYPE_X509_PEM_FILE" -> null
      - service_account_id = "projects/go-team-ci/serviceAccounts/[email protected]" -> null
      - valid_after        = "2024-11-08T10:43:33Z" -> null
      - valid_before       = "9999-12-31T23:59:59Z" -> null
    }

Plan: 0 to add, 3 to change, 5 to destroy.

Changes to Outputs:
  - gcp_private_key       = (sensitive value) -> null

─────────────────────────────────────────

@Halama Halama changed the base branch from main to jt-psgo-909-cloud-encrypt November 20, 2024 07:27
@Halama Halama marked this pull request as ready for review November 20, 2024 09:29
Copy link

@wokoman wokoman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Za me gut, krasa.

@jachym-tousek-keboola jachym-tousek-keboola merged commit d6fb63d into jt-psgo-909-cloud-encrypt Nov 20, 2024
1 check passed
@jachym-tousek-keboola jachym-tousek-keboola deleted the martin-gcp-oidc branch November 20, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants