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

feat(dataplex): add aspect_type resource #662

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nilan3
Copy link
Contributor

@nilan3 nilan3 commented Nov 27, 2024

Description of your changes

Add resources for the following terraform resources:

  • google_dataplex_aspect_type

Fixes #

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

UPTEST_EXAMPLE_LIST="examples/dataplex/v1beta1/aspecttype.yaml"

--- PASS: kuttl (45.11s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/case (44.02s)
PASS
10:54:19 [ OK ] running automated tests
image

Signed-off-by: nilan3 <nilanthanb1994@gmail.com>
@nilan3 nilan3 marked this pull request as ready for review November 27, 2024 12:50
@nilan3
Copy link
Contributor Author

nilan3 commented Nov 27, 2024

/test-examples="examples/dataplex/v1beta1/aspecttype.yaml"

Copy link
Collaborator

@turkenf turkenf left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @nilan3, I left a comment about external-name configuration for you to consider.

@@ -430,6 +430,8 @@ var terraformPluginSDKExternalNameConfigs = map[string]config.ExternalName{
"google_dataplex_asset": config.TemplatedStringAsIdentifier("name", "projects/{{ .setup.configuration.project }}/locations/{{ .parameters.location }}/lakes/{{ .parameters.lake }}/zones/{{ .parameters.dataplex_zone }}/assets/{{ .external_name }}"),
// Imported by using the following projects/{{project}}/locations/{{location}}/lakes/{{lake}}/zones/{{name}}
"google_dataplex_zone": config.TemplatedStringAsIdentifier("name", "projects/{{ .setup.configuration.project }}/locations/{{ .parameters.location }}/lakes/{{ .parameters.lake }}/zones/{{ .external_name }}"),
// Imported by using the following projects/{{project}}/locations/{{location}}/aspectTypes/{{aspect_type_id}}
"google_dataplex_aspect_type": config.IdentifierFromProvider,
Copy link
Collaborator

Choose a reason for hiding this comment

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

For external name normalization, could you please try the following TemplatedStringAsIdentifier configuration? If it works, please mark the location parameter as required as shown here.

Suggested change
"google_dataplex_aspect_type": config.IdentifierFromProvider,
"google_dataplex_aspect_type": TemplatedStringAsIdentifier("aspect_type_id", "projects/{{ .setup.configuration.project }}/locations/{{ .parameters.location }}/aspectTypes/{{ .external_name }}"),

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

Successfully merging this pull request may close these issues.

2 participants