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

Prevent permanent diff on argocd_cluster with sensitive attributes #298

Merged

Conversation

onematchfox
Copy link
Collaborator

This change ensures that the argocd_cluster resource won't perma-diff on sensitive attributes whilst, at the same time, ensuring that we track the remote state for non-sensitive attributes that are returned by the API (see comment inline).

Closes #297

}

if stateClusterConfig, ok := d.GetOk("config"); ok {
scc := expandClusterConfig(stateClusterConfig.([]interface{})[0])
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than expanding the existing state as was done previously, this change makes use of the TLSClientConfig that is returned by the API, which ensures that we track the remote state of the attributes the API does return (I.e. CAData, CertData, Insecure and ServerName).

@onematchfox onematchfox requested a review from oboukili June 7, 2023 07:40
@onematchfox onematchfox changed the title Prevent permanent diff on sensitive cluster attributes Prevent permanent diff on argocd_cluster with sensitive attributes Jun 7, 2023
@onematchfox onematchfox merged commit a6b8f70 into argoproj-labs:master Jun 9, 2023
@onematchfox onematchfox deleted the fix/cluster-exec-perma-diff branch June 9, 2023 05:35
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

Successfully merging this pull request may close these issues.

When defining args for cluster it always wants to recreate
2 participants