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

Fixed non-unique ids in redshift_grant possible #51

Merged
merged 2 commits into from
Feb 10, 2022

Conversation

rg00d
Copy link
Contributor

@rg00d rg00d commented Feb 8, 2022

Currently, there is a risk of obtaining redshift_grant resources having identical id. This fix allows to avoid it.

@rg00d rg00d self-assigned this Feb 8, 2022
@rg00d rg00d requested a review from winglot February 8, 2022 09:57
@mtesch-um
Copy link
Contributor

Just a comment - probably it would be sufficient to simply use - as a separator instead of _ because neither schema nor group names can contain that character. I think that would also make a pass-through import format for the resource simpler?

I wonder, does this need a state migration to the new state format? https://www.terraform.io/plugin/sdkv2/resources/state-migration

@rg00d rg00d linked an issue Feb 9, 2022 that may be closed by this pull request
@rg00d
Copy link
Contributor Author

rg00d commented Feb 10, 2022

Just a comment - probably it would be sufficient to simply use - as a separator instead of _ because neither schema nor group names can contain that character. I think that would also make a pass-through import format for the resource simpler?

We have checked this possibility and it seems that discussed vulnerability has still existed.

I wonder, does this need a state migration to the new state format? https://www.terraform.io/plugin/sdkv2/resources/state-migration

We have decided not to incorporate a state upgrader since this provider is still in the initial development phase.
ID will be recreated as a result of each Update action since it utilises the same underlying resourceRedshiftGrantCreate() function.

@rg00d rg00d merged commit bda65cb into master Feb 10, 2022
@rg00d rg00d deleted the AI-975-redshift_grant_produces_non_unique_ids branch February 10, 2022 11:35
@rg00d rg00d added the bug Something isn't working label Feb 10, 2022
@winglot winglot removed the bug Something isn't working label Feb 16, 2022
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.

non-unique ids in redshift_grant possible
3 participants