Commit Graph

101 Commits

Author SHA1 Message Date
Mohamed Ikbal Belbahri ae6ee03de2
Add https security to cloud-functions-v1 module (#2118)
* Add https security level to cf v1 module
* Update tfdoc.py raw strings for slug var to avoid [SyntaxWarning: invalid escape sequence]
2024-02-28 21:20:56 +01:00
Wiktor Niesiobędzki bee3072568
Add support for Cloud Run v2 jobs (#1954)
Add support for Cloud Run v2 jobs

* create a separate file for service creation (service.tf) and job
  (job.tf) - for easy comparison
* add E2E tests where possibile
* remove default value for input variable `region`
* fix subnet range VPC Access Connector example
* add creation of service account for audit logs call (trigger requires
  service account)
* use provided trigger service account email in
  `local.trigger_sa_email`, so explicitly provided SA is passed to
  trigger
* set default value for vpc_connector_create.throughput.max, to match
  what is set by GCP API, as provider uses wrong default of 300 which
  results in perma-diff
* create inventory fiels for all examples

Global changes
* (tests) add input variable `project_number`, to allow assigning IAM permissions to Service Accounts in fixtures
* (tests) fix not outputting the path, when object is not found in inventory
* (tests) fix `create_e2e_sandbox.sh` - now it properly finds root of the repo

Secret Manager
* added `version_versions` output, to allow specifying versions in other modules. `versions` is sensitive and it makes it unsuitable for `for_each` values

New test fixtures
* `pubsub.tf` - creating one topic
* `secret-credential.tf` - creating Secret Manager `credential` secret
* `shared-vpc.tf` - creating two projects (host and service), and vpc in host project
* `vpc-connector.tf` - creating VPC Access Connector instance
2024-02-18 14:57:34 +01:00
simonebruzzechesse d11c380aec
Format python files in blueprints (#2079)
* format python files in blueprints
* update check on blueprints python code
* update python linter in CI workflow
2024-02-15 09:37:49 +01:00
Julio Castillo efb76b93e4
Remove unused tfeditor (#2039) 2024-02-02 10:14:14 +00:00
Wiktor Niesiobędzki 29b615e20d
Add version check to tools/lint.sh (#1955) 2023-12-30 09:09:10 +01:00
Julio Castillo fde7b76036
Allow per-module terraform fixtures (#1914)
* Allow terraform fixtures for examples

* Allow defining multiple fixtures, and named fixtures under tests/fixtures/

* Enable e2e for wiktorn

* Fix prepare_files call for e2e

* Move fixture to separate file, fix test

* Revert shallow-copying symlinks, performane penalty - 20%

* Update tfdoc.py to list used fixtures

---------

Co-authored-by: Wiktor Niesiobędzki <wiktorn@google.com>
2023-12-29 09:43:44 +00:00
Julio Castillo b6e0557bbb
Simplify organization tags.tf locals (#1932)
* Simplify organization tags.tf locals

* Fix boilerplate

* Override github provider version for tests
2023-12-18 16:09:22 +00:00
Ludo f368165ea7
update github provider 2023-12-18 12:25:22 +01:00
Wiktor Niesiobędzki c5c127b9df Use TFTEST_E2E_ instead of TF_VAR variables
Use of TF_VAR variables modified results of `tests/examples` and
required setting different environment to run `tests/examples` and
`tests/examples_e2e` tests. No both can be run using the same
environment.
2023-11-30 07:43:46 +00: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
Julio Castillo ef290c1c8d
Enforce mandatory types in all variables (#1737) 2023-10-06 09:44:33 +00:00
Alejandro Leal 81c6959617 Update to lint.sh and wording to some tf
fast/stages-multitenant/0-bootstrap-tenant/identity-providers.tf
fast/stages/0-bootstrap/identity-providers.tf
tools/lint.sh
2023-10-05 00:17:20 -04:00
Julio Castillo 5591dabdc5 Remove print 2023-08-31 11:20:25 +02:00
Julio Castillo 8a667ff35b Forgot to add the script 2023-08-31 11:17:39 +02:00
Julio Castillo 5bbb7bdd09 Simplify linting output in workflow 2023-08-31 10:15:12 +02:00
Ludovico Magnocavallo 8d7dba49cb
refactor tfdoc for legibility (#1544) 2023-07-29 11:11:31 +02:00
Julio Castillo 7fb656b8ae fixes 2023-07-28 17:10:49 +02:00
Julio Castillo 1800d3e617 Fix docstrings 2023-07-28 16:55:56 +02:00
Julio Castillo 4318be6cd8 Move unneeded try 2023-07-28 16:43:00 +02:00
Julio Castillo e6be368367 Simplify whitespace handling 2023-07-28 16:32:38 +02:00
Julio Castillo d61e7df562 Fix whitespace handling 2023-07-28 15:43:40 +02:00
Julio Castillo 4f123ccc74 Extend tfdoc to generate TOCs 2023-07-28 14:18:28 +02:00
Ludovico Magnocavallo 884cb8b4bf
Ensure all modules have an `id` output (#1410)
* net-vpc

* a-d

* complete modules

* fix error
2023-06-02 16:07:22 +02:00
Alejandro Leal 87cd83f5c0 Several updates
Several updates
2023-05-13 23:51:46 -04:00
Julio Castillo 87281f2017 Fix var name 2023-05-05 17:08:24 +02:00
Julio Castillo 176209ccda Fix requirements 2023-05-05 17:05:03 +02:00
Julio Castillo 72b5944fb3 Simplify return 2023-05-05 17:03:42 +02:00
Julio Castillo 873c45d6c6 Add jsonschema to tools requirements.txt 2023-05-05 17:01:08 +02:00
Julio Castillo 05ed1bf12f Add blueprint metadata validation tool 2023-05-05 16:57:48 +02:00
Julio Castillo f4b8a61981 Clean workflow files 2023-04-25 15:28:34 +02:00
Julio Castillo 4245faae73 Add archive provider 2023-04-25 15:22:27 +02:00
Julio Castillo b097d297ff Extend tests to use lockfile if available
This commints allows the test framework to use a lockfile generated
within the tools/lockfile directory. This allows reusing the provider
cache and also running tests in parallel.
2023-04-25 15:12:11 +02:00
Ludovico Magnocavallo 3d41d01efc
FAST plugin system (#1266)
* plugin folder, gitignore, serverless connector example

* add support to fast plugin variables and outputs to tfdoc

* rename folder, READMEs

* add variable description

* show diffs

* check documentation, use multiple files

* debug check doc

* try a different glob

* debug tfdoc names

* more debug

* and even more debug

* fix gitignore

* fix links

* support extra files in tests

* fix fixture, switch stage 2 peering to new tests

* tfdoc

* Allow globs in extra files

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2023-03-24 12:28:32 +00:00
Ludovico Magnocavallo 8fc9549c58
add support for proxy and psc subnets to module factory (#1211) 2023-03-05 17:08:43 +01:00
Ludovico Magnocavallo 96e829bdf3
Billing exclusion support for FAST mt resman (#1209)
* fix files resource parsing in tfdoc

* fix tfdoc generated output

* billing exclusion support in mt bootstrap
2023-03-03 16:23:36 +00:00
Aleksandr Averbukh 06dd38170d
Fix outdated go deps, dependabot alerts (#1208) 2023-03-03 07:15:08 +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 44724f3839 Update plan_summary to support running documentation examples 2023-01-19 17:47:14 +01:00
Julio Castillo 30419ca170 Fix check_documentation output 2023-01-12 13:37:02 +01:00
Julio Castillo b840fcd74e Plan summary tool 2022-12-06 16:13:20 +01:00
Julio Castillo 27cf698ce5 Colon -> Period 2022-11-25 09:36:57 +01:00
Julio Castillo 612d7283e8 Enforce nonempty descriptions ending in a colon 2022-11-24 18:56:01 +01:00
Julio Castillo 882a3ebf78 Fix pubsub sorting 2022-11-21 13:47:24 +01:00
Julio Castillo cf39f68e9a Only look at outputs.tf in check documentation lint 2022-11-21 13:17:55 +01:00
Julio Castillo 297691565e Show different icons for documentation check failures 2022-11-21 13:17:55 +01:00
Julio Castillo e2e7bc282d Remote debug lib 2022-11-21 13:17:55 +01:00
Julio Castillo 826ff14ef9 Sort variables and outputs 2022-11-21 13:17:55 +01:00
Julio Castillo 2e700db8a7 Fix variable/output sort check 2022-11-21 13:17:55 +01:00
Julio Castillo a988775c14 Do not modify in parameters in format_* functions 2022-10-20 18:56:54 +02:00
Julio Castillo 5bd195aa8f Switch to namedtuple 2022-10-20 16:26:09 +02:00