Terraform module to connect Chainguard to your Google Cloud Platform project.
This module is needed if you're using Chainguard Enforce and:
- Your containers (along with potential signatures and SBOMs etc) are in a private GCR registry
- Your signatures are created via Google KMS
- Your using managed (i.e agentless) clusters in GKE
This module binds an Enforce IAM group to a GCP project. To set up the connect in Enforce using the CLI run:
export ENFORCE_GROUP_ID="<<uidp of target Enforce IAM group>>
export GCP_PROJECT_NUMBER="<< project number >>"
export GCP_PROJECT_ID="<< project id >>"
chainctl iam group set-gcp $ENFORCE_GROUP_ID \
--project-number $GCP_PROJECT_NUMBER \
--project-id $GCP_PROJECT_ID
Or using our (soon to be released publically) Terraform provider
resource "chainguard_account_associations" "example" {
group = "<< enforce group id>>"
google {
project_id = "<< project id >>"
project_number = "<< project number >>"
}
}
To configured the connection on AWS side use this module as follows:
module "chainguard-account-association" {
source = "chainguard-dev/chainguard-account-association/aws"
enforce_group_id = "<< enforce group id>>"
}
Chainguard Enforce has an OIDC identity provider. This module configured your GCP project to recognize that OIDC identity provider and allows certain tokens to bind to certain IAM roles. In particular it allows:
- Our policy controller to bind to a role that gives us read access to your GCR registry to check signatures
- Our policy controller public key read access to your KMS keys to validate KMS signatures
- Our agentless controller to list and describe GKE clusters if using managed clusters
This access is restricted to clusters and policies you've configured at or below the scope of the Enforce group you configure.
No requirements.
Name | Version |
---|---|
n/a | |
google-beta | n/a |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
enforce_domain_name | Domain name of your Chainguard Enforce environment | string |
"enforce.dev" |
no |
enforce_group_id | Enforce IAM group ID to bind your AWS account to | string |
n/a | yes |
google_project_id | GCP Project ID. If not set, will default to provider default project id | string |
"" |
no |
Name | Description |
---|---|
provider_id | GCP identity provider pool configured for Enforce |