Add support for migration and creation-source on the Stack Resource#1943
Merged
aaabdelgany merged 4 commits intomainfrom Jan 8, 2026
Merged
Add support for migration and creation-source on the Stack Resource#1943aaabdelgany merged 4 commits intomainfrom
migration and creation-source on the Stack Resource#1943aaabdelgany merged 4 commits intomainfrom
Conversation
b0dc0b6 to
c18edb4
Compare
This file contains hidden or 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
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.
Description
This PR adds support for the
migrationflag thats used when creating Stacks as well as the read onlycreation-sourceattribute.The
migrationflag in the stack resource is only to be used at the time of creation and it isn't serialized at any further point in an api response for that stack. So this PR has to preserve the migration value using the state file to ensure that terraform doesn't panic because it thinks that it lost state.The creation-source field is a read-only field that is returned as part of an api response for a stack.
Remember to:
Testing plan
External links
Include any links here that might be helpful for people reviewing your PR. If there are none, feel free to delete this section.
hashicorp/go-tfe#1266
Output from acceptance tests
Please run applicable acceptance tests locally and include the output here. See testing.md to learn how to run acceptance tests.
If you are an external contributor, your contribution(s) will first be reviewed before running them against the project's CI pipeline.
TF_ACC=1 TF_LOG_SDK_PROTO=OFF go test $(go list ./... |grep -v 'vendor') -v -run TestAccTFEStackResource_basic -timeout 15m
? github.com/hashicorp/terraform-provider-tfe [no test files]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-tfe/internal/client (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-tfe/internal/logging (cached) [no tests to run]
=== RUN TestAccTFEStackResource_basic
--- PASS: TestAccTFEStackResource_basic (14.21s)
PASS
ok github.com/hashicorp/terraform-provider-tfe/internal/provider 15.054s
? github.com/hashicorp/terraform-provider-tfe/internal/provider/helpers [no test files]
? github.com/hashicorp/terraform-provider-tfe/internal/provider/planmodifiers [no test files]
? github.com/hashicorp/terraform-provider-tfe/internal/provider/validators [no test files]
? github.com/hashicorp/terraform-provider-tfe/version [no test files]
Rollback Plan
Changes to Security Controls