https://github.com/chainguard-dev/terraform-google-chainguard-account-association
Terraform module to connect Chainguard Enforce to your Google Cloud project
https://github.com/chainguard-dev/terraform-google-chainguard-account-association
Last synced: 3 months ago
JSON representation
Terraform module to connect Chainguard Enforce to your Google Cloud project
- Host: GitHub
- URL: https://github.com/chainguard-dev/terraform-google-chainguard-account-association
- Owner: chainguard-dev
- License: apache-2.0
- Created: 2022-07-18T20:28:05.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-13T14:03:14.000Z (12 months ago)
- Last Synced: 2025-01-13T11:23:47.368Z (4 months ago)
- Language: HCL
- Size: 48.8 KB
- Stars: 3
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Configure Chainguard service access.
Terraform module to connect Chainguard to your Google Cloud Platform project.
This module is needed to leverage certain service integrations from
[Chainguard](https://www.chainguard.dev).## Usage
This module binds a Chainguard IAM group to a GCP project.```terraform
data "google_project" "project" {
project_id = var.project_id # You can omit this to use provider-defaults
}module "chainguard-account-association" {
source = "chainguard-dev/chainguard-account-association/gcp"group_ids = [var.group_id]
project_id = data.google_project.project.project_id
}resource "chainguard_account_associations" "example" {
name = "example"
group = var.group_idgoogle {
project_id = data.google_project.project.project_id
project_number = data.google_project.project.number
}
}
```## How does it work?
Chainguard has an OIDC identity provider. This module configures your GCP
project to recognize that OIDC identity provider and allows certain tokens
to bind to certain IAM roles.## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| [google](#provider\_google) | n/a |
| [google-beta](#provider\_google-beta) | n/a |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [google-beta_google_iam_workload_identity_pool.chainguard_pool](https://registry.terraform.io/providers/hashicorp/google-beta/latest/docs/resources/google_iam_workload_identity_pool) | resource |
| [google-beta_google_iam_workload_identity_pool_provider.chainguard_provider](https://registry.terraform.io/providers/hashicorp/google-beta/latest/docs/resources/google_iam_workload_identity_pool_provider) | resource |
| [google_project_iam_member.catalog-syncer-push](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_iam_member) | resource |
| [google_project_service.iamcredentials-api](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_service) | resource |
| [google_service_account.catalog-syncer](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource |
| [google_service_account.chainguard_canary](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource |
| [google_service_account_iam_binding.allow_canary_impersonation](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account_iam_binding) | resource |
| [google_service_account_iam_binding.catalog-syncer-impersonation](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account_iam_binding) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [environment](#input\_environment) | Domain name of your Chainguard environment | `string` | `"enforce.dev"` | no |
| [group\_ids](#input\_group\_ids) | Chainguard IAM group IDs to bind your GCP project to. | `list(string)` | n/a | yes |
| [project\_id](#input\_project\_id) | GCP Project ID | `string` | n/a | yes |## Outputs
| Name | Description |
|------|-------------|
| [provider\_id](#output\_provider\_id) | GCP identity provider pool configured for Chainguard. |