ec2_vpc_net_info: integration tests (#62649)

* ec2_vpc_net: (integration tests) migrate to using module_defaults

* ec2_vpc_net: (integration tests) use a private subnet for the tests

* ec2_vpc_net_info: Add integration tests

* ec2_vpc_net_info: add cidr_block_association_set to documentation

* Update AWS hacking test policy to allow VPC CIDR disassociation

* Update test/integration/targets/ec2_vpc_net/tasks/main.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Store vpc2 ID to make it clearer which VPC we're changing

* Be more consistent with our quoting

* Explicitly test that the VPC IDs haven't changed
This commit is contained in:
Mark Chappell 2019-11-14 21:36:42 +01:00 committed by Jill R
parent db3994cb03
commit 551b17b8a2
5 changed files with 1102 additions and 110 deletions

View File

@ -77,6 +77,7 @@
"ec2:DisassociateAddress",
"ec2:DisassociateRouteTable",
"ec2:DisassociateSubnetCidrBlock",
"ec2:DisassociateVpcCidrBlock",
"ec2:ModifySubnetAttribute",
"ec2:ModifyVpcAttribute",
"ec2:ReleaseAddress",

View File

@ -106,6 +106,28 @@ vpcs:
description: True/False depending on attribute setting for DNS support.
returned: always
type: bool
cidr_block_association_set:
description: An array of IPv4 cidr block association set information.
returned: always
type: complex
contains:
association_id:
description: The association ID
returned: always
type: str
cidr_block:
description: The IPv4 CIDR block that is associated with the VPC.
returned: always
type: str
cidr_block_state:
description: A hash/dict that contains a single item. The state of the cidr block association.
returned: always
type: dict
contains:
state:
description: The CIDR block association state.
returned: always
type: str
ipv6_cidr_block_association_set:
description: An array of IPv6 cidr block association set information.
returned: always

View File

@ -1,2 +1,3 @@
ec2_vpc_net_info
cloud/aws
shippable/aws/group2

View File

@ -1,2 +1,5 @@
---
# defaults file for ec2_vpc_net
vpc_cidr: '10.{{ 256 | random(seed=resource_prefix) }}.0.0/24'
vpc_cidr_a: '10.{{ 256 | random(seed=resource_prefix) }}.1.0/24'
vpc_cidr_b: '10.{{ 256 | random(seed=resource_prefix) }}.2.0/24'

File diff suppressed because it is too large Load Diff