-
Notifications
You must be signed in to change notification settings - Fork 816
[BUG]: github_actions_environment_secret to be created again if secret value had been changed UI #2288
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
Comments
Why would you want a "empty" plan when the secret value in tfstate doesn't match the newly supplied? I agree that a "1 to add" plan is incorrect - but wouldn't it be better with a "1 to change" |
The emphasize is "updating value in UI"
|
So this is the logic that is responsible for this behaviour: if updatedAt, ok := d.GetOk("updated_at"); ok && updatedAt != secret.UpdatedAt.String() {
log.Printf("[INFO] The secret %s has been externally updated in GitHub", d.Id())
d.SetId("")
} else if !ok {
if err = d.Set("updated_at", secret.UpdatedAt.String()); err != nil {
return err
}
} Wouldn't this solve our issue, but keep the original functionality as well? if updatedAt, ok := d.GetOk("updated_at"); ok && updatedAt != secret.UpdatedAt.String() {
log.Printf("[INFO] The secret %s has been externally updated in GitHub", d.Id())
d.Set("encrypted_value", "")
d.Set("plaintext_value", "")
} else if !ok {
if err = d.Set("updated_at", secret.UpdatedAt.String()); err != nil {
return err
}
} |
seems to be duplicate of #1383 |
Expected Behavior
This configuration should produce an empty plan when updating
plaintext_value
in UIActual Behavior
github_actions_environment_secret.terraform_infrastructure_tfe_token will be created
}
Plan: 1 to add, 0 to change, 0 to destroy.
Terraform Version
Terraform v1.8.2
on darwin_arm64
Affected Resource(s)
Terraform Configuration Files
No response
Steps to Reproduce
No response
Debug Output
Panic Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: