scottwinkler / terraform-provider-shell

Terraform provider for executing shell commands and saving output to state file
Mozilla Public License 2.0
279 stars 60 forks source link

Is Release 1.7.6 tested under terraform 0.13.x ? #84

Closed syyang-in-cloud closed 3 years ago

syyang-in-cloud commented 3 years ago

I'm getting an error on running update.sh that there is no StdIn when I am running with terraform 0.13.5:

TestPluginsProviderShell 2020-11-17T23:00:49Z logger.go:66: StdIn: 
TestPluginsProviderShell 2020-11-17T23:00:49Z logger.go:66: '{}'
TestPluginsProviderShell 2020-11-17T23:00:49Z logger.go:66: 
TestPluginsProviderShell 2020-11-17T23:00:49Z logger.go:66: 

create/read/delete seems working fine, but update is getting no StdIn.

Have not tested in 0.12.x whether it's working for update or not.

scottwinkler commented 3 years ago

Try 1.7.4. There were some changes to update in 1.7.6 which might be causing problems

syyang-in-cloud commented 3 years ago

Try 1.7.4. There were some changes to update in 1.7.6 which might be causing problems

Thanks for the quick reply, and yes, I pinned the version >=1.7.4,<1.7.6. Any reason not to try 1.7.5?

scottwinkler commented 3 years ago

1.7.5 and 1.7.6 are related

rucciva commented 3 years ago

hi @scottwinkler , i think this is due to SetNewComputed which will affect *schema.ResourceData.Get(), making it return empty map. (i am using v2 of the SDK and didn't notice this problem in my provider when i suggested its use),

I think it is safe to use *schema.ResourceData.GetChange() instead

scottwinkler commented 3 years ago

Fix released in 1.7.7