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 #627/a9b9bd13 backport][stable-2] ec2_vol - support changing from volume without IOPS to one with IOPS #640

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Jan 26, 2022

This is a backport of PR #627 as merged into main (a9b9bd1).

SUMMARY

Fixes #626

Changing from standard volume type to gp3 failed when the module was trying to read the "original" IOPS value from the existing volume, since it doesn't have one.

See the linked issue for detailed description.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_vol

ADDITIONAL INFORMATION

N/A

#627)

`ec2_vol` - support changing from volume without IOPS to one with IOPS

SUMMARY

Fixes #626
Changing from standard volume type to gp3 failed when the module was trying to read the "original" IOPS value from the existing volume, since it doesn't have one.
See the linked issue for detailed description.

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

ec2_vol
ADDITIONAL INFORMATION

N/A

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
(cherry picked from commit a9b9bd1)
@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review integration tests/integration module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) tests tests labels Jan 27, 2022
@jillr jillr removed the needs_triage label Feb 8, 2022
@jillr jillr added the gate label Feb 8, 2022
@alinabuzachis alinabuzachis added mergeit Merge the PR (SoftwareFactory) and removed gate labels Feb 9, 2022
@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit cad363f into stable-2 Feb 9, 2022
@softwarefactory-project-zuul softwarefactory-project-zuul bot deleted the patchback/backports/stable-2/a9b9bd13f412b9ff2a6a2fa1be5ecce08cfc2d0b/pr-627 branch February 9, 2022 15:36
alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this pull request Feb 18, 2022
ansible-collections#627) (ansible-collections#640)

[PR ansible-collections#627/a9b9bd13 backport][stable-2] `ec2_vol` - support changing from volume without IOPS to one with IOPS

This is a backport of PR ansible-collections#627 as merged into main (a9b9bd1).
SUMMARY

Fixes ansible-collections#626
Changing from standard volume type to gp3 failed when the module was trying to read the "original" IOPS value from the existing volume, since it doesn't have one.
See the linked issue for detailed description.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ec2_vol
ADDITIONAL INFORMATION



N/A

Reviewed-by: Jill R <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
…or RawMessageDelievery (SQS) (ansible-collections#640)

Add support for SQS RawMessageDelievery attribute in subscriptions - issue ansible-collections#193

SUMMARY

Added support to configure RawMessageDelievery option when configuring sqs endpoints.
It use boto3 set_subscription_attributes() to configure changes.
It currently supports only this option, but should be easily extended in the future.
Attributes are expected in the form as in the boto3 docs:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sns.html#SNS.Client.set_subscription_attributes
Fixes ansible-collections#193

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

updates sns_topic.py to support new functionality

example:

- sns_topic:
    name: '{{ sns_topic_topic_name }}'
    display_name: My new topic name
    subscriptions:
    - endpoint: "{{ sqs_arn }}"
      protocol: sqs
      attributes:
        RawMessageDelivery: true

Reviewed-by: Jill R <None>
Reviewed-by: None <None>
Reviewed-by: Alina Buzachis <None>
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 Sep 18, 2023
…or RawMessageDelievery (SQS) (ansible-collections#640)

Add support for SQS RawMessageDelievery attribute in subscriptions - issue ansible-collections#193

SUMMARY

Added support to configure RawMessageDelievery option when configuring sqs endpoints.
It use boto3 set_subscription_attributes() to configure changes.
It currently supports only this option, but should be easily extended in the future.
Attributes are expected in the form as in the boto3 docs:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sns.html#SNS.Client.set_subscription_attributes
Fixes ansible-collections#193

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

updates sns_topic.py to support new functionality

example:

- sns_topic:
    name: '{{ sns_topic_topic_name }}'
    display_name: My new topic name
    subscriptions:
    - endpoint: "{{ sqs_arn }}"
      protocol: sqs
      attributes:
        RawMessageDelivery: true

Reviewed-by: Jill R <None>
Reviewed-by: None <None>
Reviewed-by: Alina Buzachis <None>
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
…or RawMessageDelievery (SQS) (ansible-collections#640)

Add support for SQS RawMessageDelievery attribute in subscriptions - issue ansible-collections#193

SUMMARY

Added support to configure RawMessageDelievery option when configuring sqs endpoints.
It use boto3 set_subscription_attributes() to configure changes.
It currently supports only this option, but should be easily extended in the future.
Attributes are expected in the form as in the boto3 docs:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sns.html#SNS.Client.set_subscription_attributes
Fixes ansible-collections#193

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

updates sns_topic.py to support new functionality

example:

- sns_topic:
    name: '{{ sns_topic_topic_name }}'
    display_name: My new topic name
    subscriptions:
    - endpoint: "{{ sqs_arn }}"
      protocol: sqs
      attributes:
        RawMessageDelivery: true

Reviewed-by: Jill R <None>
Reviewed-by: None <None>
Reviewed-by: Alina Buzachis <None>
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
bug This issue/PR relates to a bug community_review integration tests/integration mergeit Merge the PR (SoftwareFactory) module module new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants