-
Notifications
You must be signed in to change notification settings - Fork 397
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
iam role boundary does not account for gov-cloud #1846
Comments
The example has the boundary commented, but not in the actual code |
tremble
added a commit
to tremble/community.aws
that referenced
this issue
Jun 21, 2023
fixes: ansible-collections#1846 Various modules had hard-coded ARN handling which assumed the use of the main partition. This causes problems for folks using Gov Cloud (and aws-cn)
Thanks for taking the time to open this issue. It looks like we did this in various places. I've lined up a pair of PRs to try and fix the issue. |
tremble
added a commit
to tremble/community.aws
that referenced
this issue
Jun 22, 2023
fixes: ansible-collections#1846 Various modules had hard-coded ARN handling which assumed the use of the main partition. This causes problems for folks using Gov Cloud (and aws-cn)
tremble
added a commit
to tremble/community.aws
that referenced
this issue
Jun 22, 2023
fixes: ansible-collections#1846 Various modules had hard-coded ARN handling which assumed the use of the main partition. This causes problems for folks using Gov Cloud (and aws-cn)
softwarefactory-project-zuul bot
pushed a commit
to ansible-collections/amazon.aws
that referenced
this issue
Jun 23, 2023
Refactor ARN validation code SUMMARY Adds resource_id and resource_type to parse_aws_arn() return value. Adds validate_aws_arn() to handle common pattern matching for ARNs. ISSUE TYPE Feature Pull Request COMPONENT NAME ec2_instance iam_user ADDITIONAL INFORMATION Related to ansible-collections/community.aws#1846 - We've been doing things like assuming the aws partition. Reviewed-by: Alina Buzachis
patchback bot
pushed a commit
to ansible-collections/amazon.aws
that referenced
this issue
Jun 23, 2023
Refactor ARN validation code SUMMARY Adds resource_id and resource_type to parse_aws_arn() return value. Adds validate_aws_arn() to handle common pattern matching for ARNs. ISSUE TYPE Feature Pull Request COMPONENT NAME ec2_instance iam_user ADDITIONAL INFORMATION Related to ansible-collections/community.aws#1846 - We've been doing things like assuming the aws partition. Reviewed-by: Alina Buzachis (cherry picked from commit 344dbd1)
tremble
added a commit
to tremble/community.aws
that referenced
this issue
Jun 23, 2023
fixes: ansible-collections#1846 Various modules had hard-coded ARN handling which assumed the use of the main partition. This causes problems for folks using Gov Cloud (and aws-cn)
tremble
added a commit
to tremble/community.aws
that referenced
this issue
Jun 26, 2023
fixes: ansible-collections#1846 Various modules had hard-coded ARN handling which assumed the use of the main partition. This causes problems for folks using Gov Cloud (and aws-cn)
softwarefactory-project-zuul bot
pushed a commit
that referenced
this issue
Jun 26, 2023
Various ARN handling fixes Depends-On: ansible-collections/amazon.aws#1619 SUMMARY fixes: #1846 Various modules had hard-coded ARN handling which assumed the use of the main partition. This causes problems for folks using Gov Cloud (and aws-cn) ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/batch_compute_environment.py plugins/modules/ec2_launch_template.py plugins/modules/elasticache_info.py plugins/modules/iam_group.py plugins/modules/iam_role.py plugins/modules/msk_config.py plugins/modules/redshift.py plugins/modules/sns_topic.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis
tremble
pushed a commit
to ansible-collections/amazon.aws
that referenced
this issue
Jun 27, 2023
SUMMARY Adds resource_id and resource_type to parse_aws_arn() return value. Adds validate_aws_arn() to handle common pattern matching for ARNs. ISSUE TYPE Feature Pull Request COMPONENT NAME ec2_instance iam_user ADDITIONAL INFORMATION Related to ansible-collections/community.aws#1846 - We've been doing things like assuming the aws partition. Reviewed-by: Alina Buzachis (cherry picked from commit 344dbd1)
patchback bot
pushed a commit
that referenced
this issue
Jun 27, 2023
Various ARN handling fixes Depends-On: ansible-collections/amazon.aws#1619 SUMMARY fixes: #1846 Various modules had hard-coded ARN handling which assumed the use of the main partition. This causes problems for folks using Gov Cloud (and aws-cn) ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/batch_compute_environment.py plugins/modules/ec2_launch_template.py plugins/modules/elasticache_info.py plugins/modules/iam_group.py plugins/modules/iam_role.py plugins/modules/msk_config.py plugins/modules/redshift.py plugins/modules/sns_topic.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis (cherry picked from commit 25a636c)
softwarefactory-project-zuul bot
pushed a commit
that referenced
this issue
Jun 27, 2023
[PR #1848/25a636ce backport][stable-6] Various ARN handling fixes This is a backport of PR #1848 as merged into main (25a636c). Depends-On: ansible-collections/amazon.aws#1619 SUMMARY fixes: #1846 Various modules had hard-coded ARN handling which assumed the use of the main partition. This causes problems for folks using Gov Cloud (and aws-cn) ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/batch_compute_environment.py plugins/modules/ec2_launch_template.py plugins/modules/elasticache_info.py plugins/modules/iam_group.py plugins/modules/iam_role.py plugins/modules/msk_config.py plugins/modules/redshift.py plugins/modules/sns_topic.py ADDITIONAL INFORMATION Reviewed-by: Mark Chappell
abikouo
pushed a commit
to abikouo/community.aws
that referenced
this issue
Oct 24, 2023
Various ARN handling fixes Depends-On: ansible-collections/amazon.aws#1619 SUMMARY fixes: ansible-collections#1846 Various modules had hard-coded ARN handling which assumed the use of the main partition. This causes problems for folks using Gov Cloud (and aws-cn) ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/batch_compute_environment.py plugins/modules/ec2_launch_template.py plugins/modules/elasticache_info.py plugins/modules/iam_group.py plugins/modules/iam_role.py plugins/modules/msk_config.py plugins/modules/redshift.py plugins/modules/sns_topic.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections@25a636c
abikouo
pushed a commit
to abikouo/community.aws
that referenced
this issue
Oct 24, 2023
Various ARN handling fixes Depends-On: ansible-collections/amazon.aws#1619 SUMMARY fixes: ansible-collections#1846 Various modules had hard-coded ARN handling which assumed the use of the main partition. This causes problems for folks using Gov Cloud (and aws-cn) ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/batch_compute_environment.py plugins/modules/ec2_launch_template.py plugins/modules/elasticache_info.py plugins/modules/iam_group.py plugins/modules/iam_role.py plugins/modules/msk_config.py plugins/modules/redshift.py plugins/modules/sns_topic.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections@25a636c
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
When using a gov cloud policy the arn starts with 'arn:aws-us-gov:iam'
if not module.params.get("boundary").startswith("arn:aws:iam"):
module.fail_json(msg="Boundary policy must be an ARN")
Issue Type
Bug Report
Component Name
community.aws.iam_role:
Ansible Version
Collection Versions
AWS SDK versions
Configuration
$ ansible-config dump --only-changed
OS / Environment
RHEL8
Steps to Reproduce
Expected Results
I expected the role to be created
Actual Results
msg: Boundary policy must be an ARN
Code of Conduct
The text was updated successfully, but these errors were encountered: