Open oxr463 opened 2 years ago
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"]'
If a drone secret is deleted from the Drone UI, then terraform will blow up with this error:
The solution for this is to remove the secret from the terraform state: