-
Notifications
You must be signed in to change notification settings - Fork 395
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
aws_cloudformation_stackset: adding new accounts doesn't create new stack instances #1608
Comments
Files identified in the description:
If these files are inaccurate, please update the |
Based on my understanding of the API, the To support real idempotency in this case, supplementary calls to the response = client.create_stack_instances(
StackSetName='string',
Accounts=[
'string',
],
DeploymentTargets={
'Accounts': [
'string',
],
'AccountsUrl': 'string',
'OrganizationalUnitIds': [
'string',
],
'AccountFilterType': 'NONE'|'INTERSECTION'|'DIFFERENCE'|'UNION'
},
Regions=[
'string',
],
ParameterOverrides=[
{
'ParameterKey': 'string',
'ParameterValue': 'string',
'UsePreviousValue': True|False,
'ResolvedValue': 'string'
},
],
OperationPreferences={
'RegionConcurrencyType': 'SEQUENTIAL'|'PARALLEL',
'RegionOrder': [
'string',
],
'FailureToleranceCount': 123,
'FailureTolerancePercentage': 123,
'MaxConcurrentCount': 123,
'MaxConcurrentPercentage': 123
},
OperationId='string',
CallAs='SELF'|'DELEGATED_ADMIN'
) EDIT: happy to work on implementing this functionality if we wish to support adding new accounts -- if the goal of the module is to remain close to the original CloudFormation feature that consists in updating existing accounts only, then a new Ansible module is required since the current collection does not have any module for provisioning new stack instances for an existing stackset. |
@Razique Thank you for reporting this. Feel free to open a PR to support this functionality. |
…ions against existing stacksets complete (#1790) cloudformation_stack_set - Add a waiter to ensure that running operations against existing stacksets complete SUMMARY Add a waiter to ensure that running operations against existing stacksets complete. Current code would fail in cases where new instances need to be added since the previous update_stack_set(module, stack_params, cfn) would still be running. Fixes #1608 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudformation_stack_set ADDITIONAL INFORMATION I initially thought that the module was not idempotent since new instances wouldn't be added to my existing stack sets. Upon closer examination, the issue had to do with the fact that we had prior calls being made before adding new instances to existing stack sets: raise error_class(parsed_response, operation_name)\nbotocore.errorfactory.OperationInProgressException: An error occurred (OperationInProgressException) when calling the UpdateStackInstances operation: Another Operation on StackSet arn:aws:cloudformation:us-east-1:XXXXXX:stackset/aws-config-stackset:2bcb419a-f263-48ca-9fe0-cdef11fb59de is in progress The error got triggered because of a missing waiter after this operation: changed |= update_stack_set(module, stack_params, cfn) This change add a waiter function after the update operation, which, in turn, ensure that the subsequent call to add stack instances to the stack set properly run. Reviewed-by: Mark Chappell
…ions against existing stacksets complete (#1790) cloudformation_stack_set - Add a waiter to ensure that running operations against existing stacksets complete SUMMARY Add a waiter to ensure that running operations against existing stacksets complete. Current code would fail in cases where new instances need to be added since the previous update_stack_set(module, stack_params, cfn) would still be running. Fixes #1608 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudformation_stack_set ADDITIONAL INFORMATION I initially thought that the module was not idempotent since new instances wouldn't be added to my existing stack sets. Upon closer examination, the issue had to do with the fact that we had prior calls being made before adding new instances to existing stack sets: raise error_class(parsed_response, operation_name)\nbotocore.errorfactory.OperationInProgressException: An error occurred (OperationInProgressException) when calling the UpdateStackInstances operation: Another Operation on StackSet arn:aws:cloudformation:us-east-1:XXXXXX:stackset/aws-config-stackset:2bcb419a-f263-48ca-9fe0-cdef11fb59de is in progress The error got triggered because of a missing waiter after this operation: changed |= update_stack_set(module, stack_params, cfn) This change add a waiter function after the update operation, which, in turn, ensure that the subsequent call to add stack instances to the stack set properly run. Reviewed-by: Mark Chappell (cherry picked from commit 2c91768)
…ions against existing stacksets complete (#1790) (#1806) [PR #1790/2c917689 backport][stable-5] cloudformation_stack_set - Add a waiter to ensure that running operations against existing stacksets complete This is a backport of PR #1790 as merged into main (2c91768). SUMMARY Add a waiter to ensure that running operations against existing stacksets complete. Current code would fail in cases where new instances need to be added since the previous update_stack_set(module, stack_params, cfn) would still be running. Fixes #1608 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudformation_stack_set ADDITIONAL INFORMATION I initially thought that the module was not idempotent since new instances wouldn't be added to my existing stack sets. Upon closer examination, the issue had to do with the fact that we had prior calls being made before adding new instances to existing stack sets: raise error_class(parsed_response, operation_name)\nbotocore.errorfactory.OperationInProgressException: An error occurred (OperationInProgressException) when calling the UpdateStackInstances operation: Another Operation on StackSet arn:aws:cloudformation:us-east-1:XXXXXX:stackset/aws-config-stackset:2bcb419a-f263-48ca-9fe0-cdef11fb59de is in progress The error got triggered because of a missing waiter after this operation: changed |= update_stack_set(module, stack_params, cfn) This change add a waiter function after the update operation, which, in turn, ensure that the subsequent call to add stack instances to the stack set properly run. Reviewed-by: Mark Chappell
…-collections#1608) s3_object - allow recursive copy of all objects in S3 bucket SUMMARY Add support to copy recursively all objects from one bucket to another one, user can set prefix to limit the object to copy. closes ansible-collections#1379 ISSUE TYPE Feature Pull Request COMPONENT NAME s3_object Reviewed-by: Helen Bailey <[email protected]> Reviewed-by: Bikouo Aubin
Summary
Hi,
I have noticed that the
cloudformation_stack_set
module doesn't seem to support adding new accounts.The stack set is initially provisioned with a list of accounts, however, on subsequent runs that have more accounts, the module doesn't add these new accounts.
Issue Type
Bug Report
Component Name
cloudformation_stack_set
Ansible Version
Collection Versions
AWS SDK versions
Configuration
$ ansible-config dump --only-changed
OS / Environment
Fedora release 34
Steps to Reproduce
Expected Results
When adding an account to the
accounts
parameter, the module should deploy a new stack instance for that account.Actual Results
Currently, the new account isn't being added.
Code of Conduct
The text was updated successfully, but these errors were encountered: