Sha256: 937ea9aa04bfd9f2d4ee8b0559508f175fece4e0945872e946e6a5c9ac2b731e
Contents?: true
Size: 1.32 KB
Versions: 21
Compression:
Stored size: 1.32 KB
Contents
require_relative '../resource' module Convection module Model class Template class Resource ## # AWS::EC2::Route ## class EC2Route < Resource type 'AWS::EC2::Route' property :route_table_id, 'RouteTableId' property :destination, 'DestinationCidrBlock' property :gateway, 'GatewayId' property :nat_gateway, 'NatGatewayId' property :instance, 'InstanceId' property :interface, 'NetworkInterfaceId' property :peer, 'VpcPeeringConnectionId' 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 def terraform_import_commands(*) ['# Route import is not supported by Terraform.'] end end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems