Skip to content

data-platform-hq/terraform-google-cloud-iam

Repository files navigation

Google Cloud Identity and Access Management Terraform module

Terraform module for creation of Google Cloud Identity and Access Management resources

Usage

Requirements

Name Version
terraform >= 1.0.0
google >= 4.84.0

Providers

Name Version
google >= 4.84.0

Modules

No modules.

Resources

Name Type
google_service_account.this resource
google_project_iam_member.this resource
google_project_iam_member.special_sa resource
google_project_iam_custom_role.this resource
google_service_account_key.this resource
google_project_iam_member.custom_role_member resource

Inputs

Name Description Type Default Required
project_id ID of the project in which the resources should be created. string n/a yes
env Variable to mark the environment of the resource (used to create services). string n/a yes
prefix Prefix for resource names string "" no
iam_entity IAM entities with roles and permissions. An "account_id" is used for username part of email for new service account
<account_id>@<project_id>.iam.gserviceaccount.com. If "special_sa" is true you can add role or permission for
Google-managed service accounts. If "roles" not empty the set of predefined GCP roles will be assigned to this
service account. If "generate_key" is true the json key for service account will be created.
object
({
account_id = string
display_name = optional(string)
special_sa = optional(bool)
roles = optional(set(string))
generate_key = optional(bool)
})
default = null
no
custom_role IAM custom role and permissions object
({
name = string
permissions = set(string)
})
default = null
no

Outputs

Name Description
service_account_email E-mail address of the service account.
service_account_key_private_key Service account private key in JSON format.

License

Apache 2 Licensed. For more information please see LICENSE