Giter Club home page Giter Club logo

terraform-google-service-account's Introduction

Coalfire

Google Cloud Service Account Terraform Module

Description

This module allows easy creation of one or more service accounts, and granting them basic roles. Coalfire has tested this module with Terraform version 1.5.0 and the Hashicorp Google provider versions 4.70 - 5.0.

FedRAMP Compliance: High

Resource List

The resources/services/activations/deletions that this module will create/trigger are:

  • one or more service accounts
  • optional project-level IAM role bindings for each service account
  • one optional billing IAM role binding per service account, at the organization or billing account level
  • two optional organization-level IAM bindings per service account, to enable the service accounts to create and manage Shared VPC networks
  • one optional service account key per service account

Dependencies

  • GCP Project

Usage

module "service-account" {
    source = "github.com/Coalfire-CF/terraform-gcp-service-account"

    # Required 
    project_id = "your-project-id"
    names = ["service-account-name"]

    # Optional
    prefix = "sa"
    display_name = "ServiceAccount1"
    description = "description-of-service-account"
    project_roles = [
        "<your-project-id>=>roles/secretmanager.secretAccessor",
        "<your-project-id>=>roles/source.reader",
    ]
}

Requirements

No requirements.

Providers

Name Version
google n/a

Modules

No modules.

Resources

Name Type
google_billing_account_iam_member.billing_user resource
google_organization_iam_member.billing_user resource
google_organization_iam_member.organization_viewer resource
google_organization_iam_member.xpn_admin resource
google_project_iam_member.project-roles resource
google_service_account.service_accounts resource
google_service_account_key.keys resource

Inputs

Name Description Type Default Required
billing_account_id If assigning billing role, specificy a billing account (default is to assign at the organizational level). string "" no
description Default description of the created service accounts (defaults to no description) string "" no
descriptions List of descriptions for the created service accounts (elements default to the value of description) list(string) [] no
display_name Display names of the created service accounts (defaults to 'Terraform-managed service account') string "Terraform-managed service account" no
generate_keys Generate keys for service accounts. bool false no
grant_billing_role Grant billing user role. bool false no
grant_xpn_roles Grant roles for shared VPC management. bool true no
names Names of the service accounts to create. list(string) [] no
org_id Id of the organization for org-level roles. string "" no
prefix Prefix applied to service account names. string "sa" no
project_id Project id where service account will be created. string n/a yes
project_roles Common roles to apply to all service accounts, project=>role as elements. list(string) [] no

Outputs

Name Description
email Service account email (for single use).
emails Service account emails by name.
emails_list Service account emails as list.
iam_email IAM-format service account email (for single use).
iam_emails IAM-format service account emails by name.
iam_emails_list IAM-format service account emails as list.
key Service account key (for single use).
keys Map of service account keys.
service_account Service account resource (for single use).
service_accounts Service account resources as list.
service_accounts_map Service account resources by name.

terraform-google-service-account's People

Contributors

douglas-f avatar github-actions[bot] avatar jamesmaddox-cf avatar mscribellito avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.