devopsarr / terraform-provider-radarr

Terraform Radarr provider
https://registry.terraform.io/providers/devopsarr/radarr
Mozilla Public License 2.0
11 stars 0 forks source link

Inconsistent sensitive values #222

Closed andrasmaroy closed 11 months ago

andrasmaroy commented 1 year ago

Since Radarr requiring a password for authentication resources required passwords broke in this provider for my deployment.

Example:

╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to module.radarr.radarr_download_client_flood.main, provider "module.radarr.provider[\"registry.terraform.io/devopsarr/radarr\"]" produced an unexpected new value:
│ .password: inconsistent values for sensitive attribute.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵

I haven't changed anything on the terraform side, the value for the password field is decrypted with sops then provided as nonsensitive for this resource. This approach worked fine so far and is working fine with other providers.

What can one do to remedy this?

chkpwd commented 1 year ago

Getting the same error.

│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to radarr_download_client_sabnzbd.sabnzbd, provider "provider[\"registry.terraform.io/devopsarr/radarr\"]" produced an unexpected new value: .api_key: inconsistent values for sensitive attribute.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to radarr_download_client_sabnzbd.sabnzbd, provider "provider[\"registry.terraform.io/devopsarr/radarr\"]" produced an unexpected new value: .password: inconsistent values for sensitive attribute.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to radarr_download_client_qbittorrent.qbittorrent, provider "provider[\"registry.terraform.io/devopsarr/radarr\"]" produced an unexpected new value: .password: inconsistent values for sensitive
│ attribute.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Even tried to set the password as a sensitive attribute. locals { sensitive_password = sensitive(data.sops_file.servarr-secrets.data["servarr_password"]) }

Fuochi commented 1 year ago

Hi, could you please share both the provider version, and the radarr version? Thanks.

andrasmaroy commented 1 year ago

Hi, could you please share both the provider version, and the radarr version? Thanks.

Provider is 1.8.0 Radarr is 5.0.1.7993.

Fuochi commented 1 year ago

Hi @andrasmaroy, This is because since Radarr v5 sensitive values aren't sent anymore back to client (like Sonarr v4). There is already a pr for updating the provider to be compatible to the new version (#218) but I haven't had the time to address this yet. The Sonarr TF provider already solves this issue, I just need time to replicate the config.

andrasmaroy commented 1 year ago

Hi @andrasmaroy, This is because since Radarr v5 sensitive values aren't sent anymore back to client (like Sonarr v4). There is already a pr for updating the provider to be compatible to the new version (#218) but I haven't had the time to address this yet. The Sonarr TF provider already solves this issue, I just need time to replicate the config.

Thank you for the explanation, makes sense. Looking forward to the fix getting merged, feel free to let us know if there's something to test.

Fuochi commented 11 months ago

Hi @andrasmaroy, This should be fixed in v2.1.0, could you please check if it works as expected?

andrasmaroy commented 11 months ago

Yes, I've just updated the provider and everything is working flawlessly again. Thank you for the quick turnaround!