cloud-foundation-fabric/modules
Ludovico Magnocavallo 92b71a5098
Refactor cloud run module to use optionals and support all features (#1293)
* refactor cloud run resource and variables

* vpc connector variables and resource

* refactor env variable, combine and fix env examples

* fix volume example

* fix traffic split example

* fix eventarc/pubsub example

* fix eventarc/audit log example

* fix SA examples, fix examples formatting

* refactor eventarc variable

* tfdoc

* add IAM to example

* add examples for revision annotations and serverless connector

* fix new examples

* remove legacy module tests

* blueprint tests

* Add tests to cloud-run module

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2023-04-01 14:06:29 +02:00
..
__experimental pin local provider (#1256) 2023-03-16 10:59:06 +00:00
api-gateway pin local provider (#1256) 2023-03-16 10:59:06 +00:00
apigee pin local provider (#1256) 2023-03-16 10:59:06 +00:00
artifact-registry pin local provider (#1256) 2023-03-16 10:59:06 +00:00
bigquery-dataset pin local provider (#1256) 2023-03-16 10:59:06 +00:00
bigtable-instance pin local provider (#1256) 2023-03-16 10:59:06 +00:00
billing-budget pin local provider (#1256) 2023-03-16 10:59:06 +00:00
binauthz pin local provider (#1256) 2023-03-16 10:59:06 +00:00
cloud-config-container fixes 2023-03-27 15:46:37 +02:00
cloud-function Use example testing instead custom test 2023-03-27 14:13:38 +02:00
cloud-identity-group pin local provider (#1256) 2023-03-16 10:59:06 +00:00
cloud-run Refactor cloud run module to use optionals and support all features (#1293) 2023-04-01 14:06:29 +02:00
cloudsql-instance pin local provider (#1256) 2023-03-16 10:59:06 +00:00
compute-mig pin local provider (#1256) 2023-03-16 10:59:06 +00:00
compute-vm pin local provider (#1256) 2023-03-16 10:59:06 +00:00
container-registry pin local provider (#1256) 2023-03-16 10:59:06 +00:00
data-catalog-policy-tag pin local provider (#1256) 2023-03-16 10:59:06 +00:00
datafusion pin local provider (#1256) 2023-03-16 10:59:06 +00:00
dataproc pin local provider (#1256) 2023-03-16 10:59:06 +00:00
dns pin local provider (#1256) 2023-03-16 10:59:06 +00:00
dns-response-policy DNS policy module fixes (#1278) 2023-03-26 18:39:07 +02:00
endpoints pin local provider (#1256) 2023-03-16 10:59:06 +00:00
folder pin local provider (#1256) 2023-03-16 10:59:06 +00:00
gcs pin local provider (#1256) 2023-03-16 10:59:06 +00:00
gke-cluster fixing tests and refactoring default 2023-03-30 12:47:39 +02:00
gke-hub removing deprecated field from gke-hub 2023-03-30 12:47:39 +02:00
gke-nodepool pin local provider (#1256) 2023-03-16 10:59:06 +00:00
iam-service-account pin local provider (#1256) 2023-03-16 10:59:06 +00:00
kms pin local provider (#1256) 2023-03-16 10:59:06 +00:00
logging-bucket pin local provider (#1256) 2023-03-16 10:59:06 +00:00
ncc-spoke-ra Improvements to NCC-RA spoke module. (#1267) 2023-03-21 07:07:44 +00:00
net-address pin local provider (#1256) 2023-03-16 10:59:06 +00:00
net-cloudnat pin local provider (#1256) 2023-03-16 10:59:06 +00:00
net-glb Add backend service names to outputs for net-glb and net-ilb-l7 (some things like (#1258) 2023-03-17 10:40:11 +00:00
net-ilb Fixes related to boot_disk in compute-vm module 2023-03-16 15:58:39 +01:00
net-ilb-l7 Add backend service names to outputs for net-glb and net-ilb-l7 (some things like (#1258) 2023-03-17 10:40:11 +00:00
net-interconnect-attachment-direct pin local provider (#1256) 2023-03-16 10:59:06 +00:00
net-vpc Add support for `iam_additive` and simplify factory interface in net VPC module (#1259) 2023-03-17 10:12:34 +00:00
net-vpc-firewall pin local provider (#1256) 2023-03-16 10:59:06 +00:00
net-vpc-firewall-policy change target_vpcs variable to support dynamic values (#1255) 2023-03-17 07:14:09 +00:00
net-vpc-peering pin local provider (#1256) 2023-03-16 10:59:06 +00:00
net-vpn-dynamic pin local provider (#1256) 2023-03-16 10:59:06 +00:00
net-vpn-ha add static gateway id to outputs (#1270) 2023-03-21 18:08:45 +01:00
net-vpn-static pin local provider (#1256) 2023-03-16 10:59:06 +00:00
organization pin local provider (#1256) 2023-03-16 10:59:06 +00:00
project Add boilerplate 2023-03-30 09:36:14 +03:00
projects-data-source pin local provider (#1256) 2023-03-16 10:59:06 +00:00
pubsub pin local provider (#1256) 2023-03-16 10:59:06 +00:00
secret-manager pin local provider (#1256) 2023-03-16 10:59:06 +00:00
service-directory pin local provider (#1256) 2023-03-16 10:59:06 +00:00
source-repository pin local provider (#1256) 2023-03-16 10:59:06 +00:00
vpc-sc pin local provider (#1256) 2023-03-16 10:59:06 +00:00
README.md DNS Response Policy module (#1276) 2023-03-26 17:42:57 +02: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