-
Notifications
You must be signed in to change notification settings - Fork 13
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
echoprovider: Add a new test-only v6 provider that echoes ephemeral provider data #389
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
austinvalle
commented
Nov 12, 2024
austinvalle
commented
Nov 13, 2024
website/docs/plugin/testing/acceptance-tests/ephemeral-resources.mdx
Outdated
Show resolved
Hide resolved
SBGoods
reviewed
Nov 15, 2024
SBGoods
approved these changes
Nov 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains an implementation of a v6 Terraform provider that can be used to test ephemeral resources. As ephemeral data is not stored in Terraform artifacts (plan or state), that means that the
terraform-plugin-testing
Go module cannot help provider developers test that data directly.The
echo
provider utilizes the ephemeral nature of provider configurations as a "passthrough" for data to be echoed later by the singleecho
managed resource type:A more detailed example, along with accompanying state checks, can be found in the PRs website documentation: https://github.com/hashicorp/terraform-plugin-testing/blob/av/ephemeral-values/website/docs/plugin/testing/acceptance-tests/ephemeral-resources.mdx#testing-ephemeral-data-with-echo-provider
Eventually, other methods of inspecting/consuming ephemeral data may be introduced that might warrant revisiting this provider, such as:
But for now,
ephemeral data => provider config => managed resource state
is essentially the only reasonable option for CI testing. (outside of using the remote system, which is encouraged in the docs)Notes
v1.10.0
release and an implementation ofEphemeralResourceServer
RPCs as mentioned in build(deps): Bump github.com/hashicorp/terraform-plugin-go from 0.24.0 to 0.25.0 #382 (comment)echoprovider
is implemented as a v6 provider because it's intended use is with ephemeral data, which exists only in Terraform v1.10.0+