-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adds support for creating Cloud KMS KeyRing resources #1
Conversation
Fix the CI tests we broke with the deprecations for 1.0.0, and update the docs we missed. Also, update the examples.
parent := createKmsResourceParentString(config.Project, location) | ||
keyRingName := createKmsResourceKeyRingName(config.Project, location, name) | ||
|
||
listKeyRingsResponse, err := config.clientKms.Projects.Locations.KeyRings.List(parent).Do() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose to use List
and iterate over the results instead of using Get
on the given KeyRing id, because otherwise it would have looked too much like the production code in resourceKmsKeyRingRead
Also, I neglected to create a new GCP project and use that during the execution of this test. I'll add this later so these tests won't fill the test project with a bunch of undeletable resources. |
…eprecations 1.0.0 Deprecations, pt 2
* instance templates still use the disk field * more fixes
….0.0_broken_links Fix broken links.
`compute_instance`'s StateVersion was set to 2. Then we released a migration to v3, but never updated the StateVersion to 3, meaning the migration was never run. When we added the migration for disks, we bumped to 4, bypassing 3 altogher. In theory, this is fine, and is expected; after all, some people may have state in version 0 and need to upgrade all the way to 4, so our schema migration function is supposed to support this. Unfortunately, for migrations to v2, v3, and v4 of our schema, the migration _returned_ after each migration, instead of falling through. This meant that (in this case), version 2 would see it needs to be version 4, run the state migration to version 3, then _return_, setting its StateVersion to _4_, which means the migration from 3->4 got skipped entirely. This PR bumps the version to 5, and adds a migration from 4->5 such that if there are still disks in state after 4, re-run 4. This will fix things for people that upgraded to 1.0.0 and had their StateVersion updated without the migration running. I also updated the tests @danawillow wrote to start from state version 2 instead of state version 3, as the state would never be in version 3. I also duplicated those tests, but started them from state version 4 (assuming the migration hadn't run) and verifying that the migration from 4->5 would correct that.
….0.0_migration Fix compute_instance migration bug.
With passing acceptance test