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

ec2_key: provide the ability to assign tags #547

Closed
1 task done
andytson opened this issue Oct 23, 2021 · 3 comments · Fixed by #548
Closed
1 task done

ec2_key: provide the ability to assign tags #547

andytson opened this issue Oct 23, 2021 · 3 comments · Fixed by #548
Labels
feature This issue/PR relates to a feature request has_pr module module plugins plugin (any type)

Comments

@andytson
Copy link

Summary

I want to use tags on ec2_keys for various purposes, such as limiting IAM policies, for example limiting ec2:RunInstances to only support keypairs with a set tag.

Tags are supported on KeyPairs

Please can the ability to create/delete tags be added to ec2_keys as is done on other modules?

Issue Type

Feature Idea

Component Name

ec2_key

Additional Information

- amazon.aws.ec2_key:
    name: myapp
    key_material: ".."
    tags:
      "example.com/myapp": "true"

- community.aws.iam_policy:
    iam_type: user
    iam_name: myapp
    policy_name: ec2
    policy_json:
      Version: "2012-10-17"
      Statement:
        - Effect: allow
          Action: ec2:RunInstances
          Resource: "arn:aws:ec2:us-east-1:1234567:key-pair/*"
          Condition:
            StringEquals:
              "aws:ResourceTag/example.com/myapp": "true"
        - Effect: allow
          Action: ec2:RunInstances
          Resource:
            - "arn:aws:ec2:us-east-1:1234567:instance/*"
            - "arn:aws:ec2:us-east-1:1234567:security-group/*"
            - "arn:aws:ec2:us-east-1:1234567:volume/*"
            - "arn:aws:ec2:us-east-1:1234567:network-interface/*"
            - "arn:aws:ec2:us-east-1:1234567:subnet/*"
            - "arn:aws:ec2:us-east-1::image/*"

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@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 Oct 23, 2021
@tremble
Copy link
Contributor

tremble commented Oct 23, 2021

Thanks for taking the time to make this suggestion, I agree supporting tagging is valuable.

I've opened PR #548 is you are able to test this it would be much appreciated.

ansible-zuul bot pushed a commit that referenced this issue Oct 25, 2021
ec2_key - add support for tagging and returning id

SUMMARY
Add support for tagging key pairs and also return the key ID
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_key
ADDITIONAL INFORMATION
fixes: #546
fixes: #547

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Sep 18, 2023
feat(kafka): aws_msk_config and aws_msk_cluster modules have been added

SUMMARY
Modules for Amazon Managed Streaming for Apache Kafka (Amazon MSK) have been added. There are two modules: aws_msk_config for managing MSK configuration and aws_msk_cluster -- for clusters.
ISSUE TYPE

New Module Pull Request

COMPONENT NAME

aws_msk_config
aws_msk_cluster

ADDITIONAL INFORMATION
All MSK cluster related operations are time consuming, for example create takes 20-30 minutes, update Kafka version -- more than one hour, update configuration -- 10-15 minutes.
Integration tests work in my own account, please let me know if I can help with an evidences.
REFERENCES
Related aws-terminator PR: mattclay/aws-terminator#143
Boto3: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/kafka.html

Reviewed-by: Mark Chappell <None>
Reviewed-by: Daniil Kupchenko <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Gonéri Le Bouder <[email protected]>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Oct 24, 2023
feat(kafka): aws_msk_config and aws_msk_cluster modules have been added

SUMMARY
Modules for Amazon Managed Streaming for Apache Kafka (Amazon MSK) have been added. There are two modules: aws_msk_config for managing MSK configuration and aws_msk_cluster -- for clusters.
ISSUE TYPE

New Module Pull Request

COMPONENT NAME

aws_msk_config
aws_msk_cluster

ADDITIONAL INFORMATION
All MSK cluster related operations are time consuming, for example create takes 20-30 minutes, update Kafka version -- more than one hour, update configuration -- 10-15 minutes.
Integration tests work in my own account, please let me know if I can help with an evidences.
REFERENCES
Related aws-terminator PR: mattclay/aws-terminator#143
Boto3: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/kafka.html

Reviewed-by: Mark Chappell <None>
Reviewed-by: Daniil Kupchenko <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Gonéri Le Bouder <[email protected]>
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)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants