I spent some time trying to use this module and had trouble finding documentation for the filters to pass in. E.g isDefault is actually is_default, vpc_id, id is actually vpc-d, and even though most of the documentation points to is_default being a boolean I had to pass it in as a string e.g.
Get the vpc id
-
name: Get the VPC net details
ec2_vpc_net_facts:
aws_access_key: “{{ aws_access_key }}”
aws_secret_key: “{{ aws_secret_key }}”
region: “{{ aws_region }}”
filters:
is_default: “true”
register: returned_vpc -
name: The VPC id
debug:
var: returned_vpc.vpcs[0].id
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html
http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-DescribeVpcs.html
http://boto.cloudhackers.com/en/latest/ref/vpc.html#boto.vpc.VPCConnection.get_all_vpcs
There seems to be conflicting variable names and types used through out.
Is there something I’m missing in regards what filters to pass? how variables are set? their types? It all seems pretty confusing and inconsistent, what (documentation/reference) am I missing?
Thanks!