Skip to content
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

rds_instance module should support adding IAM roles #464

Closed
nsushkin opened this issue Mar 6, 2021 · 4 comments · Fixed by #1002
Closed

rds_instance module should support adding IAM roles #464

nsushkin opened this issue Mar 6, 2021 · 4 comments · Fixed by #1002
Assignees
Labels
feature This issue/PR relates to a feature request has_pr module module plugins plugin (any type) waiting_on_contributor Needs help. Feel free to engage to get things unblocked

Comments

@nsushkin
Copy link

nsushkin commented Mar 6, 2021

SUMMARY

AWS supports adding IAM roles to RDS instance. It is required for an RDS instance to be able to access an S3 bucket.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

rds_instance

ADDITIONAL INFORMATION

AWS CLI supports this via
https://docs.aws.amazon.com/cli/latest/reference/rds/add-role-to-db-instance.html

Adding S3 integration to RDS is described in
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-s3-integration.html#oracle-s3-integration.preparing

There is an article on Stack Overflow describing a workaround with plays using AWS CLI to do this
https://stackoverflow.com/questions/63010540/attaching-iam-role-to-aws-rds-instance-with-ansible

I think most people would set this up when creating a new RDS instance, so it would make sense
to add this functionality to the rds_instance module instead of making another module.

Since AWS CLI takes feature-name and role-arn arguments, perhaps the usage could be as follows:

rds_instance:
  db_instance_identifier: 'test-instance'
  iam_roles:
    - role_arn: 'arn:aws:iam::111122223333:role/rds-s3-integration-role'
      feature_name: 'S3_INTEGRATION'
@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module needs_triage plugins plugin (any type) labels Mar 6, 2021
@goneri goneri added waiting_on_contributor Needs help. Feel free to engage to get things unblocked and removed needs_triage labels Apr 30, 2021
@markuman markuman mentioned this issue Feb 1, 2022
1 task
@jatorcasso
Copy link
Contributor

I can work on adding this

@ansibullbot
Copy link

@jatorcasso jatorcasso self-assigned this Apr 4, 2022
softwarefactory-project-zuul bot pushed a commit that referenced this issue Apr 12, 2022
…/removing iam roles (#1002)

rds_instance - fix check_mode and idempotence bugs and support adding/removing iam roles

SUMMARY

Support the addition and deletion of iam roles to db instances
Fixes #464
Fixes #1013
Integration tests to test both this and the amazon.aws module_util rds changes

Depends-On ansible-collections/amazon.aws#714
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
rds_instance
ADDITIONAL INFORMATION
Wasn't sure the best way to go about deleting IAM roles - ended up using a purge_iam_roles param that defaults to False, which seems consistent with other modules I've looked at.

Reviewed-by: Mark Woolley <mw@marknet15.com>
Reviewed-by: Joseph Torcasso <None>
Reviewed-by: Gonéri Le Bouder <goneri@lebouder.net>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Markus Bergholz <git@osuv.de>
patchback bot pushed a commit that referenced this issue Apr 12, 2022
…/removing iam roles (#1002)

rds_instance - fix check_mode and idempotence bugs and support adding/removing iam roles

SUMMARY

Support the addition and deletion of iam roles to db instances
Fixes #464
Fixes #1013
Integration tests to test both this and the amazon.aws module_util rds changes

Depends-On ansible-collections/amazon.aws#714
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
rds_instance
ADDITIONAL INFORMATION
Wasn't sure the best way to go about deleting IAM roles - ended up using a purge_iam_roles param that defaults to False, which seems consistent with other modules I've looked at.

Reviewed-by: Mark Woolley <mw@marknet15.com>
Reviewed-by: Joseph Torcasso <None>
Reviewed-by: Gonéri Le Bouder <goneri@lebouder.net>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Markus Bergholz <git@osuv.de>
(cherry picked from commit c403552)
softwarefactory-project-zuul bot pushed a commit that referenced this issue Apr 16, 2022
…/removing iam roles (#1002) (#1055)

[PR #1002/c403552f backport][stable-3] rds_instance - fix check_mode and idempotence bugs and support adding/removing iam roles

This is a backport of PR #1002 as merged into main (c403552).
SUMMARY

Support the addition and deletion of iam roles to db instances
Fixes #464
Fixes #1013
Integration tests to test both this and the amazon.aws module_util rds changes

Depends-On ansible-collections/amazon.aws#714
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
rds_instance
ADDITIONAL INFORMATION
Wasn't sure the best way to go about deleting IAM roles - ended up using a purge_iam_roles param that defaults to False, which seems consistent with other modules I've looked at.

Reviewed-by: Mark Chappell <None>
Reviewed-by: Markus Bergholz <git@osuv.de>
alinabuzachis added a commit to alinabuzachis/community.aws that referenced this issue May 25, 2022
Add waiters for RDS cluster

SUMMARY

Add waiters for RDS cluster (cluster_available and cluster_deleted) required by ansible-collections#687

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

waiters.py
Depends-On: ansible/ansible-zuul-jobs#1062

Reviewed-by: Mark Chappell <None>
Reviewed-by: None <None>
abikouo pushed a commit to abikouo/community.aws that referenced this issue Oct 24, 2023
…/removing iam roles (ansible-collections#1002)

rds_instance - fix check_mode and idempotence bugs and support adding/removing iam roles

SUMMARY

Support the addition and deletion of iam roles to db instances
Fixes ansible-collections#464
Fixes ansible-collections#1013
Integration tests to test both this and the amazon.aws module_util rds changes

Depends-On ansible-collections/amazon.aws#714
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
rds_instance
ADDITIONAL INFORMATION
Wasn't sure the best way to go about deleting IAM roles - ended up using a purge_iam_roles param that defaults to False, which seems consistent with other modules I've looked at.

Reviewed-by: Mark Woolley <mw@marknet15.com>
Reviewed-by: Joseph Torcasso <None>
Reviewed-by: Gonéri Le Bouder <goneri@lebouder.net>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Markus Bergholz <git@osuv.de>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections@c403552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request has_pr module module plugins plugin (any type) waiting_on_contributor Needs help. Feel free to engage to get things unblocked
Projects
None yet
4 participants