Commit Graph

57 Commits

Author SHA1 Message Date
Wiktor Niesiobędzki 03bf0b15b3
Organization module end-to-end tests (#1860)
* added tag serial to mark tests to be run serially
* always run tests using loadgroup distribution to make use of serial tag
* added end-to-end tests for organization, not adding to custom constraints as the name has to be unique
* fixed granting custom roles created in the same module call
2023-11-14 18:54:59 +01:00
Simone Ruffilli 6d89b88149
versions.tf maintenance + copyright notice bump (#1782)
* Bump copyright notice to 2023

* Delete versions.tf on blueprints

* Pin provider to major version 5

* Remove comment

* Fix lint

* fix bq-ml blueprint readme

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Julio Castillo <jccb@google.com>
2023-10-20 18:17:47 +02:00
Ludovico Magnocavallo 819894d2ba
IAM interface refactor (#1595)
* IAM modules refactor proposal

* policy

* subheading

* Update 20230816-iam-refactor.md

* log Julio's +1

* data-catalog-policy-tag

* dataproc

* dataproc

* folder

* folder

* folder

* folder

* project

* better filtering in test examples

* project

* folder

* folder

* organization

* fix variable descriptions

* kms

* net-vpc

* dataplex-datascan

* modules/iam-service-account

* modules/source-repository/

* blueprints/cloud-operations/vm-migration/

* blueprints/third-party-solutions/wordpress

* dataplex-datascan

* blueprints/cloud-operations/workload-identity-federation

* blueprints/data-solutions/cloudsql-multiregion/

* blueprints/data-solutions/composer-2

* Update 20230816-iam-refactor.md

* Update 20230816-iam-refactor.md

* capture discussion in architectural doc

* update variable names and refactor proposal

* project

* blueprints first round

* folder

* organization

* data-catalog-policy-tag

* re-enable folder inventory

* project module style fix

* dataproc

* source-repository

* source-repository tests

* dataplex-datascan

* dataplex-datascan tests

* net-vpc

* net-vpc test examples

* iam-service-account

* iam-service-account test examples

* kms

* boilerplate

* tfdoc

* fix module tests

* more blueprint fixes

* fix typo in data blueprints

* incomplete refactor of data platform foundations

* tfdoc

* data platform foundation

* refactor data platform foundation iam locals

* remove redundant example test

* shielded folder fix

* fix typo

* project factory

* project factory outputs

* tfdoc

* test workflow: less verbose tests, fix tf version

* re-enable -vv, shorter traceback, fix action version

* ignore github extension warning, re-enable action version

* fast bootstrap IAM, untested

* bootstrap stage IAM fixes

* stage 0 tests

* fast stage 1

* tenant stage 1

* minor changes to fast stage 0 and 1

* fast security stage

* fast mt stage 0

* fast mt stage 0

* fast pf
2023-08-20 09:44:20 +02:00
Ludovico Magnocavallo adf2621727
Add new `iam_members` variable to IAM additive module interfaces (#1589)
* resource management modules

* data catalog policy

* dataproc

* service account

* kms

* net-vpc

* source repository

* dataplex datascan

* service account module variable order
2023-08-14 09:54:50 +00:00
Ludovico Magnocavallo 79373721df
Remove firewall policy management from resource management modules (#1581)
* rename firewall policy module, fix outputs

* add TOC to firewall policy module

* don't depend policy on parent id

* remove firewall policy from resource management modules

* remove factory conditionals

* fast net a and b

* fast stages

* fast tfdoc

* fast tfdoc

* remove unused test

* fix shielded folder blueprint

* fix shielded folder blueprint
2023-08-09 11:23:07 +00:00
Ludovico Magnocavallo 551dc581e8
Implement proper support for data access logs in resource manager modules (#1497)
* organization module

* rename iam_bindings_authoritative to iam_policy, fix tests

* add support for data access logs and iam policy to folder module

* test inventories

* add support for data access logs and iam policy to project module
2023-07-10 08:08:02 +00:00
Ludovico Magnocavallo c024eca320
Add custom tag support to FAST (#1426)
* initial implementation of custom tags

* depend org policies on tags

* fix test

* integrate default and custom org policy tags
2023-06-07 22:10:27 +00:00
lcaggio 39b27ac25e
Add support for Log Analytics on logging-bucket module and bump provider version (#1423)
* first commit

* Bump provider versions

* Fix tests
2023-06-07 23:23:28 +02:00
Julio Castillo a5e905cb80 Update remaining org policies 2023-02-21 15:49:16 +01:00
Julio Castillo 6b767c9035 Simplify org policies data model in resman modules. 2023-02-21 15:49:16 +01:00
Julio Castillo 04602353ce New compute-vm examples and tests 2023-02-07 15:59:29 +01:00
Ludovico Magnocavallo 5453c585e0
FAST multitenant bootstrap and resource management, rename org-level FAST stages (#1052)
* rename stages

* remove support for external org billing, rename output files

* resman: make groups optional, align on new billing account variable

* bootstrap: multitenant outputs

* tenant bootstrap stage, untested

* fix folder name

* fix stage 0 output names

* optional creation for tag keys in organization module

* single tenant bootstrap minus tag

* rename output files, add tenant tag key

* fix organization module tag values output

* test skipping creation for tags in organization module

* single tenant bootstrap plan working

* multitenant bootstrap

* tfdoc

* fix check links error messages

* fix links

* tfdoc

* fix links

* rename fast tests, fix bootstrap tests

* multitenant stages have their own folder, simplify stage numbering

* stage renumbering

* wip

* rename tests

* exclude fast providers in fixture

* stage 0 tests

* stage 1 tests

* network stages tests

* stage tests

* tfdoc

* fix links

* tfdoc

* multitenant tests

* remove local files

* stage links command

* fix links script, TODO

* wip

* wip single tenant bootstrap

* working tenant bootstrap

* update gitignore

* remove local files

* tfdoc

* remove local files

* allow tests for tenant bootstrap stage

* tenant bootstrap proxies stage 1 tfvars

* stage 2 and 3 service accounts and IAM in tenant bootstrap

* wip

* wip

* wip

* drop multitenant bootstrap

* tfdoc

* add missing stage 2 SAs, fix org-level IAM condition

* wip

* wip

* optional tag value creation in organization module

* stage 1 working

* linting

* linting

* READMEs

* wip

* Make stage-links script work in old macos bash

* stage links command help

* fix output file names

* diagrams

* fix svg

* stage 0 skeleton and diagram

* test svg

* test svg

* test diagram

* diagram

* readme

* fix stage links script

* stage 0 readme

* README changes

* stage readmes

* fix outputs order

* fix link

* fix tests

* stage 1 test

* skip stage example

* boilerplate

* fix tftest skip

* default bootstrap stage log sinks to log buckets

* add logging to tenant bootstrap

* move iam variables out of tenant config

* fix cicd, reintroduce missing variable

* use optional in stage 1 cicd variable

* rename extras stage

* rename and move identity providers local, use optional for cicd variable

* tfdoc

* add support for wif pool and providers, ci/cd

* tfdoc

* fix links

* better handling of modules repository

* add missing role on logging project

* fix cicd pools in locals, test cicd

* fix workflow extension

* fix module source replacement

* allow tenant bootstrap cicd sa to impersonate resman sa

* tenant workflow templates fix for no providers file

* fix output files, push github workflow template to new repository

* remove try from outpout files

* align stage 1 cicd internals to stage 0

* tfdoc

* tests

* fix tests

* tests

* improve variable descriptions

* use optional in fast features

* actually create tenant log sinks, and allow the resman sa to do it

* test

* tests

* aaaand tests again

* fast features tenant override

* fast features tenant override

* fix wording

* add missing comment

* configure pf service accounts

* add missing comment

* tfdoc

* tests

* IAM docs

* update copyright

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2023-02-04 15:00:45 +01:00
Julio Castillo de704110c9 Update api-gateway tests 2023-01-19 17:47:14 +01:00
Julio Castillo 1114c6a8a4 Fix org module tests 2023-01-03 16:52:31 +01:00
Julio Castillo 065b1471a8 Reorder org policy rules 2023-01-03 16:52:31 +01:00
Julio Castillo 4b77e484b1 Migrate project module to new tests 2022-12-18 14:00:19 +01:00
Julio Castillo 8598816980 Remove organization fixture 2022-12-18 14:00:19 +01:00
Julio Castillo b5ca8932dc Migrate organization to example-based tests 2022-12-18 14:00:19 +01:00
Ludovico Magnocavallo 46f694be08
Refactor net-glb module for Terraform 1.3 (#1044)
* wip

* urlmaps

* wip

* tested

* fix managed certificate names

* simple HTTP and HTTPS examples

* gce and hybrid neg examples

* internet NEG example

* serverless NEG and backend bucket examples

* certificate example

* fix example tests

* remove stale test module

* module test

* adfs blueprint

* add support for non-classic GLB and PSC NEGs

* apigee blueprint

* glb and cloud armor blueprint

* deprecate non-working nginx reverse cluster

* api gateway blueprint

* tfdoc

* fix top-level READMEs

* switch to new tests

* only/at most
2022-12-08 17:35:44 +01:00
Julio Castillo 51594c1413 Fix tests 2022-12-06 16:12:38 +01:00
Julio Castillo 8b664fc5e3 Simplify test spec structure 2022-12-06 15:50:39 +01:00
Julio Castillo be0e807435 Bring back `tests` key in test yaml spec 2022-12-06 00:06:29 +01:00
Julio Castillo 589f7a5c2f Simplify yaml test spec 2022-12-06 00:06:29 +01:00
Julio Castillo f5461056cf Fix boilerplate 2022-12-06 00:06:29 +01:00
Julio Castillo b4d3aa2055 Migrate organizations tests 2022-12-06 00:06:29 +01:00
Julio Castillo b2510ea4cf Fix org policies factories 2022-11-18 17:48:52 +01:00
Luca Prete 4124ef41fc
Add network tags support to the organization module (#979) 2022-11-18 15:56:28 +01:00
Julio Castillo c83a7de076 Remove as_logging_destination 2022-11-12 19:24:41 +01:00
Julio Castillo 486d398c7d Update logging sink to tf1.3 in resman modules 2022-11-11 19:22:05 +01:00
Julio Castillo 61e047d95a Update folder and project org policy tests 2022-11-11 17:49:18 +01:00
Aleksandr Averbukh aae6ab132c Add tests for org policy custom constraints 2022-11-08 18:13:49 +01:00
Ludo 6e4d8a46a1 remove redundant extra_files parameter in tfvars tests 2022-11-06 08:39:53 +01:00
Ludovico Magnocavallo d655833c0c
Add a pytest fixture to convert tfvars to yaml (#950)
* wip

* conftest and tests

* backport cross-module implementation test
2022-11-04 18:37:23 +01:00
Julio Castillo 5211466816 Bring back deleted assert 2022-11-03 12:18:37 +01:00
Julio Castillo 3e18575fad Add factory support for new org policies 2022-11-03 11:41:53 +01:00
Julio Castillo 38e761c3a8 Add test that ensures the implementation of org policies is consistent 2022-11-02 10:41:38 +01:00
Julio Castillo 5b9b6b7739 Remove debugging libraries 2022-10-28 18:10:28 +02:00
Julio Castillo f44f4a74dc Fix module tests 2022-10-28 17:49:44 +02:00
Ludovico Magnocavallo 0b5ed8b7ef
Add support for resource management tags and tag bindings (#552)
* organization module

* folder module

* project module

* fix project binding

* use id instead of name for references

* kms module

* compute-vm

* fix compute-vm
2022-02-20 11:14:18 +01:00
Julio Castillo f0773d4883 Simplify tests by figuring out fixture dir automatically
We always use the same directory for terraform fixtures, so it's quite
easy to figure out its path from a pytest fixture by inspecting the
stack. This commit implements this functionality and decreases the
amount of boilerplate needed to write a test.

(Ported from fast)
2022-01-11 11:54:13 +01:00
Simone Ruffilli ee25965c89
Copyright bump (#410) 2022-01-01 15:52:31 +01:00
Julio Castillo f78902aee8 Update hierarchical firewall resource
This replaces all the `google_compute_organization_security_*`
resources with the newer `google_compute_firewall_*` resources.
2021-12-31 13:06:35 +01:00
Ludovico Magnocavallo 174de3a087
Organization module refactor, in-module firewall policy factory for organization and folder (#385)
* move iam and logging to separate files, minimal refactoring

* update README

* fix example

* factory

* tfdoc

* boilerplate

* remove data_folder variable

* tfdoc

* fix default factory name

* add firewall policy to folder module

* add factory example
2021-12-13 08:41:02 +01:00
lcaggio 546385d3ee
Add support for partitioned tables on Organization sinks (#380)
* Add support for partioned tables on Organization sinks

* Update changelog

* Fix lint

* Fix lint

* Use simple bool instead of block

* fix README

* Fix Readme

* Rename variable

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2021-12-09 09:55:47 +01:00
Ludovico Magnocavallo f8413cc98e
Add support for group-based IAM to resource management modules (#229)
* group_iam support for organization

* group_iam support for folder

* fix typo in variable description

* add group_iam to project module

* update project module README
2021-04-11 14:48:16 +02:00
Julio Castillo 7ca2e60399 Fix tests 2021-03-31 10:45:35 +02:00
Julio Castillo ad68fc4dfa Support for cloud logging buckets 2021-03-03 14:23:59 +01:00
Julio Castillo 1e11c670f5 Update copyright to 2021 2021-02-15 09:38:10 +01:00
Julio Castillo c6691a6140 Add include_children option folder and organization sinks 2020-12-06 17:56:27 +01:00
Julio Castillo 8d65a97b11 Add tests for logging sinks 2020-12-06 17:36:22 +01:00