cloud-foundation-fabric/modules
Ludovico Magnocavallo 725f7effce
Initial MVP for CI/CD (#608)
* preliminary support for wif in stage 0

* IAM wif role

* IAM wif role TODO

* add support for external SA IAM to SA module

* add name output to SA module

* separate cicd SA

* tfdoc

* GITLAB principal (untested)

* make GCS name output static

* outputs bucket

* fix stage 1 test

* tweak outputs

* tfdoc

* move wif_pool to automation variable

* add support for top-level and repository providers

* add missing boilerplate

* fix branchless principal

* initial workflow

* symlink provider template in stages

* remove service accounts from stage 0 cicd tfvars

* add cicd interface variable to resman stage

* fix cicd variable in resman stage

* better condition on outputs_location

* fix last change

* change outputs_location type

* revert outputs_location change

* split outputs in stage 0

* update ci/cd temporary notes

* rename additive IAM resource in SA module

* split outputs in stage 1

* remove unused locals

* fix stage 1 tests

* tfdoc

* Upload action files to outputs_bucket

* Fix tests and README

* rename template, streamline outputs

* local templates and gcs output for all stage 2

* add workflows to local output files

* Use lowercase WIF providers everywhere

* Bring back suffix for workflow files

* Remove unused files

* Update READMEs

* preliminary CI/CD implementation for stage 1

* fix stage 1

* stage 1 cicd

* tfdoc

* fix tests

* readme and links for cicd and wif

* refactor wif providers

* refactor cicd for stage 1

* fix stage 1

* wif org policies

* split identity provider configuration from cicd

* add type attribute to cicd repositories

* valid cicd repositories have a workflow template

* refactor stage 01

* fix stage 01 tests

* minimal CI/CD documentation

* better check_links error reporting

* fix links

* Added Gitlab specific configurations

Set the default issuer_uri for Gitlab. Added allowed audiences to OIDC configuration.

* Fixed TF formatting in identity providers.

* Changing identity provider audience to null

Changing identity provider audience to default to null.

* add instructions for renaming workflows

* address Julio's comments

Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: alexmeissner <alexmeissner@google.com>
2022-04-12 08:17:27 +02:00
..
__experimental Update main.tf 2022-02-01 19:02:15 +01:00
api-gateway API gateway module and example that creates a multi-region deployment for API gateway 2022-02-22 12:00:44 +01:00
apigee-organization Add billing_type for Apigee Organization Module 2022-03-31 08:47:34 +02:00
apigee-x-instance Allow multiple CIDR blocks in the ip_range parameter and rely on the Google API for validation 2022-04-07 15:08:24 +02:00
artifact-registry Add periods at the end of each description field where missing (#478) 2022-01-31 10:45:34 +01:00
bigquery-dataset Update README for bigquery module (#569) 2022-03-23 16:34:45 +01:00
bigtable-instance Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
billing-budget Add periods at the end of each description field where missing (#478) 2022-01-31 10:45:34 +01:00
cloud-config-container Optionally turn off gcplogs driver in COS examples (#592) 2022-03-24 16:17:24 +01:00
cloud-function Use uniform access on Cloud Functions buckets. (#596) 2022-03-29 07:42:15 +02:00
cloud-identity-group Add periods at the end of each description field where missing (#478) 2022-01-31 10:45:34 +01:00
cloud-run Add periods at the end of each description field where missing (#478) 2022-01-31 10:45:34 +01:00
cloudsql-instance CloudSQL-instance: Fixed terraform change detection when backup is disabled. (#615) 2022-04-10 12:33:00 +02:00
compute-mig Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
compute-vm Add support for resource management tags and tag bindings (#552) 2022-02-20 11:14:18 +01:00
container-registry Add periods at the end of each description field where missing (#478) 2022-01-31 10:45:34 +01:00
data-catalog-policy-tag Fix data catalog policy tag output. 2022-03-31 10:36:47 +02:00
datafusion Add periods at the end of each description field where missing (#478) 2022-01-31 10:45:34 +01:00
dns Fix broken link (#555) 2022-02-24 06:21:43 +00:00
endpoints Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
folder Add support for IAM additive to folder module (#580) 2022-03-11 09:46:32 +01:00
folders-unit Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
gcs Initial MVP for CI/CD (#608) 2022-04-12 08:17:27 +02:00
gke-cluster Update README.md 2022-03-14 17:12:56 +01:00
gke-hub Add GKE Hub module to fabric (#540) 2022-02-28 12:40:48 +01:00
gke-nodepool Add periods at the end of each description field where missing (#478) 2022-01-31 10:45:34 +01:00
iam-service-account Initial MVP for CI/CD (#608) 2022-04-12 08:17:27 +02:00
iot-core Simplify link checker and recurse into all elements with children (#599) 2022-03-28 16:54:06 +02:00
kms Add support for resource management tags and tag bindings (#552) 2022-02-20 11:14:18 +01:00
logging-bucket Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
naming-convention Link vars and outputs from README 2022-01-22 14:15:16 +01:00
net-address Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
net-cloudnat Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
net-glb [#597] Fix link_checker 2022-03-28 09:43:00 +02:00
net-ilb Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
net-ilb-l7 [#593] Add HTTP ILB module (net-ilb-l7) 2022-04-05 08:58:55 +02:00
net-interconnect-attachment-direct Add periods at the end of each description field where missing (#478) 2022-01-31 10:45:34 +01:00
net-vpc fix duplicate locals in net-vpc (#587) 2022-03-17 17:16:31 +01:00
net-vpc-firewall FAST: add 02-networking-peering stage. (#561) 2022-02-28 12:27:27 +01:00
net-vpc-peering Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
net-vpn-dynamic Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
net-vpn-ha Update README.md 2022-03-01 08:49:21 +01:00
net-vpn-static Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
organization Add support for resource management tags and tag bindings (#552) 2022-02-20 11:14:18 +01:00
project Fix missing service networking identity in project, PSA (#585) 2022-03-17 14:29:28 +01:00
projects-data-source Skip tests for projects-data-source module 2022-03-08 09:26:47 +01:00
pubsub Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
secret-manager Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
service-directory Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
source-repository Align tftest syntax with tdoc 2022-01-28 21:34:15 +01:00
vpc-sc Update README.md 2022-02-13 16:14:24 +01:00
README.md Add module for retrieving all projects/folders under a specific parent (recursively). 2022-03-07 22:02:18 +01:00

README.md

Terraform modules suite for Google Cloud

The modules collected in this folder are designed as a suite: they are meant to be composed together, and are designed to be forked and modified where use of third party code and sources is not allowed.

Modules try to stay close to the low level provider resources they encapsulate, and they all share a similar interface that combines management of one resource or set or resources, and the corresponding IAM bindings.

Authoritative IAM bindings are primarily used (e.g. google_storage_bucket_iam_binding for GCS buckets) so that each module is authoritative for specific roles on the resources it manages, and can neutralize or reconcile IAM changes made elsewhere.

Specific modules also offer support for non-authoritative bindings (e.g. google_storage_bucket_iam_member for service accounts), to allow granular permission management on resources that they don't manage directly.

These modules are not necessarily backward compatible. Changes breaking compatibility in modules are marked by major releases (but not all major releases contain breaking changes). Please be mindful when upgrading Fabric modules in existing Terraform setups, and always try to use versioned references in module sources so you can easily revert back to a previous version. Since the introduction of the moved block in Terraform we try to use it whenever possible to make updates non-breaking, but that does not cover all changes we might need to make.

These modules are used in the examples included in this repository. If you are using any of those examples in your own Terraform configuration, make sure that you are using the same version for all the modules, and switch module sources to GitHub format using references. The recommended approach to working with Fabric modules is the following:

  • Fork the repository and own the fork. This will allow you to:

    • Evolve the existing modules.
    • Create your own modules.
    • Sync from the upstream repository to get all the updates.
  • Use GitHub sources with refs to reference the modules. See an example below:

    module "project" {
        source              = "github.com/GoogleCloudPlatform/cloud-foundation-fabric//modules/project?ref=v13.0.0"
        name                = "my-project"
        billing_account     = "123456-123456-123456"
        parent              = "organizations/123456"
    }
    

Foundational modules

Networking modules

Compute/Container

Data

Development

Security

Serverless