-
Notifications
You must be signed in to change notification settings - Fork 230
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
ResourceData.Set() doesn't set empty List/Set of String when Create/Update resource #766
Labels
bug
Something isn't working
Comments
In case that's helpful here's some further notes from my own investigation as the users of a provider I maintain noticed this spam:
|
jeremmfr
added a commit
to jeremmfr/terraform-plugin-sdk
that referenced
this issue
Jun 18, 2021
and doesn't use a null src otherwise a drift is generate when refresh resource Fixes hashicorp#766
jeremmfr
added a commit
to jeremmfr/terraform-plugin-sdk
that referenced
this issue
Jun 18, 2021
and doesn't use a null src otherwise a drift is generate when refresh resource Fixes hashicorp#766
jeremmfr
added a commit
to jeremmfr/terraform-plugin-sdk
that referenced
this issue
Oct 7, 2021
and doesn't use a null src otherwise a drift is generate when refresh resource Fixes hashicorp#766 (cherry picked from commit a2dafcf)
jeremmfr
added a commit
to jeremmfr/terraform-plugin-sdk
that referenced
this issue
Oct 7, 2021
and doesn't use a null src otherwise a drift is generate when refresh resource Fixes hashicorp#766 (cherry picked from commit a2dafcf)
jeremmfr
added a commit
to jeremmfr/terraform-plugin-sdk
that referenced
this issue
Dec 16, 2021
and doesn't use a null src otherwise a drift is generate when refresh resource Fixes hashicorp#766
jeremmfr
added a commit
to jeremmfr/terraform-plugin-sdk
that referenced
this issue
Dec 16, 2021
and doesn't use a null src otherwise a drift is generate when refresh resource Fixes hashicorp#766 (cherry picked from commit a2dafcf)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SDK version
Relevant provider source code
provider.go
resource_list.go
Terraform Configuration Files
Debug Output
First apply: https://gist.github.com/jeremmfr/8fdf0aef9a9dba35aa7c2a429013a466
Second apply: https://gist.github.com/jeremmfr/ce7fc52349967f60dbb11845b5839e7a
Especially in second apply :
Expected Behavior
list
andset
arguments set in state to an empty list on first apply (create).Actual Behavior
list
andset
arguments set in state to an empty list only when refresh resource.With new Terraform version (0.15.4), the note
Note: Objects have changed outside of Terraform
appears for the wrong reason.Steps to Reproduce
terraform init
terraform apply -auto-approve
terraform apply -auto-approve
Others errors
If I update
name
argument,list2
andset2
not set to an empty list in state whenapply
(update)The text was updated successfully, but these errors were encountered: