-
Notifications
You must be signed in to change notification settings - Fork 175
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
Migrate to for_each. Get rid of *_num options (breaking change). Fix destructiveness of updates. Add new playground test suite for testing updates. #64
Conversation
…dule behaves on role updates
Found a way to replicate this with the simplest usecase. In the base scenario of having 2 projects and 1 role specified with 1 member in authoritative mode. Adding just one additional role will lead to recreation of one iam resource instead of just reusing it. https://gist.github.com/cray0000/1f75fec0a6d32d2f31f8a4502e2558cd |
…k to 'count' when dynamic). [test/update] Change test to generate project ids statically instead of getting them from the resource outputs
…ariations of dynamic/static and authoritative/additive
… mode only for one entity. Support dynamic members only in authoritative mode. [test/update] Update tests to properly work the first time. Should pass on CI now.
…thoritative tests accordingly. Add ability to specify amount of roles to test in the 'update' test suite. [ci] Test how the module behaves on updates (of projects_iam module)
…-iam into f-test-updates
…[ci] Test configuration update for the whole authoritavite and additive suites. [test][update] rename update test suite to static-and-dynamic. Refactor.
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.
Thanks @cray0000!
A few changes requested. In addition, we need an upgrade guide similar to the existing ones under docs
since we are breaking the existing interface.
…adme] fix typos. [migration] Add migration guide from 3.0 to 4.0
test/integration/static-and-dynamic/controls/static-and-dynamic.rb
Outdated
Show resolved
Hide resolved
…ynamic] Refactor procedural generation of tests.
04d4d51
to
9f9d1ff
Compare
9f9d1ff
to
d4abeb2
Compare
…outputs from setup to kitchen.
@cray0000 Can you make sure tests pass? |
…tead of 'projects'
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.
Looks good. Just one request.
fix Adding new bindings is a destructive operation #11
fix for_each rewrite #46
fix Fix adding new bindings in additive mode #38
fix specifying a single project in projects-iam causes module to do nothing #69
Add a new test suite to use as a playground to test how the module behaves on role updates
Figure out a way to stabilize the roles/members order. This lead to breaking changes to the API. More on this below.
Migrate from
count
tofor_each
for static and dynamic usecases. Remove*_num
optionsAdd configuration update test into the CI. More on this below.
Add an upgrade guide from 3.0 to 4.0
API changes
*_num
options are removed.projects_iam
) only when 1 entity is passed. If you pass 2 or more, the configuration has to be static, meaning that it can't use any of the other resource's fields to get the entity name from (this includes getting the randomly generated hashes through therandom_id
resource).authoritative
mode.Testing configuration update.
In the
update
test suite I've setup an additional variableroles
(defaults to2
) which you can pass asTF_VAR_roles=3
when running theconverge
command. The fixtures currently support the amount of roles from1
to3
. But it's trivial to add more, if needed in future.This way we can reconverge the
update
test suite with differentTF_VAR_roles
values and verify. And by doing this multiple times we are basically testing the module configuration update behavior.