prevent constant diff even after a successful apply of resource_tfe_registry_module resource #1357
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 prevents constant diff even after a successful apply of
resource_tfe_registry_module
resource. It also fixes the following cases:tags
is set to true andbranch
is specified, the API ignorestags
value and uses the specifiedbranch
. This leads to a constant diff attempt. Solution added is to match the API by verifying that eitherbranch
ortags
is set but not bothtags
value was never sent during the Create request, this PR ensures that the specifiedtags
value is always sent in the requesttest_config
was only updated into state when the test config response is non-empty leading to never unsetting the value in state. Added fix to always update the test_config state to reflect api response.Remember to:
Testing plan
unrelated failure for nocode
=== RUN TestAccTFERegistryModule_noCodeModule
resource_tfe_registry_module_test.go:343: Step 1/1 error: Error running apply: exit status 1
--- FAIL: TestAccTFERegistryModule_noCodeModule (2.23s)