Class: Convection::Model::Template::Resource::EC2Route
Overview
Instance Attribute Summary
#exist, #name, #parent, #properties, #resource_attributes, #template
Instance Method Summary
collapse
#as_attribute, attach_method, #deletion_policy, #depends_on, #initialize, properties, property, #property, #reference, #render, type, #type, #with_output
#condition, #render_condition
#_terraform_module_dir_to_flag, #_terraform_module_flag_to_dir, attach_resource, attach_resource_collection, resource_collection_dsl_methods, resource_dsl_methods
#camel_case, included, method_name, #screaming_snake_case, #snake_case
#base64, #find_in_map, #fn_and, #fn_equals, #fn_if, #fn_import_value, #fn_not, #fn_or, #fn_ref, #fn_sub, #get_att, #get_azs, included, #join, mixers, #select
Instance Method Details
#destination ⇒ Object
#destination(value) ⇒ Object
13
|
# File 'lib/convection/model/template/resource/aws_ec2_route.rb', line 13
property :destination, 'DestinationCidrBlock'
|
#gateway ⇒ Object
#gateway(value) ⇒ Object
14
|
# File 'lib/convection/model/template/resource/aws_ec2_route.rb', line 14
property :gateway, 'GatewayId'
|
#instance ⇒ Object
#instance(value) ⇒ Object
16
|
# File 'lib/convection/model/template/resource/aws_ec2_route.rb', line 16
property :instance, 'InstanceId'
|
#interface ⇒ Object
#interface(value) ⇒ Object
17
|
# File 'lib/convection/model/template/resource/aws_ec2_route.rb', line 17
property :interface, 'NetworkInterfaceId'
|
#nat_gateway ⇒ Object
#nat_gateway(value) ⇒ Object
15
|
# File 'lib/convection/model/template/resource/aws_ec2_route.rb', line 15
property :nat_gateway, 'NatGatewayId'
|
#peer ⇒ Object
#peer(value) ⇒ Object
18
|
# File 'lib/convection/model/template/resource/aws_ec2_route.rb', line 18
property :peer, 'VpcPeeringConnectionId'
|
#route_table_id ⇒ Object
#route_table_id(value) ⇒ Object
12
|
# File 'lib/convection/model/template/resource/aws_ec2_route.rb', line 12
property :route_table_id, 'RouteTableId'
|
42
43
44
|
# File 'lib/convection/model/template/resource/aws_ec2_route.rb', line 42
def terraform_import_commands(*)
['# Route import is not supported by Terraform.']
end
|
#to_hcl_json ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/convection/model/template/resource/aws_ec2_route.rb', line 20
def to_hcl_json(*)
tf_record_attrs = {
route_table_id: route_table_id,
destination_cidr_block: destination,
vpc_peering_connection_id: peer,
gateway_id: gateway,
nat_gateway_id: nat_gateway,
instance_id: instance,
network_interface_id: interface
}
tf_record_attrs.reject! { |_, v| v.nil? }
tf_record = {
aws_route: {
name.underscore => tf_record_attrs
}
}
{ resource: tf_record }.to_json
end
|