Class: Ansible::Ruby::Modules::Ec2_vpc
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Ec2_vpc
- Defined in:
- lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb
Overview
Create or terminates AWS virtual private clouds. This module has a dependency on python-boto.
Instance Method Summary collapse
-
#cidr_block ⇒ Object?
The cidr block representing the VPC, e.g.
-
#dns_hostnames ⇒ :yes, ...
Toggles the “Enable DNS hostname support for instances” flag.
-
#dns_support ⇒ :yes, ...
Toggles the “Enable DNS resolution” flag.
-
#instance_tenancy ⇒ :default, ...
The supported tenancy options for instances launched into the VPC.
-
#internet_gateway ⇒ :yes, ...
Toggle whether there should be an Internet gateway attached to the VPC.
-
#resource_tags ⇒ Object
A dictionary array of resource tags of the form: { tag1: value1, tag2: value2 }.
-
#route_tables ⇒ Object?
A dictionary array of route tables to add of the form: { subnets: [172.22.2.0/24, 172.22.3.0/24,], routes: [{ dest: 0.0.0.0/0, gw: igw},], resource_tags: … }.
-
#state ⇒ :present, :absent
Create or terminate the VPC.
-
#subnets ⇒ Object?
A dictionary array of subnets to add of the form: { cidr: …, az: … , resource_tags: … }.
-
#vpc_id ⇒ Object?
A VPC id to terminate when state=absent.
-
#wait ⇒ :yes, ...
Wait for the VPC to be in state ‘available’ before returning.
-
#wait_timeout ⇒ Integer?
How long before wait gives up, in seconds.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#cidr_block ⇒ Object?
Returns The cidr block representing the VPC, e.g. 10.0.0.0/16, required when I(state) is ‘present’.
11 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb', line 11 attribute :cidr_block |
#dns_hostnames ⇒ :yes, ...
Returns toggles the “Enable DNS hostname support for instances” flag.
22 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb', line 22 attribute :dns_hostnames |
#dns_support ⇒ :yes, ...
Returns toggles the “Enable DNS resolution” flag.
18 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb', line 18 attribute :dns_support |
#instance_tenancy ⇒ :default, ...
Returns The supported tenancy options for instances launched into the VPC.
14 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb', line 14 attribute :instance_tenancy |
#internet_gateway ⇒ :yes, ...
Returns Toggle whether there should be an Internet gateway attached to the VPC.
36 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb', line 36 attribute :internet_gateway |
#resource_tags ⇒ Object
Returns A dictionary array of resource tags of the form: { tag1: value1, tag2: value2 }. Tags in this list are used in conjunction with CIDR block to uniquely identify a VPC in lieu of vpc_id. Therefore, if CIDR/Tag combination does not exist, a new VPC will be created. VPC tags not on this list will be ignored. Prior to 1.7, specifying a resource tag was optional.
32 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb', line 32 attribute :resource_tags |
#route_tables ⇒ Object?
Returns A dictionary array of route tables to add of the form: { subnets: [172.22.2.0/24, 172.22.3.0/24,], routes: [{ dest: 0.0.0.0/0, gw: igw},], resource_tags: … }. Where the subnets list is those subnets the route table should be associated with, and the routes list is a list of routes to be in the table. The special keyword for the gw of igw specifies that you should the route should go through the internet gateway attached to the VPC. gw also accepts instance-ids, interface-ids, and vpc-peering-connection-ids in addition igw. resource_tags is optional and uses dictionary form: { “Name”: “public”, … }. This module is currently unable to affect the “main” route table due to some limitations in boto, so you must explicitly define the associated subnets or they will be attached to the main table implicitly. As of 1.8, if the route_tables parameter is not specified, no existing routes will be modified.
40 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb', line 40 attribute :route_tables |
#state ⇒ :present, :absent
Returns Create or terminate the VPC.
51 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb', line 51 attribute :state |
#subnets ⇒ Object?
Returns A dictionary array of subnets to add of the form: { cidr: …, az: … , resource_tags: … }. Where az is the desired availability zone of the subnet, but it is not required. Tags (i.e.: resource_tags) is also optional and use dictionary form: { “Environment”:“Dev”, “Tier”:“Web”, …}. All VPC subnets not in this list will be removed as well. As of 1.8, if the subnets parameter is not specified, no existing subnets will be modified.
26 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb', line 26 attribute :subnets |
#vpc_id ⇒ Object?
Returns A VPC id to terminate when state=absent.
29 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb', line 29 attribute :vpc_id |
#wait ⇒ :yes, ...
Returns wait for the VPC to be in state ‘available’ before returning.
43 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb', line 43 attribute :wait |
#wait_timeout ⇒ Integer?
Returns how long before wait gives up, in seconds.
47 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_vpc.rb', line 47 attribute :wait_timeout |