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

DNM Promote ec2_transit_gateway_vpc_attachment and ec2_transit_gateway_vpc_attachment_info modules and tests #2347

Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
aa3f28a
New Module: TGW VPC Attachments (#1004)
tremble May 2, 2022
7a85303
ec2_transit_gateway_vpc_attachment - retry on IncorrectState (#1147)
tremble May 17, 2022
4ca1987
Tagging fragment - Move simplest cases over to the docs fragment. (#1…
tremble Jun 1, 2022
2a5b38d
tests/integration: ensure the CI gives more time to some slow targets…
goneri Sep 16, 2022
7f26282
tests: dedicate more time to ec2_transit_gateway_vpc_attachment (#1494)
goneri Sep 17, 2022
6712b00
Make example AWS UUIDS follow a specific pattern (#1539)
tremble Sep 28, 2022
9605ba5
Update extends_documentation_fragment with amazon.aws.boto3 (#1459)
alinabuzachis Oct 5, 2022
54d39f6
Ansible User-Agent identification for community.aws (#1632)
abikouo Jan 10, 2023
2ce901d
fixed unneeded `state` in module docs. (#1728)
mihai-satmarean Feb 28, 2023
ac45143
Cleanup headers and imports (#1738)
tremble Mar 8, 2023
6b84c40
Big Black PR (#1784)
tremble Apr 26, 2023
87dcdc1
Mass update of docs and tests (credentials/session tokens) (#1921)
tremble Aug 31, 2023
89eb8d7
ansible-lint (documentation) cleanup for plugins/ (#2036)
tremble Jan 5, 2024
7649931
Add support to enable multicast on transit gateway (#2063)
cschimid Jul 2, 2024
1764a31
ec2_transit_gateway_vpc_attachment - Prepare module for migration to …
GomathiselviS Oct 18, 2024
aeaa375
Update runtime
alinabuzachis Oct 18, 2024
207faba
Update FQDN
alinabuzachis Oct 18, 2024
07fc71f
Update AnsibleAWSModule import path
alinabuzachis Oct 18, 2024
2f6cd79
Remove collection reference inside the tests
alinabuzachis Oct 18, 2024
337591c
Add changelog fragment
alinabuzachis Oct 18, 2024
68f9801
Apply isort
alinabuzachis Oct 18, 2024
ca6a98d
Update transitgateway.py
alinabuzachis Oct 18, 2024
cdcb00e
Update FQCN integration tests
alinabuzachis Oct 18, 2024
5300907
Fix naming
alinabuzachis Oct 24, 2024
338f211
Fix naming
alinabuzachis Oct 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix naming
Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
alinabuzachis committed Oct 24, 2024
commit 338f2115fdb0aea221099b50090f0b79081ebeb8
10 changes: 5 additions & 5 deletions plugins/module_utils/transitgateway.py
Original file line number Diff line number Diff line change
@@ -6,8 +6,7 @@
from copy import deepcopy

try:
from botocore.exceptions import BotoCoreError
from botocore.exceptions import ClientError
from botocore.exceptions import WaiterError
except ImportError:
pass

@@ -176,11 +175,12 @@ def wait_for_state_change(self, desired_state: str) -> None:
# Wait until attachment reaches the desired state
params = {"TransitGatewayAttachmentIds": [self.attachment_id]}
params.update(self.waiter_config)
waiter = get_waiter(self.client, f"transit_gateway_vpc_attachment_{desired_state}")

try:
waiter = get_waiter(self.client, f"transit_gateway_vpc_attachment_{desired_state}")
waiter.wait(**params)
except (BotoCoreError, ClientError) as e:
self.module.fail_json_aws_error(e)
except WaiterError as e:
self.module.fail_json_aws(e, "Timeout waiting for State change")


class AttachmentConfigurationManager:
Original file line number Diff line number Diff line change
@@ -107,8 +107,13 @@

- name: Save Attachment ID
set_fact:
complex_attachment_id: '{{ complex_attach.attachments[0].transit_gateway_attachment_id
}}'
complex_attachment_id: '{{ complex_attach.attachments[0].transit_gateway_attachment_id }}'

- name: Gather information about the attachment
amazon.aws.ec2_transit_gateway_vpc_attachment_info:
filters:
transit-gateway-id: '{{ tgw_id }}'
register: info

- name: (CHECK_MODE) Create an attachment - complex parameters -- IDEMPOTENCY
check_mode: true