hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.36k stars 1.75k forks source link

Binary authorization policy - add support for namespace rules #13101

Open tuukkalahti opened 2 years ago

tuukkalahti commented 2 years ago

Community Note

Description

Currently only GKE-cluster -rules are supported.

Binary authorization supports also 3 other ruletypes - especially Kubernetes namespace should be supported (as it gives more control).

New or Affected Resource(s)

Potential Terraform Configuration

based on rest api format block could be something like:

kubernetes_namespace_admission_rules {
  namespace = "default"
  evaluation_mode = "REQUIRE_ATTESTATION"
  enforcement_mode = "ENFORCED_BLOCK_AND_AUDIT_LOG"
  requireAttestationsBy = [google_binary_authorization_attestor.attestor.name]
}

References

b/302672961

newtondev commented 6 months ago

This is a feature that we really need at the moment. I will set aside some time to work on it and create a PR.