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

docs: update host set plugin filters examples #420

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

elimt
Copy link
Member

@elimt elimt commented Jun 22, 2023

This change is to update the example docs for host_set_plugin filters attribute to use a list strings instead of just strings.

WIthout using a list of strings, Terraform will falsely detect diffs with host set pluginfilters.

AWS host set plugin expects filters attributes to be passed as a list of strings instead of strings. It is currently backwards compatible with strings due to the migration normalizeData func on AWS host plugin.

Previously this was not working onCreate but Boundary PR-3338 fixed the bug.

This change is to update the example docs for `host_set_plugin` filters attribute to use a list strings instead of just strings.

AWS host set plugin expects filters attributes to be passed as a list of strings instead of strings. It is currently backwards compatible with strings due to the migration [normalizeData func](https://github.com/hashicorp/boundary-plugin-aws/blob/7bf9fe2ecf1f20d7ff8aea8306909abcde1d17a4/plugin/service/host/plugin.go#L256) on AWS host plugin.

Previously this was not working but [Boundary PR-3338](hashicorp/boundary#3338) fixed the bug.
@elimt elimt added this to the 0.13.x milestone Jun 22, 2023
@elimt elimt requested review from jefferai and talanknight June 22, 2023 20:46
Comment on lines -62 to -63
"filters" = "tag-key=foo",
"filters" = "tag-key=bar"
Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, would this example ever have worked? wouldn't jsonencode just set the "filters" key to whatever is defined last?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I don't think it's a valid example. It'd have always just used the last "filters" key

Copy link
Contributor

@talanknight talanknight left a comment

Choose a reason for hiding this comment

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

Thank you!

@elimt elimt merged commit 1c05eab into main Jun 23, 2023
@elimt elimt deleted the elimt-aws-host-set-filters branch June 23, 2023 18:21
elimt added a commit that referenced this pull request Jun 28, 2023
This change is to update the example docs for `host_set_plugin` filters attribute to use a list strings instead of just strings.

WIthout using a list of strings, Terraform will falsely detect diffs with host set plugin `filters`.


AWS host set plugin expects filters attributes to be passed as a list of strings instead of strings. It is currently backwards compatible with strings due to the migration [normalizeData func](https://github.com/hashicorp/boundary-plugin-aws/blob/7bf9fe2ecf1f20d7ff8aea8306909abcde1d17a4/plugin/service/host/plugin.go#L256) on AWS host plugin.

Previously this was not working but [Boundary PR-3338](hashicorp/boundary#3338) fixed the bug.
grantorchard pushed a commit to grantorchard/terraform-provider-boundary that referenced this pull request Aug 28, 2023
This change is to update the example docs for `host_set_plugin` filters attribute to use a list strings instead of just strings.

WIthout using a list of strings, Terraform will falsely detect diffs with host set plugin `filters`.


AWS host set plugin expects filters attributes to be passed as a list of strings instead of strings. It is currently backwards compatible with strings due to the migration [normalizeData func](https://github.com/hashicorp/boundary-plugin-aws/blob/7bf9fe2ecf1f20d7ff8aea8306909abcde1d17a4/plugin/service/host/plugin.go#L256) on AWS host plugin.

Previously this was not working but [Boundary PR-3338](hashicorp/boundary#3338) fixed the bug.
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