5af022a3ee
* Invert the list for role/member mapping so that member is the key * Add iam_additive_bindings to replace iam_additive_members and iam_additive_roles, change test suite accordingly * attribute 'mode' added as it would error without * Update Readme to reflect the new variable iam_additive_bindings * test branch access * iam_additive_bindings to replace iam_additive roles and iam_additive_members * update foundation samples to new additive bindings format * set bq dataset options in foundation environments to allow destroying * trap exceptions raised during destroy in project module Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com> |
||
---|---|---|
.ci | ||
data-solutions | ||
foundations | ||
infrastructure | ||
modules | ||
tests | ||
tools/tfdoc | ||
.gitignore | ||
CHANGELOG.md | ||
LICENSE | ||
README.md |
README.md
Terraform Examples and Modules for Google Cloud
This repository provides end-to-end examples and a suite of Terraform modules for Google Cloud, which support different use cases:
- starter kits used to bootstrap real-world cloud foundations and infrastructure
- reference examples used to deep dive on network patterns or product features
- composable modules that support quick prototyping and testing
- a comprehensive source of lean modules that lend themselves well to changes
The whole repository is meant to be cloned as a single unit, and then forked into separate owned repositories to seed production usage, or used as-is and periodically updated as a complete toolkit for prototyping.
Both the examples and modules require some measure of Terraform skills to be used effectively. If you are looking for a feature-rich black box to manage project or product creation with minimal specific skills, you might be better served by the Cloud Foundation Toolkit suite of modules.
End-to-end examples
The examples in this repository are split in two main sections: foundational examples that bootstrap the organizational hierarchy and automation prerequisites, and infrastructure scenarios that implement core networking patterns or features.
Currently available examples:
- foundations - single level hierarchy (environments), multiple level hierarchy (business units + environments)
- infrastructure - hub and spoke via peering, hub and spoke via VPN, DNS and Google Private Access for on-premises, Shared VPC with GKE support
- data solutions - GCE/GCS CMEK via centralized Cloud KMS, Cloud Storage to Bigquery with Cloud Dataflow
For more information see the README files in the foundations, infrastructure and data solutions folders.
Modules
The suite of modules in this repository are designed for rapid composition and reuse, and to be reasonably simple and readable so that they can be forked and changed where use of third party code and sources is not allowed.
All modules share a similar interface where each module tries to stay close to the underlying provider resources, support IAM together with resource creation and modification, offer the option of creating multiple resources where it makes sense (eg not for projects), and be completely free of side-effects (eg no external commands).
The current list of modules supports most of the core foundational and networking components used to design end-to-end infrastructure, with more modules in active development for specialized compute, security, and data scenarios.
Currently available modules:
- foundational - folders, log sinks, organization, project, service accounts
- networking - VPC, VPC firewall, VPC peering, VPN static, VPN dynamic, VPN HA, NAT, address reservation, DNS, L4 ILB, Service Directory, Cloud Endpoints
- compute - VM/VM group, MIG, GKE cluster, GKE nodepool, COS container (coredns, mysql, onprem, squid)
- data - GCS, BigQuery dataset, Pub/Sub, Datafusion, Bigtable instance
- development - Cloud Source Repository, Container Registry, Artifact Registry
- security - KMS, SecretManager
- serverless - Cloud Functions
For more information and usage examples see each module's README file.