A Terraform module which helps you create Google Service Accounts.
module "service_account" {
source = "blackbird-cloud/service-account/google"
version = "~> 1"
account_id = "my-app"
display_name = "My service account."
project = "my-project"
workload_identity_user = true
kubernetes_namespace = "monitoring"
kubernetes_service_account_name = "my-app"
project_iam_member_roles = [
{
role = "roles/pubsub.publisher",
project = "my-project",
conditions = [{
title = "title"
description = "description"
expression = "my-exp"
}]
},
{
role = "roles/datastore.owner",
project = "my-other-project"
},
]
service_account_iam_member_roles = []
}
Name | Version |
---|---|
terraform | >= 1 |
>= 4 |
Name | Version |
---|---|
>= 4 |
Name | Type |
---|---|
google_project_iam_member.roles | resource |
google_service_account.sa | resource |
google_service_account_iam_member.roles | resource |
google_service_account_iam_member.workload | resource |
google_storage_bucket_iam_member.default | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
account_id | ID of the app, lowercase, max 30 chars. | string |
n/a | yes |
description | (Optional) A text description of the service account. Must be less than or equal to 256 UTF-8 bytes. | string |
null |
no |
display_name | Display name of the app. | string |
n/a | yes |
kubernetes_namespace | Kubernetes namespace that hosts the Kubernetes Service Account attached to this Google Service Account. | string |
null |
no |
kubernetes_service_account_name | Name of the Kubernetes Service Account to attach to this Google Service Account. | string |
null |
no |
project | Google Project ID. | string |
n/a | yes |
project_iam_member_roles | List of project IAM member roles to attach to the Service Account. | list(object({ |
[] |
no |
service_account_iam_member_roles | List of project IAM member roles to attach to the Service Account. | list(object({ |
[] |
no |
storage_bucket_iam_members | List of Storage bucket IAM member roles to attach to the Service Account. | list(object({ |
[] |
no |
workload_identity_user | Wether to attach the roles/iam.workloadIdentityUser Service Account IAM member to the Google Service Account | bool |
false |
no |
Name | Description |
---|---|
service_account | The created Google Service Account. |
We are Blackbird Cloud, Amsterdam based cloud consultancy, and cloud management service provider. We help companies build secure, cost efficient, and scale-able solutions.
Checkout our other 👉 terraform modules
Copyright © 2017-2024 Blackbird Cloud