-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
INITIAL DRAFT FOR FEEDBACK: Implement provider functions #9990
Conversation
go get github.com/hashicorp/[email protected] go get github.com/hashicorp/[email protected] go get github.com/hashicorp/terraform-plugin-sdk/[email protected] go mod tidy
…_from_self_link`, acceptance tests and unit tests for shared logic
NOTE: Using Terraform 1.8.0 is required for this feature. I've built 1.8.0 locally from the hashicorp/terraform repo and used that during local development of this PR. I expect the tests above to fail! I checked out the
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 9 files changed, 642 insertions(+), 142 deletions(-)) |
mmv1/third_party/terraform/functions/project_id_from_self_link_test.go.erb
Outdated
Show resolved
Hide resolved
Tests analyticsTotal tests: Click here to see the affected service packagesall service packages are affected Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccContainerCluster_withGatewayApiConfig|TestAccWorkstationsWorkstationConfig_updateHostDetails |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 13 files changed, 1046 insertions(+), 142 deletions(-)) |
Originally was `resource_name_from_self_link`
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 13 files changed, 1046 insertions(+), 142 deletions(-)) |
Tests analyticsTotal tests: Click here to see the affected service packagesall service packages are affected Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccContainerCluster_withGatewayApiConfig|TestAccWorkstationsWorkstationConfig_updateHostDetails |
|
Was previously `project_id_from_id`. This could be misleading if an input string contains a project number.
a2e46fb
to
5d7e89e
Compare
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 15 files changed, 1202 insertions(+), 142 deletions(-)) |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 15 files changed, 1197 insertions(+), 142 deletions(-)) |
Tests analyticsTotal tests: Click here to see the affected service packagesall service packages are affected Action takenFound 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccContainerCluster_withGatewayApiConfig|TestAccProviderFunction_location_from_id|TestAccProviderFunction_name_from_id|TestAccProviderFunction_project_from_id|TestAccProviderFunction_region_from_id|TestAccProviderFunction_zone_from_id|TestAccWorkstationsWorkstationConfig_updateHostDetails |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took an initial look yesterday and looked reasonable so far. Waiting to review until this moves out of draft.
@rileykarson I marked this PR as out of draft, but I think I'll return it to draft and continue to split it out into multiple PRs now that I've received initial feedback on my approach. The PR is too big for thorough review, but if you have any more general feedback on the approach please post here! I've broken out these two PRs that could be merged before the functions are:
I'll continue to make PRs for the individual functions and include documentation in each. |
Now I've received initial feedback, I'm closing this PR in favour of using the |
Description
This PR is an initial draft of implementing provider-defined functions for retrieving elements of a resource's self link or id.
Please see internal, shared doc for details about this work.
See comments for version of Terraform required to test locally!
My intention is to split this PR up in future:
mmv1/third_party/terraform/fwprovider/framework_provider.go.erb
I've put release notes in place on this PR that would be split between those future PRs as appropriate!
Release Note Template for Downstream PRs (will be copied)