Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

Conversation

@charliewolf
Copy link
Contributor

CAI does not currently export this field, but I am using the field name listed in the API docs (workloadIdentityConfig.identityNamespace) and this should work as soon as CAI adds that field.

@charliewolf charliewolf force-pushed the feature/cis/gke-enable-workload-identity branch from fbbe7d3 to 5b83058 Compare December 23, 2019 11:22
@mmontan
Copy link
Contributor

mmontan commented Mar 5, 2020

CAI added the field, and we can unblock this.

@charliewolf Are you still working on this PR, or can I take it over? Thanks!

asset.asset_type == "container.googleapis.com/Cluster"

cluster := asset.resource.data
identity_namespace := lib.get_default(lib.get_default(cluster, "workloadIdentityConfig", {}), "identityNamespace", null)
Copy link
Contributor

Choose a reason for hiding this comment

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

CAI added the field, but called it "workloadPool" rather than identityNamespace.

"workloadIdentityConfig": {
"workloadPool": "mmontan-cloud.svc.id.goog"
},

On the other side, Terraform Validator is going to output the field as "identityNamespace"

It would be better to support both, so we can use the constraint across environments.

"workloadIdentityConfig": {
"identityNamespace": "test-project-123-namespace"
},
"zone": "us-west1-b"
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also have a cluster to test with the following:

  "workloadIdentityConfig": {
    "workloadPool": "test-project-123.svc.id.goog"
  },

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants