Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cloud dataplex module #1308

Merged
merged 16 commits into from May 5, 2023
Merged

Add cloud dataplex module #1308

merged 16 commits into from May 5, 2023

Conversation

prabhaarya
Copy link
Collaborator

Terraform code for creating Dataplex lake, zone and asset in GCP project.

@github-actions github-actions bot added on:modules on:tools New or changed tool and removed on:tools New or changed tool labels Apr 5, 2023
@ludoo
Copy link
Collaborator

ludoo commented Apr 11, 2023

Thanks for this, can you make sure tests pass?

@lcaggio
Copy link
Collaborator

lcaggio commented Apr 14, 2023

Thanks for working on this! Dataplex is a great addition to the repo. As mentioned in pur offline sync, I would shape this module similar to the BQ-dataset one:

  • name: dataplex-lake
  • add IAM support
  • support multiple zone definition (unspecified, raw, curated)
  • support multiple asset definition and mapping to the zone
  • support different type of assets
  • support multi-regions

If you do not implement all in this PR, I would make a TODO section in the README.

@prabhaarya
Copy link
Collaborator Author

Thanks for working on this! Dataplex is a great addition to the repo. As mentioned in pur offline sync, I would shape this module similar to the BQ-dataset one:

  • name: dataplex-lake
  • add IAM support
  • support multiple zone definition (unspecified, raw, curated)
  • support multiple asset definition and mapping to the zone
  • support different type of assets
  • support multi-regions

If you do not implement all in this PR, I would make a TODO section in the README.

Thanks for nice feedback and help. Sure, let me add TODO section in README :)

@juliocc
Copy link
Collaborator

juliocc commented Apr 14, 2023

Hi @prabhaarya. Can you switch you test to use an example in the README of your module?. It's much easier.

The details are explained in the contributing guide.

modules/cloud-dataplex/main.tf Outdated Show resolved Hide resolved
modules/cloud-dataplex/main.tf Outdated Show resolved Hide resolved
modules/cloud-dataplex/main.tf Outdated Show resolved Hide resolved
modules/cloud-dataplex/main.tf Outdated Show resolved Hide resolved
@lcaggio
Copy link
Collaborator

lcaggio commented Apr 14, 2023

Hi @prabhaarya, I am under the impression that supporting multiple zone should be added in this PR.

How would you use this module in your terraform deployment?

My understanding is that a typical deployment would be one lake with 2 zones (RAW and CURATED) with attached assets. As of now, this module would create one lake with one zone that could be RAW or CURATED but not both.

@prabhaarya
Copy link
Collaborator Author

Hi @prabhaarya, I am under the impression that supporting multiple zone should be added in this PR.

How would you use this module in your terraform deployment?

My understanding is that a typical deployment would be one lake with 2 zones (RAW and CURATED) with attached assets. As of now, this module would create one lake with one zone that could be RAW or CURATED but not both.

I agree with you, Lorenzo. It currently supports either zone type but not both.

IMO, having both zones when creating Dataplex lakes is not a must; it can be an enhanced module feature.

Copy link
Collaborator

@lcaggio lcaggio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! some comments.

modules/cloud-dataplex/variables.tf Outdated Show resolved Hide resolved
modules/cloud-dataplex/variables.tf Outdated Show resolved Hide resolved
modules/cloud-dataplex/variables.tf Outdated Show resolved Hide resolved
modules/cloud-dataplex/outputs.tf Show resolved Hide resolved
modules/cloud-dataplex/variables.tf Outdated Show resolved Hide resolved
@prabhaarya prabhaarya requested a review from lcaggio April 18, 2023 15:32
Copy link
Collaborator

@lcaggio lcaggio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes and we are good to go with V1!

modules/cloud-dataplex/variables.tf Outdated Show resolved Hide resolved
modules/cloud-dataplex/variables.tf Outdated Show resolved Hide resolved
modules/cloud-dataplex/variables.tf Outdated Show resolved Hide resolved
modules/cloud-dataplex/outputs.tf Outdated Show resolved Hide resolved
modules/cloud-dataplex/outputs.tf Outdated Show resolved Hide resolved
@prabhaarya prabhaarya requested a review from lcaggio May 3, 2023 15:27
Copy link
Collaborator

@lcaggio lcaggio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, thanks for supporting already multiple zone types in this version.

modules/cloud-dataplex/variables.tf Outdated Show resolved Hide resolved
@ludoo ludoo merged commit 23299f7 into GoogleCloudPlatform:master May 5, 2023
9 checks passed
@ludoo
Copy link
Collaborator

ludoo commented May 5, 2023

@prabhaarya @lcaggio can you open a separate PR to link the module from the top-level and section-level READMEs?

lcaggio pushed a commit that referenced this pull request May 5, 2023
* Add dataplex module

* fix dataplex test

* resolve comments

* python test removed

* Change variable desc

* refactor variables

* fix typos

* fix assets & zones resources

* fix linting error

* fix tests

* fix typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants