Git Product home page Git Product logo

terraform-google-folders's Introduction

terraform-google-folders

This module helps create several folders under the same parent, enforcing consistent permissions, and with a common naming convention.

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

  • Create folders with the provided names
  • Assign the defined permissions to the provided list of users or groups.

Compatibility

This module is meant for use with Terraform 0.12. If you haven't upgraded and need a Terraform 0.11.x-compatible version of this module, the last released version intended for Terraform 0.11.x is 0.1.0.

Usage

Basic usage of this module is as follows:

module "folders" {
  source  = "terraform-google-modules/folders/google"
  version = "~> 0.1"

  parent_id   = "65552901371"
  parent_type = "folder"

  names = [
    "dev",
    "staging",
    "production",
  ]

  set_roles = true

  per_folder_admins = [
    "group:[email protected]",
    "group:[email protected]",
    "group:[email protected]",
  ]

  all_folder_admins = [
    "group:[email protected]",
  ]
}

Functional examples are included in the examples directory.

Inputs

Name Description Type Default Required
all_folder_admins List of IAM-style members that will get the extended permissions across all the folders. list <list> no
folder_admin_roles List of roles that will be applied to per folder owners on their respective folder. list <list> no
names Folder names. list <list> no
parent_id Id of the resource under which the folder will be placed. string n/a yes
parent_type Type of the parent reosurce, defaults to organization. string "organization" no
per_folder_admins List of IAM-style members per folder who will get extended permissions. list <list> no
prefix Optional prefix to enforce uniqueness of folder names. string "" no
set_roles Set roles to actors passed in role_members variable. string "false" no

Outputs

Name Description
ids Map of name => folder resource id.
names Map of name => folder resource name.

Requirements

These sections describe requirements for using this module.

Software

The following dependencies must be available:

Service Account

A service account with the following roles must be used to provision the resources of this module:

  • Folder Creator: roles/resourcemanager.folderCreator

The Project Factory module and the IAM module may be used in combination to provision a service account with the necessary roles applied.

APIs

A project with the following APIs enabled must be used to host the resources of this module:

  • Cloud Resource Manager API: cloudresourcemanager.googleapis.com

The Project Factory module can be used to provision a project with the necessary APIs enabled.

Contributing

Refer to the contribution guidelines for information on contributing to this module.

terraform-google-folders's People

Contributors

aaron-lane avatar apsureda avatar ingwarr avatar morgante 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.