Skip to content

Commit

Permalink
Fix integration tests - rds_cluster_modify/s3_object (#1769) (#1770)
Browse files Browse the repository at this point in the history
[PR #1769/269f08bb backport][stable-6] Fix integration tests - rds_cluster_modify/s3_object

This is a backport of PR #1769 as merged into main (269f08b).
SUMMARY
Amazon AWS have been changing things under us again:
S3 (and only S3) actions are now returning <bucket_name>:<Action> rather than s3:<Action>
RDS doesn't want us using MySQL 5.7 any more: aurora-mysql5.7 cannot be used for this instance. Please use a Parameter Group with DBParameterGroupFamily aurora-mysql8.0
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
rds_cluster
s3_object
ADDITIONAL INFORMATION
See also - https://ansible.softwarefactory-project.io/zuul/buildset/c14253ae9d6b4603b2bf6acfc2ad2bb0

Reviewed-by: Mark Chappell
patchback[bot] authored Sep 27, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 69d8b03 commit 1b38b2b
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -177,7 +177,7 @@

- name: Create DB cluster parameter group if not exists
command: aws rds create-db-cluster-parameter-group --db-cluster-parameter-group-name
{{ new_db_parameter_group_name }} --db-parameter-group-family aurora-mysql5.7 --description
{{ new_db_parameter_group_name }} --db-parameter-group-family aurora-mysql8.0 --description
"Test DB cluster parameter group"
environment:
AWS_ACCESS_KEY_ID: '{{ aws_access_key }}'
Original file line number Diff line number Diff line change
@@ -37,7 +37,9 @@
- upload_file_result is changed
- upload_file_result is not failed
- upload_file_result.msg == "PUT operation skipped - running in check mode"
- '"s3:PutObject" not in upload_file_result.resource_actions'
# Latest tests are returning <bucket_name>:PutObject -
# Amazon probably changed something on us...
# - '"s3:PutObject" not in upload_file_result.resource_actions'

- name: Upload a file to the bucket
amazon.aws.s3_object:
@@ -52,7 +54,9 @@
- upload_file_result is changed
- upload_file_result is not failed
- upload_file_result.msg == "PUT operation complete"
- '"s3:PutObject" in upload_file_result.resource_actions'
# Latest tests are returning <bucket_name>:PutObject -
# Amazon probably changed something on us...
# - '"s3:PutObject" in upload_file_result.resource_actions'

- name: Upload a file to the bucket (check_mode - idempotency)
amazon.aws.s3_object:
@@ -68,7 +72,9 @@
- upload_file_result is not changed
- upload_file_result is not failed
- upload_file_result.msg != "PUT operation complete"
- '"s3:PutObject" not in upload_file_result.resource_actions'
# Latest tests are returning <bucket_name>:PutObject -
# Amazon probably changed something on us...
# - '"s3:PutObject" not in upload_file_result.resource_actions'

- name: Upload a file to the bucket (idempotency)
amazon.aws.s3_object:
@@ -83,7 +89,9 @@
- upload_file_result is not changed
- upload_file_result is not failed
- upload_file_result.msg != "PUT operation complete"
- '"s3:PutObject" not in upload_file_result.resource_actions'
# Latest tests are returning <bucket_name>:PutObject -
# Amazon probably changed something on us...
# - '"s3:PutObject" not in upload_file_result.resource_actions'

- name: Create an object in the bucket with permissions (permission not set)
amazon.aws.s3_object:

0 comments on commit 1b38b2b

Please sign in to comment.