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

[PR #1402/aa86240d backport][stable-5] ec2_spot_instance: add parameter to enable terminating spot instances when cancelling request #1418

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Mar 8, 2023

This is a backport of PR #1402 as merged into main (aa86240).

SUMMARY

This PR adds a new parameter terminate_instances (true | false) to enable terminating spot instances when cancelling request.
Can be used only when state=absent.

Fixes #1360

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ec2_spot_instance

ADDITIONAL INFORMATION

… when cancelling request (#1402)

ec2_spot_instance: add parameter to enable terminating spot instances when cancelling request

SUMMARY

This PR adds a new parameter terminate_instances (true | false) to enable terminating spot instances when cancelling request.
Can be used only when state=absent.

Fixes #1360
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

ec2_spot_instance
ADDITIONAL INFORMATION

Reviewed-by: Bikouo Aubin
Reviewed-by: Mandar Kulkarni <[email protected]>
Reviewed-by: Alina Buzachis
Reviewed-by: Mark Chappell
(cherry picked from commit aa86240)
@github-actions
Copy link

github-actions bot commented Mar 8, 2023

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/875830c38dfa4c13a1c923f6633fa303

✔️ ansible-galaxy-importer SUCCESS in 4m 10s
✔️ build-ansible-collection SUCCESS in 23m 39s
✔️ ansible-test-sanity-aws-ansible-python38 SUCCESS in 11m 03s (non-voting)
✔️ ansible-test-sanity-aws-ansible-2.12-python38 SUCCESS in 10m 32s
✔️ ansible-test-sanity-aws-ansible-2.13-python38 SUCCESS in 10m 07s
✔️ ansible-test-sanity-aws-ansible-2.14 SUCCESS in 10m 20s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 33s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 19s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 16s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 31s
✔️ cloud-tox-py3 SUCCESS in 4m 01s
✔️ ansible-test-changelog SUCCESS in 8m 24s
✔️ ansible-test-splitter SUCCESS in 9m 10s
✔️ integration-amazon.aws-1 SUCCESS in 13m 46s
Skipped 43 jobs

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Mar 17, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/c376eae213e548e0a9058abf351219fe

✔️ ansible-galaxy-importer SUCCESS in 3m 51s
✔️ build-ansible-collection SUCCESS in 12m 26s
✔️ ansible-test-splitter SUCCESS in 4m 38s
✔️ integration-amazon.aws-1 SUCCESS in 15m 20s
Skipped 43 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 5406b67 into stable-5 Mar 17, 2023
@softwarefactory-project-zuul softwarefactory-project-zuul bot deleted the patchback/backports/stable-5/aa86240df748e12ed145910ad2927296c14dad66/pr-1402 branch March 17, 2023 13:55
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
…ible-collections#1418)

sns_topic - Fix Permission Issue for Cross Account Subscriptions

SUMMARY

sns_topic currently fails with the following error if it has any cross account subscriptions:
Couldn't get subscription attributes for subscription arn:aws:sns:us-east-1:123412341234:my-sns-topic-name:555950dc-7c5f-416c-8f8e-e8f38eabfa54: An error occurred (AuthorizationError) when calling the GetSubscriptionAttributes operation: Not authorized to access this subscription

This happens, for example, when a Lambda function in account A is subscribed to an SNS topic in account B, as described here.
I believe this was caused by ansible-collections#640.
I am not sure how to write a test for this specific situation as it would require multiple AWS accounts.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

sns_topic
ADDITIONAL INFORMATION



- community.aws.sns_topic:
    name: my-sns-topic-in-account-123412341234
    subscriptions:
      - endpoint: "arn:aws:lambda:us-east-1:567856785678:function:my-lambda-function-in-account-567856785678"
        protocol: lambda
    state: present

Reviewed-by: Mark Chappell <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
…ible-collections#1418)

sns_topic - Fix Permission Issue for Cross Account Subscriptions

SUMMARY

sns_topic currently fails with the following error if it has any cross account subscriptions:
Couldn't get subscription attributes for subscription arn:aws:sns:us-east-1:123412341234:my-sns-topic-name:555950dc-7c5f-416c-8f8e-e8f38eabfa54: An error occurred (AuthorizationError) when calling the GetSubscriptionAttributes operation: Not authorized to access this subscription

This happens, for example, when a Lambda function in account A is subscribed to an SNS topic in account B, as described here.
I believe this was caused by ansible-collections#640.
I am not sure how to write a test for this specific situation as it would require multiple AWS accounts.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

sns_topic
ADDITIONAL INFORMATION



- community.aws.sns_topic:
    name: my-sns-topic-in-account-123412341234
    subscriptions:
      - endpoint: "arn:aws:lambda:us-east-1:567856785678:function:my-lambda-function-in-account-567856785678"
        protocol: lambda
    state: present

Reviewed-by: Mark Chappell <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Oct 24, 2023
…ible-collections#1418)

sns_topic - Fix Permission Issue for Cross Account Subscriptions

SUMMARY

sns_topic currently fails with the following error if it has any cross account subscriptions:
Couldn't get subscription attributes for subscription arn:aws:sns:us-east-1:123412341234:my-sns-topic-name:555950dc-7c5f-416c-8f8e-e8f38eabfa54: An error occurred (AuthorizationError) when calling the GetSubscriptionAttributes operation: Not authorized to access this subscription

This happens, for example, when a Lambda function in account A is subscribed to an SNS topic in account B, as described here.
I believe this was caused by ansible-collections#640.
I am not sure how to write a test for this specific situation as it would require multiple AWS accounts.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

sns_topic
ADDITIONAL INFORMATION



- community.aws.sns_topic:
    name: my-sns-topic-in-account-123412341234
    subscriptions:
      - endpoint: "arn:aws:lambda:us-east-1:567856785678:function:my-lambda-function-in-account-567856785678"
        protocol: lambda
    state: present

Reviewed-by: Mark Chappell <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit Merge the PR (SoftwareFactory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants