cloud-foundation-fabric/modules/dataform-repository
Ludovico Magnocavallo 6941313c7d
Factories refactor (#1843)
* factories refactor doc

* Adds file schema and filesystem organization

* Update 20231106-factories.md

* move factories out of blueprints and create new factories  README

* align factory in billing-account module

* align factory in dataplex-datascan module

* align factory in billing-account module

* align factory in net-firewall-policy module

* align factory in dns-response-policy module

* align factory in net-vpc-firewall module

* align factory in net-vpc module

* align factory variable names in FAST

* remove decentralized firewall blueprint

* bump terraform version

* bump module versions

* update top-level READMEs

* move project factory to modules

* fix variable names and tests

* tfdoc

* remove changelog link

* add project factory to top-level README

* fix cludrun eventarc diff

* fix README

* fix cludrun eventarc diff

---------

Co-authored-by: Simone Ruffilli <sruffilli@google.com>
2024-02-26 10:16:52 +00:00
..
README.md Marcwo/dataform module (#2001) 2024-01-24 17:13:21 +01:00
iam.tf Marcwo/dataform module (#2001) 2024-01-24 17:13:21 +01:00
main.tf Marcwo/dataform module (#2001) 2024-01-24 17:13:21 +01:00
variables.tf Marcwo/dataform module (#2001) 2024-01-24 17:13:21 +01:00
versions.tf Factories refactor (#1843) 2024-02-26 10:16:52 +00:00

README.md

Google Cloud Dataform Repository module

This module allows managing a dataform repository, allows adding IAM permissions. Also enables attaching a remote repository.

TODO

[] Add validation rules to variable.

Examples

Simple dataform repository with access configration

Simple dataform repository and specifying repository access via the IAM variable.

module "dataform" {
  source     = "./fabric/modules/dataform-repository"
  project_id = "my-project"
  name       = "my-repository"
  region     = "europe-west1"
  iam = {
    "roles/dataform.editor" = ["user:user1@example.org"]
  }
}
# tftest modules=1 resources=2

Repository with an attached remote repository

This creates a dataform repository with a remote repository attached to it. In order to enable dataform to communicate with a 3P GIT provider, an access token must be generated and stored as a secret on GCP. For that, we utilize the existing secret-manager module.

module "secret" {
  source     = "./fabric/modules/secret-manager"
  project_id = "fast-bi-fabric"
  secrets = {
    my-secret = {
    }
  }
  versions = {
    my-secret = {
      v1 = { enabled = true, data = "MYTOKEN" }
    }
  }
}

module "dataform" {
  source     = "./fabric/modules/dataform-repository"
  project_id = "fast-bi-fabric"
  name       = "my-repository"
  region     = "europe-west1"
  remote_repository_settings = {
    url         = "my-url"
    secret_name = "my-secret"
    token       = module.secret.version_ids["my-secret:v1"]
  }
}
# tftest modules=2 resources=3

Variables

name description type required default
name Name of the dataform repository. string
project_id Id of the project where resources will be created. string
region The repository's region. string
iam IAM bindings in {ROLE => [MEMBERS]} format. Mutually exclusive with the access_* variables used for basic roles. map(list(string)) {}
iam_bindings Authoritative IAM bindings in {KEY => {role = ROLE, members = [], condition = {}}}. Keys are arbitrary. map(object({…})) {}
iam_bindings_additive Keyring individual additive IAM bindings. Keys are arbitrary. map(object({…})) {}
remote_repository_settings Remote settings required to attach the repository to a remote repository. object({…}) null
service_account Service account used to execute the dataform workflow. string ""