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

Mark resource and group description as computed #14

Merged
merged 3 commits into from
Feb 9, 2023

Conversation

jan-opal
Copy link
Contributor

@jan-opal jan-opal commented Feb 6, 2023

Description of the change

Currently when creating resources / groups via Terraform, if the user does not provide a description, the first sync of the imported resource / group will put a default description in.

This causes terraform plan to have a diff after creation. This avoids this.

NOTE: One issue with this solution is that the terraform provider SDK is not able to differentiate between not set at all and set to zero value. This means that it will not be possible to remove the description from Terraform once this change is made.

See hashicorp/terraform-plugin-sdk#1101

We can eventually mitigate this by migrating to a newly developed SDK https://github.com/hashicorp/terraform-plugin-framework

Checklist

  • I performed a self-review of my code
  • I manually tested my code change (please list details in description)
  • I added unit tests
  • I updated the changelog
  • I updated the public facing docs

@jan-opal jan-opal temporarily deployed to Test February 6, 2023 20:12 — with GitHub Actions Inactive
@jan-opal jan-opal temporarily deployed to Test February 6, 2023 20:18 — with GitHub Actions Inactive
Copy link

@tim-opal tim-opal left a comment

Choose a reason for hiding this comment

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

Discussed with Jan out of channel. We think we want to fix this also by not generating default descriptions in Opal, but may merge this as a stop-gap

Copy link
Collaborator

@giulio-opal giulio-opal left a comment

Choose a reason for hiding this comment

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

Can we revert this when we stop auto-generating descriptions in the backend?

@jan-opal
Copy link
Contributor Author

jan-opal commented Feb 9, 2023

Can we revert this when we stop auto-generating descriptions in the backend?

I think we'll be preserving the ability to import descriptions from the remove, so this would still be generally useful

@jan-opal jan-opal temporarily deployed to Test February 9, 2023 17:45 — with GitHub Actions Inactive
@jan-opal jan-opal merged commit ec30870 into main Feb 9, 2023
@jan-opal jan-opal temporarily deployed to Release February 9, 2023 18:16 — with GitHub Actions Inactive
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.

None yet

3 participants