Commit Graph

845 Commits

Author SHA1 Message Date
Aleksandr Averbukh 931af3e943 Fix subnet logging test 2020-09-01 14:18:37 +02:00
Ludovico Magnocavallo 088a7c569f
Quota monitor end to end example (#125)
* working example, README missing

* add missing boilerplate to outputs file

* README

* fix dynamic resources in IAM binding for_each

* add tests

* update input/output table in README

* add example to READMEs
2020-08-29 11:29:46 +02:00
Julio Castillo 5ae489f50d
Add alias IP support in `compute-vm` (#127)
* Add alias IP support in `compute-vm`

* Fix tests

* add end to end tests for data solutions examples and fix example errors

* update changelog

* add missing boilerplate

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2020-08-29 10:12:30 +02:00
Ludovico Magnocavallo f0ba47511c add tests for cloud operations examples 2020-08-17 12:29:13 +02:00
Ludovico Magnocavallo f62b9362a2
ILB for appliances example (#122)
* rename infrastructure folder to networking

* example WIP: VPCs

* move ip forwarding to its own variable in compute-vm module

* add per-instance metadata support to compute-vm module

* ipip tunnels on linux savepoint

* simple multinic gateways example

* remove stale files

* resolve conflicts

* update diagram

* rename folder

* use a template for gw cloud config, rename some resources and files

* Update README.md

* Update README.md

* add basic plan tests for all networking e2e examples

* fix test for foundations/environments e2e example

* fix shared vpc e2 example count error in gke node service account permissions

* use module path for assets in onprem e2e example

* use project id from module in ilb e2e example

* add mising boilerplates in tests

* run examples tests in ci

* update module's README

* rename ilb example

* Update README.md

* fix rp_filter configuration

* README

* Update README.md

* Update README.md

* Update README.md

* update CHANGELOG

* update CHANGELOG

* Update README.md
2020-08-15 10:12:43 +02:00
Ludovico Magnocavallo dce2fca740
Support multiple zones in compute-vm module (#114)
* support multiple zones in compute-vm module

* update compute-vm variables in end-to-end examples

* update README examples
2020-07-18 06:39:14 +02:00
Ludovico Magnocavallo 87597a2a5f test interfaces in compute_vm test 2020-07-10 16:56:28 +02:00
vanessabodard-voi 5af022a3ee
refactor IAM additive bindings variables (#103)
* 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>
2020-07-02 08:28:26 +02:00
Lorenzo Caggioni cb6258ee9f Merge branch 'gcs-to-bq' of https://github.com/terraform-google-modules/cloud-foundation-fabric into gcs-to-bq
merge
2020-06-30 18:02:17 +02:00
Lorenzo Caggioni 6bc59c602a Fix error in tests 2020-06-30 17:58:51 +02:00
Ludovico Magnocavallo ec765857cb
Make project creation optional in project module (#99)
* make project creation optional in project module

* add variable to optionally configure project activation

* add explicit dependency on custom roles to additive bindings

* make parent variable optional

* add test for null parent

* fix custom roles output
2020-06-25 10:04:57 +02:00
Ludovico Magnocavallo ae2e4dc3ad interpolate vpc name in routes 2020-06-12 12:07:28 +02:00
Ludovico Magnocavallo 25d3b2ebdd
add iam support to compute-vm module (#95) 2020-06-10 07:55:18 +02:00
lcaggio 1b450fe444
Add Cloud KMS support to GCS module (#87)
* Add support to Cloud KMS

* Fixes

* Fix tests

* Fix tests

* - change variable name to be consistent with BQ module
 - remove output, not needed
 - change string default value to null

* use locals to pre-populate kms key variable for all names

* rename kms variable, fix prefix check in locals

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2020-06-05 21:59:34 +02:00
Ludovico Magnocavallo 4dd927d8d7
KMS module refactoring (#85)
* first rewrite, untested

* validation fixes

* fix errors, rename variables, improve README, tested

* minimal kms module test

* README tweaks
2020-06-03 08:43:10 +02:00
Ludovico Magnocavallo aaa80bb49b refactor service account module outputs 2020-05-31 09:39:03 +02:00
Ludovico Magnocavallo fa29a8e26f
Fix health checks in net-ilb and compute-mig modules (#69)
* fix health checks in ilb module

* fix health check in compute-mig and add basic tests
2020-05-07 07:37:15 +02:00
Roberto Jung Drebes 14ec791556
subnets with the same name in different regions (#67)
* support for subnets with the same name in different regions

* fix net-vpc tests
2020-05-04 08:25:53 +02:00
Ludovico Magnocavallo 98f6b30197
Allow specifying subnet name in net-vpc module (#64)
* add name attribute to net-vpc subnet variable

* update vpc variables in infra examples

* fix old project output used in shared vpc infra example
2020-04-30 19:29:39 +02:00
Ludovico Magnocavallo be3c461cf9
MIG and ILB modules (#61)
* preliminary net-ilb module, untested

* outputs

* fix basic mistakes, add initial test

* test variable defaults on all resources

* README stub

* net-ilb module fixes and example

* compute-vm module fixes

* fix test

* remove mig from compute vm module

* split out mig from compute-vm (untested)

* split out mig from compute-vm (untested)

* fix mig versions

* small fixes and examples for mig module

* Update README.md

* Update README.md

* switch mig to using a single  variable for both region and zone
2020-04-30 17:08:18 +02:00
Ludovico Magnocavallo a280dd880d
Add support for org policies to folder and project modules (#58)
* modules/folders: add support for org policies

* update README

* update cloud config modules READMEs

* modules/project: add org policies
2020-04-08 14:54:49 +02:00
Ludovico Magnocavallo 74e0035f4a
Organization module (#57)
* modules/org: first shot

* modules/org: README

* update changelog
2020-04-07 18:47:07 +02:00
Ludovico Magnocavallo 409407ae7d
Refactor the onprem module (#55)
* move onprem to cos-container

* compute-vm: fix external addresses output

* folders-unit: update README

* update onprem module, add new fields to cos-container test instance

* coredns: process corefile as a template

* onprem: fixes

* modules/cos-container: rename to cloud-config-container infra/onprem: remove test output

* Update README.md

* update CHANGELOG for v1.1.0

* fix cloud config modules tests

* Update main.tf

* add container nginx module
2020-04-06 16:27:13 +02:00
Ludovico Magnocavallo c486bfc66f
Merge development branch (#44)
* VPN-HA module initial commit

* Added readme for net-vpn-ha module

* Update readme, add simple description

* Merge new modules list and environments foundation example (#30)

* gke-cluster

* net-vpc module and tests

* add TODO to net-vpc module

* add minimal README files with input/output variables to gke and net-vpc modules

* BigQuery Module (#24)

* Bigquery Module

* Added README file

* Added type hints

* gke-cluster

* net-vpc module and tests

* add TODO to net-vpc module

* add minimal README files with input/output variables to gke and net-vpc modules

* BigQuery Module (#24)

* Bigquery Module

* Added README file

* Added type hints

* GCS module

* net vpc module: improve secondary range outputs

* net vpc module: add serve project registration

* project module

* move bigquery module to not-ready folder

* folders module

* rename project module's iam variables

* slight tweak to folder module outputs

* gcs module

* simplify net-vpc module variables

* fix module tests configurations, fix net-vpc module tests

* add pydoc utility

* add/update module READMEs

* add/update module READMEs

* add/update module READMEs

* improve variable type summary generation in tfdoc

* tfdoc: add support for replacing doc in README.md files

* improve module READMEs

* net-vpc-firewall module

* add support for sensitive output attribute in tfdoc

* remove empty function from tfdoc

* render variable type as code in tfdoc

* update module READMEs

* net address module

* net cloudnat module

* remove redundant variable from net-cloudnat module

* vpc module: add support for peering, use network name as subnet name prefix

* net-vpn-static module

* net-vpn-static module README

* net-vpn-static module README

* tfdoc: fix error on undeclared variable type

* dns module

* set version for all modules

* kms module (untested)

* change kms key self links output to map, fix gcs and kms iam variable descriptions

* fix kms module

* update kms module readme

* simplify local iam pairs in modules

* service accounts module (unfinished)

* work on service accounts module

* project module: add gcr service account

* project module: update outputs in README

* first working version of the iam service accounts module

* iam service accounts module: extra checks in locals

* modules/net-cloudnat: reorder variables

* modules/net-vpn-dynamic: initial import (untested)

* modules/net-vpn-dynamic: first working version

* modules/net-vpn-dynamic: add outputs for auto-created router

* modules/net-vpn-dynamic: update README

* modules/net-[vpn,cloudnat]: clean up variable,s remove prefix

* modules/net-vpn-dynamic: add advertisement configuration to tunnel bgp peer, refactor variables

* tfdoc: add tooltips for variable types and defaults

* modules: update README variables and outputs

* tfdoc: improve variable default rendering

* modules: update README variables and outputs

* modules/net-vpc: minimal output refactoring

* modules/vm-cos: initial import, base resources working, no outputs

* modules/vm-cos: add variable descriptions

* tfdoc: fix parsing in type and default blocks

* modules/vm-cos: fix README

* tfdoc: fix parsing in type and default blocks

* modules/vm-cos: fix README

* modules/compute-vm: initial working import (not fully tested)

* modules/vm-cos: move to not-ready

* tfdoc: fix variable defaults formatting

* modules: update README files with tfdoc fixes

* modules: add initial examples

* gke-nodepool: initial import, untested

* gke nodepool: add README, fix location variable, set node count default to 1

* gke cluster: fix private cluster variables

* gke nodepool: fix README title

* gke cluster: add output for cluster location

* gke nodepool: add missing variables for project id and cluster name, remove default from location variable, fix gke version assignment

* gke nodepool: update README

* net-cloudnat: fix router name when creating default router

* fix variables used for address and router optional creation

* vpn dynamic: fix README

* modules/net-vpn-dynamic: fix router name output

* modules/compute-vm: remove unused variable

* modules/compute-vm-cos-coredns: initial import

* Update foundations modules versions (#26)

* update foundations modules versions

* update Terraform version to v0.12.19 in CI test configuration

* backport tfdoc from Ludo's branch (#27)

* Update docs using tfdoc format (#28)

* update README files

* set all types on variables

* foundations/environments: move log filter to a variable, use org for xpn by default

* foundations/environments: do not use liens by default

* modules/ntp-vpc: better shared_vpc_host variable description

* modules/logging-sinks: initial version

* modules/logging-sinks: streamline options in sinks variable

* modules/compute-vm-cos-coredns: add support for additional files

* modules/folders: rename from 'folder'

* modules/logging-sinks: fix circular dependencies and improve variables

* modules/project: remove extra variable

* modules/bigquery: new module with dataset support only

* foundations/environments: refactor using local modules

* modules/bigquery: better variables, README description and example

* modules: fix a few READMEs

Co-authored-by: Julio Castillo <juliocc@gmail.com>

* modules/net-vpc: README description and examples

* modules/net-vpc: tweak README description and examples

* modules/net-vpc: tweak README description and examples

* modules/net-vpc-firewall: change tag-based rule default ranges, improve README examples and description

* modules/compute-vm: README changes

* modules/compute-vm: use an object for the service account variable, update README

* modules/compute-vm: update README variables table

* modules/compute-vm: add TODO list to README

* modules/compute-vm: add TODO list to README

* modules/compute-vm: add outputs for service account

* modules/net-cloudnat: README

* modules/net-cloudnat: README

* modules/net-cloudnat: add router_create variable

* modules/compute-vm: simplify service account variables

* modules/net-vpn-dynamic: fix README example, use local secret for both empty string and null

* modules/net-vpn-dynamic: improve README example

* modules/gke-cluster: minimal README tweaks

* modules/kms: fix ephemeral keys resource name

* modules/iam-service-accounts: add storage roles

* modules/gke-nodepool: fix node default scopes

* New project variable to prevent deletion of default network (#32)

* New project variable to prevent deletion of default network

This is a workaround to fix
terraform-google-modules/cloud-foundation-fabric#31 while the GCP
terraform provider is fixed

* Add TODOs to remove workarounds in the project module

* Fix Cloud Build files

* modules/gke-nodepool: add monitoring scope to defaults

* modules/iam-service-accounts: add support for IAM bindings onthe service accounts

* playground module in sandbox, remove not ready modules

* Fix ci configurations in development branch (#33)

* try fixing ci confgurations

* add exclusion match to ci boilerplate check

* add skip boilerplate comment to compute-vm-cos-coredns template fragment

* modules/gke-cluster: fix boilerplate in outputs

* Simplify tests, re-enable CI

* add instance group support to compute-vm, start tests refactoring

* modules/compute-vm: group fixes, tests

* modules/compute-vm: minimal test beautification

* simplify top-level pytest fixture

* modules/dns: tests and minor tweaks

* fix missing boilerplate in tests

* re-add requirements file to tests folder

* re-enable tests in ci build configuration

* Folder module tests and fixes (#38)

* folder tests wip

* modules/folders: tests and tweaks

* update folders and compute-vm README files

* modules/gcs: tests and minor tweaks

* Create README.md

* Update README.md

* Update README.md

* Update README.md

* Added docker image for strongSwan

* Add support for routes and tests to net-vpc module (#39)

* modules/net-vpc: add routes (untested)

* initial tests

* modules/net-vpc: add test for flow logs

* modules/net-vpc: split tests into two separate files

* modules/net-vpc: routes test

* modules/net-vpc: test routes

* Add support for Terraform plugin cache in ci test build file (#40)

* add Terraform plugin caching to test ci build configuration

* fix mkdir in test build configuration

* trigger test check

* Refactor dynamic vpn configuration for on-prem-in-a-box module

* Fix dynamic vpn for onprem-in-a-box module

* Migrate Shared VPC example to local modules (#41)

* wip

* wip

* validated, untested

* modules/compute-vm: make service account email in locals resilient to destroy

* modules/project: make project id output depend on iam roles

* fixes

* shared-vpc tweaks

* update diagram

* update README input output tables

* modules/compute-vm: add service account IAM email output

* move GKE service account roles at the project level, add GCE service account roles

* update diagram and README

* modules/project: add extra output for IAM-dependent project id

* update modules READMEs

* minor tweaks

* modules/compute-vm: fix service account output

* remove static address from NAT

* fix container service agent binding dependency

* rename shared vpc

* Update README.md

* Update README.md

* Add static vpn gw to on-prem-in-a-box module

* Refactor hub and spoke to use new modules (#42)

* modules/compute-vm: saner defaults for service account scopes

* hub and spoke refactor, docs still missing

* complete hub and spoke

* Update README.md

* Add toolbox docker container, fix gw routing to the internet

* Add DNS Hybrid connectivity parameters

* Fix onprem dns zone for the static vpn configuration

* Added readme.md for on-prem module

* Add new line at the end of the files

* Add boilerplate for cloudbuild config files

* fix boilerplate in strongswan shell script

* Update README.md

* include missing file to fix merge conflict

* remove missing file to fix merge conflict

* include missing file to fix merge conflict (again)

* remove content from spurious file used to avoid merge conflicts

* Add net-vpc-peering module

* Initial commit for hub-and-spoke-peering infrastructure example

* Fix typos in infrastructure/ READMEs

* remove stale file

* use larger resolution version of hub and spoke diagram

* Update README.md

* Update hub-and-spoke-peerings example to use internal modules

* Add initial project tests (#46)

* modules/project: make prefix optional

* initial project module tests

* modules/project: use null for unset parent

* modules/dns: backport PR6 from the CFT dns module

* Add testing resources including on-prem-in-a-box to hub-and-spoke-peerings example

* Fix firewall rules to allow connectivity, switch to custom route advertisement for onprem -> spokes connectivity

* Move locals out of main.tf

* remove ssh tag from compute-vm variable default

* Add ssh tag to the test vms

* Update README.md

* Update README.md

* Update README.md

* Hub and spoke peering changes (#48)

* rename hub-and-spoke-vpn

* add ssh tag to shared-vpc-gke instance

* rename and rework hub and spoke peering

* fix test requirements

* align hub and spoke peering with module contents

* diagram

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* minimal fixes to onprem examples variable files

* onprem example stub, missing DNS zones and private.googleapis records onprem

* add missing boilerplate

* Update README.md

* Update README.md

* infra/onprem: add test instance and minimal outputs

* add DNS modules and resource

* infra/onprem: diagram and initial README

* minor changes to onprem module and example (#49)

* update toolbox image

* infra/onprem: add zone for private access, add metadata domain to onprem dns

* infra/onprem: onnprem service account, add testing procedure in README

* Update README.md

* infra/onprem: remove extra variable

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* infra/onprem: rename forwarder address variable

* Update README:

Added explicit --tunnel-through-iap for gcloud compute ssh commands

* Update top-level and section READMEs (#50)

* top-level README WIP

* rewrite top-level README

* change top-level README title

* remove initial quote in top-level README

* Update README.md

* Update README.md

* Update README.md

* foundations README

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* add experimental scheduled cloud function module

* scheduled cloud function module: allow disabling schedule

* business-units foundation example (#52)

* Added folder-units module.

* Business units example update (WIP)

* Update all BU modules to internal ones

* Refactoring business-units example, add billing and org IAM handling

* update projects tests for new iam additive naming

* update project README for new iam additive naming

* streamline bu example and module (#53)

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>

* align net-vpn-ha interface with the other vpn modules

* update module README files

* Update README.md

* Update README.md

* Create CHANGELOG.md

* Refactor COS module to be generic (#51)

* Create generic COS module and update CoreDNS module to use it

* Update compute-vm-cos README

* Fix COS README

* Update COS example

* Skip boilerplate check for COS file template

* Make COS module more generic and provide preset configurations

* Update COS module documentation

* tfdoc: add support for multiple variables files

* compute-vm: split boot disk in separate variable file for cos module support

* Streamline cos modules (#54)

* tfdoc: fix bug in last commit

* compute-vm: add support for user-data

* compute-vm: restore noncos variable split

* remove compute-vm-cos-coredns

* compute-vm: revert to original state

* cos-container/coredns

* fix variables mess

* cos/coredns fixes

* cos/mysql

* remove stale compute-vm-cos module

* add test instance to cos modules

* tfdoc: add support for multiple output files

* cos: add initial READMEs

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* add test apply fixture

* cos-coredns: tested

* Update README.md

* Fix typo

* cos-coredns: refactor README

* Update README.md

* test yaml validity in cos modules tests

* cos mysql tests

* cos mysql: refactor and test (disk tests missing)

* onprem: fix Coredns

* cos mysql: additional disk working

* cos modules: fix instance disks for no instance

* update some modules READMEs

* update some modules READMEs

* Update README.md

* Update README.md

* add simple tests for foundations/environments

* change default for org id in foundations/environments to avoid errors when none is specified

* fix null/empty organization id in foundations/environments

* fix errors when destroying on empty state in foundations/environments

* fundations/bu: fix errors when destroying with empty state

* modules/gcs: make outputs resilient on destroy with empty state

* modules/folders: make outputs resilient on destroy with empty state

* switch organization_id variable to long form in foundations/bu and modules/folders-unit

* Update README.md

* infra/shared-vpc: remove duplicate tag attribute from bastion

Co-authored-by: Aleksandr Averbukh <averbukh@google.com>
Co-authored-by: Julio Castillo <juliocc@gmail.com>
Co-authored-by: Julio Castillo <jccb@google.com>
2020-04-03 14:06:48 +02:00
Ludovico Magnocavallo 5c7a322de9 streamline hub and spoke vpn test 2019-11-05 07:02:26 +01:00
Ludovico Magnocavallo 467aa192f3 streamline hub and spoke outputs test 2019-11-05 06:49:25 +01:00
Ludovico Magnocavallo ed5ad55776 streamline hub and spoke firewall test 2019-11-05 06:43:16 +01:00
Ludovico Magnocavallo 0c4d7322af bump tftest version in requirements to 1.2.0 2019-11-05 06:40:59 +01:00
Ludovico Magnocavallo be772c61fa use resources instead of changes in router test 2019-11-05 06:20:29 +01:00
Ludovico Magnocavallo 6c87d1e52e upgrade tftest version to v1.1.0 2019-11-05 06:08:43 +01:00
Ludovico Magnocavallo f690942264 account for samples and tests folder names differences in top-level test fixture 2019-11-05 05:42:06 +01:00
Ludovico Magnocavallo 3e1a0d33c3 use valid Python package names for test subfolders 2019-11-05 05:30:08 +01:00
Aleksandr Averbukh 7846e9bf30 Update filter for firewall modules, formatting 2019-11-04 22:18:32 +01:00
Aleksandr Averbukh f5a358930d Merge branch 'master' into hub-and-spoke-vpns-tests 2019-11-04 21:16:51 +01:00
Ludovico Magnocavallo aacd679f26 foundations bu: fix project tests 2019-11-04 20:50:20 +01:00
Ludovico Magnocavallo 554af0e3d5 foundations env: fix project tests 2019-11-04 20:45:23 +01:00
Aleksandr Averbukh b5998918b5 Add tests for th ehub-and-spoke-vpns infra example 2019-11-04 17:39:42 +01:00
Ludovico Magnocavallo fd0704670d
Update project module to v4.0.0, update test framework module to v1.0.1
* update project module to v4.0.0

* bump tftest version in test requirements file

* update plan test fixture to new syntax

* fix foundations/environments tests

* fix foundations/business-units tests

* fix infrastructure/shared-vpc tests
2019-10-30 22:21:15 +01:00
Ludovico Magnocavallo ddb8c70f79
Shared VPC example (#13)
Simple Shared VPC example with test resources.
2019-10-20 08:17:32 +02:00
Ludovico Magnocavallo 86438058ed
Add a top-level fixture and override it in packages (#10) 2019-09-12 13:30:56 +02:00
Ludovico Magnocavallo 609c555889 refactor Python tests for style 2019-09-12 08:13:14 +02:00
Ludovico Magnocavallo c766ad8144
Trigger checks 2019-09-12 07:30:17 +02:00
Aleksandr Averbukh f17b4a9b04 Add tests for busines-units example 2019-09-12 00:43:40 +02:00
Aleksandr Averbukh 73cd9c5ff5 Rename 'organization-bootstrap' to 'foundations' 2019-09-11 14:51:59 +02:00
Ludovico Magnocavallo e553da6464
Org environments module tests and tests CI configuration
* sample test

* bump tftest library version in requirements

* org env: initial tests

* Fix boilerplate

* add boilerplate to skel testing cloud build

* use package structure for tests

* use package structure for tests

* add bolerplate to package init files

* wip build config for tests

* initial test cloud build configuration

* dummy change

* add comment to test configuration file

* add missing test docstring

* remove debug logging config from tests fixture
2019-09-11 13:36:07 +02:00