Skip to content
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

Drone Secret Resource Broken When Modified from Drone UI #11

Open
oxr463 opened this issue Feb 22, 2022 · 0 comments
Open

Drone Secret Resource Broken When Modified from Drone UI #11

oxr463 opened this issue Feb 22, 2022 · 0 comments

Comments

@oxr463
Copy link

oxr463 commented Feb 22, 2022

If a drone secret is deleted from the Drone UI, then terraform will blow up with this error:

terraform plan
module.secrets.drone_secret.secret["master_password"]: Refreshing state... [id=oxr463/terraform-module-drone-repository/master_password]
╷
│ Error: failed to read Drone Secret: oxr463/terraform-module-drone-repository/master_password
│ 
│   with module.secrets.drone_secret.secret["master_password"],
│   on secrets/main.tf line 1, in resource "drone_secret" "secret":
│    1: resource "drone_secret" "secret" {
│ 
╵

The solution for this is to remove the secret from the terraform state:

terraform state rm 'module.secrets.drone_secret.secret["master_password"]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant