feat!: Unified variables and adds support for IAM policies #341
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Unified variables
This PR supports an optional variables file (
.vars.{ENV}.yaml
) under every dataset folder, that can contain all the values of variables needed for that dataset's infra and the pipeline configurations.The namespaces supported in the YAML file are
infra
: a set of key-value pairs that are copied as Terraform variables underinfra/terraform.tfvars
pipelines
: a JSON object that contains dataset-specific variables (Airflow variables), copied to.{env}/datasets/{DATASET}/pipelines/{dataset}_variables.json
Because these YAML files might contain sensitive information, they aren't checked into the repo.
Support for IAM policies for GCS buckets and BQ datasets
This PR also adds support for adding IAM policies into the Terraform resource definitions of GCS buckets and BQ datasets using the YAML variables above. The convention is to use
in the YAML variables file to associate a list of IAM roles to a specific GCS bucket or BQ dataset. These IAM roles will be included in the generated Terraform files as IAM policy resources.
Checklist
Note: If an item applies to you, all of its sub-items must be fulfilled
README
accordinglydatasets/<DATASET_NAME>
and nothing outside of that directorytests
folder)