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

fix: Fix inconsistent result after apply error for cluster tags #38

Conversation

maciaszczykm
Copy link
Member

No description provided.

Copy link

linear bot commented Jun 3, 2024

…ing-terraform-provider-bug-when-creating-cluster-wo
Copy link
Member

@michaeljguarino michaeljguarino left a comment

Choose a reason for hiding this comment

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

Not sure if this solves it, but we should also be able to gracefully handle tags being managed by something else (eg Cluster CRDs). I think currently it might remove tags if an empty map is specified in TF but the CRD adds a few additional.

My expectation would be a null value means terraform ignores that field.

@@ -56,6 +56,10 @@ type cluster struct {
// }

func (c *cluster) TagsAttribute(ctx context.Context, d diag.Diagnostics) []*console.TagAttributes {
if c.Tags.IsNull() {
return nil
}
Copy link
Member Author

@maciaszczykm maciaszczykm Jun 3, 2024

Choose a reason for hiding this comment

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

@michaeljguarino I think this should solve the issue you mentioned in the comment above.

Copy link
Member

Choose a reason for hiding this comment

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

Ok awesome

@michaeljguarino michaeljguarino merged commit e97ade9 into main Jun 3, 2024
10 of 11 checks passed
@michaeljguarino michaeljguarino deleted the marcin/eng-2117-annoying-terraform-provider-bug-when-creating-cluster-wo branch June 3, 2024 17:04
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.

2 participants