Commit e5e94526 authored by Daisuke Fujita's avatar Daisuke Fujita

Restrict max line length to 140

parent 75fbc070
......@@ -8,7 +8,7 @@ Metrics/CyclomaticComplexity:
Enabled: false
Metrics/LineLength:
Max: 130
Max: 140
Exclude:
- "spec/**/*"
......
......@@ -4,4 +4,3 @@ require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
......@@ -3,7 +3,7 @@ require "oj"
begin
require "ox"
rescue NameError => e
spec = Gem::Specification.stubs.find {|s| s.name == 'ox' }
spec = Gem::Specification.stubs.find { |s| s.name == 'ox' }
raise e unless spec
require File.join(spec.gem_dir, "lib/ox")
end
......
......@@ -199,7 +199,6 @@ module Terraforming
execute(Terraforming::Resource::VPNGateway, options)
end
private
def execute(klass, options)
......
......@@ -83,7 +83,7 @@ module Terraforming
end
def vpc_zone_specified?(group)
group.vpc_zone_identifier && vpc_zone_identifier_of(group).length > 0
group.vpc_zone_identifier && !vpc_zone_identifier_of(group).empty?
end
end
end
......
......@@ -46,7 +46,7 @@ module Terraforming
end
def db_security_groups
@client.describe_db_security_groups.map(&:db_security_groups).flatten.select { |sg| ingresses_of(sg).length > 0 }
@client.describe_db_security_groups.map(&:db_security_groups).flatten.select { |sg| !ingresses_of(sg).empty? }
end
def module_name_of(security_group)
......
......@@ -25,24 +25,24 @@ module Terraforming
block_devices = block_devices_of(instance)
attributes = {
"ami"=> instance.image_id,
"associate_public_ip_address"=> "true",
"availability_zone"=> instance.placement.availability_zone,
"ebs_block_device.#"=> ebs_block_devices_in(block_devices, instance).length.to_s,
"ebs_optimized"=> instance.ebs_optimized.to_s,
"ami" => instance.image_id,
"associate_public_ip_address" => "true",
"availability_zone" => instance.placement.availability_zone,
"ebs_block_device.#" => ebs_block_devices_in(block_devices, instance).length.to_s,
"ebs_optimized" => instance.ebs_optimized.to_s,
"ephemeral_block_device.#" => "0", # Terraform 0.6.1 cannot fetch this field from AWS
"id"=> instance.instance_id,
"instance_type"=> instance.instance_type,
"id" => instance.instance_id,
"instance_type" => instance.instance_type,
"monitoring" => monitoring_state(instance).to_s,
"private_dns"=> instance.private_dns_name,
"private_ip"=> instance.private_ip_address,
"public_dns"=> instance.public_dns_name,
"public_ip"=> instance.public_ip_address,
"root_block_device.#"=> root_block_devices_in(block_devices, instance).length.to_s,
"security_groups.#"=> in_vpc ? "0" : instance.security_groups.length.to_s,
"source_dest_check"=> instance.source_dest_check.to_s,
"tenancy"=> instance.placement.tenancy,
"vpc_security_group_ids.#"=> in_vpc ? instance.security_groups.length.to_s : "0",
"private_dns" => instance.private_dns_name,
"private_ip" => instance.private_ip_address,
"public_dns" => instance.public_dns_name,
"public_ip" => instance.public_ip_address,
"root_block_device.#" => root_block_devices_in(block_devices, instance).length.to_s,
"security_groups.#" => in_vpc ? "0" : instance.security_groups.length.to_s,
"source_dest_check" => instance.source_dest_check.to_s,
"tenancy" => instance.placement.tenancy,
"vpc_security_group_ids.#" => in_vpc ? instance.security_groups.length.to_s : "0",
}
placement_group = instance.placement.group_name
......@@ -72,7 +72,7 @@ module Terraforming
end
def block_devices_of(instance)
return [] unless instance.block_device_mappings.length > 0
return [] if instance.block_device_mappings.empty?
@client.describe_volumes(volume_ids: block_device_ids_of(instance)).map(&:volumes).flatten
end
......@@ -92,8 +92,8 @@ module Terraforming
# https://github.com/hashicorp/terraform/blob/281e4d3e67f66daab9cdb1f7c8b6f602d949e5ee/builtin/providers/aws/resource_aws_instance.go#L481-L501
#
def in_vpc?(instance)
vpc_security_groups_of(instance).length > 0 ||
(instance.subnet_id && instance.subnet_id != "" && instance.security_groups.length == 0)
!vpc_security_groups_of(instance).empty? ||
(instance.subnet_id && instance.subnet_id != "" && instance.security_groups.empty?)
end
def monitoring_state(instance)
......
......@@ -31,7 +31,7 @@ module Terraforming
"public_ip" => addr.public_ip,
"vpc" => is_vpc?(addr).to_s,
}
attributes.delete_if{|k, v| v.nil?}
attributes.delete_if { |_k, v| v.nil? }
resources["aws_eip.#{addr.allocation_id}"] = {
"type" => "aws_eip",
"primary" => {
......
......@@ -37,9 +37,9 @@ module Terraforming
}
attributes["port"] = if cache_cluster.configuration_endpoint
cache_cluster.configuration_endpoint.port.to_s
else
cache_cluster.cache_nodes[0].endpoint.port.to_s
cache_cluster.configuration_endpoint.port.to_s
else
cache_cluster.cache_nodes[0].endpoint.port.to_s
end
resources["aws_elasticache_cluster.#{cache_cluster.cache_cluster_id}"] = {
......@@ -61,7 +61,7 @@ module Terraforming
end
def cluster_in_vpc?(cache_cluster)
cache_cluster.cache_security_groups.length == 0
cache_cluster.cache_security_groups.empty?
end
def security_group_ids_of(cache_cluster)
......
......@@ -48,7 +48,6 @@ module Terraforming
attributes.merge!(instances_attributes_of(load_balancer))
attributes.merge!(tags_attributes_of(load_balancer))
resources["aws_elb.#{module_name_of(load_balancer)}"] = {
"type" => "aws_elb",
"primary" => {
......@@ -106,7 +105,7 @@ module Terraforming
def tags_attributes_of(elb)
tags = @client.describe_tags(load_balancer_names: [elb.load_balancer_name]).tag_descriptions.first.tags
attributes = {"tags.#" => tags.length.to_s}
attributes = { "tags.#" => tags.length.to_s }
tags.each do |tag|
attributes["tags.#{tag.key}"] = tag.value
......@@ -116,7 +115,7 @@ module Terraforming
end
def instances_attributes_of(elb)
attributes = {"instances.#" => elb.instances.length.to_s}
attributes = { "instances.#" => elb.instances.length.to_s }
elb.instances.each do |instance|
attributes["instances.#{Zlib.crc32(instance.instance_id)}"] = instance.instance_id
......@@ -126,7 +125,7 @@ module Terraforming
end
def subnets_attributes_of(elb)
attributes = {"subnets.#" => elb.subnets.length.to_s}
attributes = { "subnets.#" => elb.subnets.length.to_s }
elb.subnets.each do |subnet_id|
attributes["subnets.#{Zlib.crc32(subnet_id)}"] = subnet_id
......@@ -136,7 +135,7 @@ module Terraforming
end
def sg_attributes_of(elb)
attributes = {"security_groups.#" => elb.security_groups.length.to_s}
attributes = { "security_groups.#" => elb.security_groups.length.to_s }
elb.security_groups.each do |sg_id|
attributes["security_groups.#{Zlib.crc32(sg_id)}"] = sg_id
......@@ -146,7 +145,7 @@ module Terraforming
end
def listeners_attributes_of(elb)
attributes = {"listener.#" => elb.listener_descriptions.length.to_s}
attributes = { "listener.#" => elb.listener_descriptions.length.to_s }
elb.listener_descriptions.each do |listener_description|
attributes.merge!(listener_attributes_of(listener_description.listener))
......
......@@ -22,7 +22,7 @@ module Terraforming
def tfstate
iam_groups.inject({}) do |resources, group|
attributes = {
"arn"=> group.arn,
"arn" => group.arn,
"id" => group.group_name,
"name" => group.group_name,
"path" => group.path,
......
......@@ -24,7 +24,7 @@ module Terraforming
membership_name = membership_name_of(group)
attributes = {
"group"=> group.group_name,
"group" => group.group_name,
"id" => membership_name,
"name" => membership_name,
"users.#" => group_members_of(group).length.to_s,
......
......@@ -60,7 +60,7 @@ module Terraforming
result.policy_users += resp.policy_users
result.policy_roles += resp.policy_roles
end
result
end
......
......@@ -22,7 +22,7 @@ module Terraforming
def tfstate
iam_users.inject({}) do |resources, user|
attributes = {
"arn"=> user.arn,
"arn" => user.arn,
"id" => user.user_name,
"name" => user.user_name,
"path" => user.path,
......
......@@ -21,7 +21,6 @@ module Terraforming
def tfstate
launch_configurations.inject({}) do |resources, lc|
attributes = {
"name" => lc.launch_configuration_name,
"image_id" => lc.image_id,
......@@ -72,7 +71,7 @@ module Terraforming
end
def ebs_block_device?(block_device)
block_device.virtual_name == nil && block_device.ebs
block_device.virtual_name.nil? && block_device.ebs
end
def ebs_block_device_count(launch_configuration)
......
......@@ -24,7 +24,7 @@ module Terraforming
next resources if nat_gateway.nat_gateway_addresses.empty?
attributes = {
"id" => nat_gateway.nat_gateway_id,
"id" => nat_gateway.nat_gateway_id,
"allocation_id" => nat_gateway.nat_gateway_addresses[0].allocation_id,
"subnet_id" => nat_gateway.subnet_id,
"network_inferface_id" => nat_gateway.nat_gateway_addresses[0].network_interface_id,
......@@ -43,7 +43,7 @@ module Terraforming
end
end
private
private
def nat_gateways
@client.describe_nat_gateways.nat_gateways
......
......@@ -49,7 +49,7 @@ module Terraforming
end
def private_ips_of(network_interface)
network_interface.private_ip_addresses.map{|addr| addr.private_ip_address }
network_interface.private_ip_addresses.map { |addr| addr.private_ip_address }
end
def security_groups_of(network_interface)
......@@ -63,7 +63,6 @@ module Terraforming
def network_interfaces
@client.describe_network_interfaces.map(&:network_interfaces).flatten
end
end
end
end
......@@ -21,7 +21,6 @@ module Terraforming
def tfstate
stacks.inject({}) do |resources, stack|
stack_layers(stack.stack_id).each do |layer|
attributes = {
"auto_assign_elastic_ips" => layer.auto_assign_elastic_ips.to_s,
......@@ -107,13 +106,12 @@ module Terraforming
end
def stack_layers(stack_id)
@client.describe_layers({stack_id: stack_id}).layers
@client.describe_layers({ stack_id: stack_id }).layers
end
def module_name_of(object)
normalize_module_name(object.name)
end
end
end
end
......@@ -75,7 +75,6 @@ module Terraforming
def module_name_of(stack)
normalize_module_name(stack.name)
end
end
end
end
......@@ -25,8 +25,8 @@ module Terraforming
record_id = record_id_of(record, zone_id)
attributes = {
"id"=> record_id,
"name"=> name_of(record.name.gsub(/\\052/, '*')),
"id" => record_id,
"name" => name_of(record.name.gsub(/\\052/, '*')),
"type" => record.type,
"zone_id" => zone_id,
}
......
......@@ -25,9 +25,9 @@ module Terraforming
vpc = vpc_of(hosted_zone)
attributes = {
"comment"=> comment_of(hosted_zone),
"id"=> zone_id,
"name"=> name_of(hosted_zone),
"comment" => comment_of(hosted_zone),
"id" => zone_id,
"name" => name_of(hosted_zone),
"name_servers.#" => name_servers_of(hosted_zone).length.to_s,
"tags.#" => tags_of(hosted_zone).length.to_s,
"vpc_id" => vpc ? vpc.vpc_id : "",
......
......@@ -47,8 +47,8 @@ module Terraforming
def routes_of(route_table)
route_table.routes.reject do |route|
route.gateway_id.to_s == 'local' ||
route.origin.to_s == 'EnableVgwRoutePropagation' ||
route.destination_prefix_list_id
route.origin.to_s == 'EnableVgwRoutePropagation' ||
route.destination_prefix_list_id
end
end
......
......@@ -75,7 +75,7 @@ module Terraforming
def module_name_of(security_group)
if security_group.vpc_id.nil?
normalize_module_name("#{security_group.group_name}")
normalize_module_name(security_group.group_name.to_s)
else
normalize_module_name("#{security_group.vpc_id}-#{security_group.group_name}")
end
......@@ -85,7 +85,6 @@ module Terraforming
hashcode = permission_hashcode_of(security_group, permission)
security_groups = security_groups_in(permission, security_group).reject { |group_name| group_name == security_group.group_name }.reject { |group_id| group_id == security_group.group_id }
attributes = {
"#{type}.#{hashcode}.from_port" => (permission.from_port || 0).to_s,
"#{type}.#{hashcode}.to_port" => (permission.to_port || 0).to_s,
......@@ -140,7 +139,7 @@ module Terraforming
"#{permission.from_port || 0}-" <<
"#{permission.to_port || 0}-" <<
"#{permission.ip_protocol}-" <<
"#{self_referenced_permission?(security_group, permission).to_s}-"
"#{self_referenced_permission?(security_group, permission)}-"
permission.ip_ranges.each { |range| string << "#{range.cidr_ip}-" }
security_groups_in(permission, security_group).each { |group| string << "#{group}-" }
......@@ -157,7 +156,7 @@ module Terraforming
end
def security_groups_in(permission, security_group)
permission.user_id_group_pairs.map { |range|
permission.user_id_group_pairs.map do |range|
# EC2-Classic, same account
if security_group.owner_id == range.user_id && !range.group_name.nil?
range.group_name
......@@ -168,7 +167,7 @@ module Terraforming
else
"#{range.user_id}/#{range.group_name}"
end
}
end
end
def tags_attributes_of(security_group)
......
......@@ -26,6 +26,5 @@ module Terraforming
json.strip
end
end
end
end
......@@ -276,7 +276,6 @@ module Terraforming
it_behaves_like "CLI examples"
end
end
context "flush to stdout" do
......@@ -455,7 +454,7 @@ resource "aws_s3_bucket" "fuga" {
end
context "with --tfstate --merge TFSTATE --overwrite" do
before do
before do
@tmp_tfstate = Tempfile.new("tfstate")
@tmp_tfstate.write(open(tfstate_fixture_path).read)
@tmp_tfstate.flush
......
......@@ -160,7 +160,7 @@ module Terraforming
let(:tag_attributes) do
[{
tags: [
{key: 'name', value: 'elb-1'}
{ key: 'name', value: 'elb-1' }
]
}]
end
......@@ -271,26 +271,26 @@ resource "aws_elb" "fuga" {
"internal" => "false",
"name" => "hoge",
"source_security_group" => "default",
"health_check.#" =>"1",
"health_check.362345074.healthy_threshold" =>"10",
"health_check.362345074.interval" =>"30",
"health_check.362345074.target" =>"HTTP:8080/status",
"health_check.362345074.timeout" =>"5",
"health_check.362345074.unhealthy_threshold" =>"2",
"listener.#" =>"1",
"health_check.#" => "1",
"health_check.362345074.healthy_threshold" => "10",
"health_check.362345074.interval" => "30",
"health_check.362345074.target" => "HTTP:8080/status",
"health_check.362345074.timeout" => "5",
"health_check.362345074.unhealthy_threshold" => "2",
"listener.#" => "1",
"listener.3051874140.instance_port" => "80",
"listener.3051874140.instance_protocol" => "http",
"listener.3051874140.lb_port" => "443",
"listener.3051874140.lb_protocol" => "https",
"listener.3051874140.ssl_certificate_id" => "arn:aws:iam::123456789012:server-certificate/foobar", "security_groups.#" =>"2",
"listener.3051874140.ssl_certificate_id" => "arn:aws:iam::123456789012:server-certificate/foobar", "security_groups.#" => "2",
"security_groups.550527283" => "sg-1234abcd",
"security_groups.3942994537" => "sg-5678efgh",
"subnets.#" =>"2",
"subnets.#" => "2",
"subnets.3229571749" => "subnet-1234abcd",
"subnets.195717631" => "subnet-5678efgh",
"instances.3520380136" => "i-1234abcd",
"tags.#" =>"1",
"tags.name" =>"elb-1"
"tags.#" => "1",
"tags.name" => "elb-1"
}
}
},
......@@ -314,27 +314,28 @@ resource "aws_elb" "fuga" {
"internal" => "true",
"name" => "fuga",
"source_security_group" => "elb",
"health_check.#" =>"1",
"health_check.362345074.healthy_threshold" =>"10",
"health_check.362345074.interval" =>"30",
"health_check.362345074.target" =>"HTTP:8080/status",
"health_check.362345074.timeout" =>"5",
"health_check.362345074.unhealthy_threshold" =>"2",
"listener.#" =>"1",
"listener.1674021574.instance_port" =>"80",
"listener.1674021574.instance_protocol" =>"http",
"listener.1674021574.lb_port" =>"443",
"listener.1674021574.lb_protocol" =>"https",
"listener.1674021574.ssl_certificate_id" =>"arn:aws:iam::345678901234:server-certificate/foobar",
"security_groups.#" =>"2",
"security_groups.2877768809" =>"sg-9012ijkl",
"security_groups.1478442660" =>"sg-3456mnop",
"subnets.#" =>"2",
"subnets.1260945407" =>"subnet-9012ijkl",
"subnets.3098543410" =>"subnet-3456mnop",
"instances.436309938" =>"i-5678efgh",
"tags.#" =>"1",
"tags.name" =>"elb-1" }
"health_check.#" => "1",
"health_check.362345074.healthy_threshold" => "10",
"health_check.362345074.interval" => "30",
"health_check.362345074.target" => "HTTP:8080/status",
"health_check.362345074.timeout" => "5",
"health_check.362345074.unhealthy_threshold" => "2",
"listener.#" => "1",
"listener.1674021574.instance_port" => "80",
"listener.1674021574.instance_protocol" => "http",
"listener.1674021574.lb_port" => "443",
"listener.1674021574.lb_protocol" => "https",
"listener.1674021574.ssl_certificate_id" => "arn:aws:iam::345678901234:server-certificate/foobar",
"security_groups.#" => "2",
"security_groups.2877768809" => "sg-9012ijkl",
"security_groups.1478442660" => "sg-3456mnop",
"subnets.#" => "2",
"subnets.1260945407" => "subnet-9012ijkl",
"subnets.3098543410" => "subnet-3456mnop",
"instances.436309938" => "i-5678efgh",
"tags.#" => "1",
"tags.name" => "elb-1"
}
}
}
})
......
......@@ -104,7 +104,7 @@ resource "aws_iam_group_membership" "fuga" {
"primary" => {
"id" => "hoge-group-membership",
"attributes" => {
"group"=> "hoge",
"group" => "hoge",
"id" => "hoge-group-membership",
"name" => "hoge-group-membership",
"users.#" => "1",
......@@ -116,7 +116,7 @@ resource "aws_iam_group_membership" "fuga" {
"primary" => {
"id" => "fuga-group-membership",
"attributes" => {
"group"=> "fuga",
"group" => "fuga",
"id" => "fuga-group-membership",
"name" => "fuga-group-membership",
"users.#" => "1",
......
......@@ -44,7 +44,7 @@ module Terraforming
before do
client.stub_responses(:list_groups, groups: groups)
client.stub_responses(:list_group_policies, [{ policy_names: %w(hoge_policy)}, { policy_names: %w(fuga_policy) }])
client.stub_responses(:list_group_policies, [{ policy_names: %w(hoge_policy) }, { policy_names: %w(fuga_policy) }])
client.stub_responses(:get_group_policy, [hoge_policy, fuga_policy])
end
......
......@@ -63,7 +63,7 @@ resource "aws_iam_group" "fuga" {
"primary" => {
"id" => "hoge",
"attributes" => {
"arn"=> "arn:aws:iam::123456789012:group/hoge",
"arn" => "arn:aws:iam::123456789012:group/hoge",
"id" => "hoge",
"name" => "hoge",
"path" => "/",
......@@ -76,7 +76,7 @@ resource "aws_iam_group" "fuga" {
"primary" => {
"id" => "fuga",
"attributes" => {
"arn"=> "arn:aws:iam::345678901234:group/fuga",
"arn" => "arn:aws:iam::345678901234:group/fuga",
"id" => "fuga",
"name" => "fuga",
"path" => "/system/",
......
......@@ -68,7 +68,7 @@ resource "aws_iam_instance_profile" "fuga_profile" {
"primary" => {
"id" => "hoge_profile",
"attributes" => {
"arn"=> "arn:aws:iam::123456789012:instance-profile/hoge_profile",
"arn" => "arn:aws:iam::123456789012:instance-profile/hoge_profile",
"id" => "hoge_profile",
"name" => "hoge_profile",
"path" => "/",
......@@ -81,7 +81,7 @@ resource "aws_iam_instance_profile" "fuga_profile" {
"primary" => {
"id" => "fuga_profile",
"attributes" => {
"arn"=> "arn:aws:iam::345678901234:instance-profile/fuga_profile",
"arn" => "arn:aws:iam::345678901234:instance-profile/fuga_profile",
"id" => "fuga_profile",
"name" => "fuga_profile",
"path" => "/system/",
......
......@@ -52,7 +52,7 @@ module Terraforming
let(:entities_for_policy_fuga) do
{
policy_groups: [
{ group_name: "fuga", group_id: "GRIPSTUVWXYZA89012345" },
{ group_name: "fuga", group_id: "GRIPSTUVWXYZA89012345" },
],
policy_users: [
{ user_name: "hoge", user_id: "USEREFGHIJKLMN1234567" },
......
......@@ -57,7 +57,7 @@ module Terraforming
before do
client.stub_responses(:get_policy, [{ policy: policies[0] }, { policy: policies[1] }])
client.stub_responses(:list_policies, policies: policies)
client.stub_responses(:get_policy_version, [{ policy_version: hoge_policy_version } , { policy_version: fuga_policy_version }])
client.stub_responses(:get_policy_version, [{ policy_version: hoge_policy_version }, { policy_version: fuga_policy_version }])
end
describe ".tf" do
......
......@@ -87,7 +87,7 @@ POLICY
"primary" => {
"id" => "hoge_role",
"attributes" => {
"arn"=> "arn:aws:iam::123456789012:role/hoge_role",
"arn" => "arn:aws:iam::123456789012:role/hoge_role",
"assume_role_policy" => "{\n \"Version\": \"2008-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Action\": \"sts:AssumeRole\"\n }\n ]\n}\n",
"id" => "hoge_role",
"name" => "hoge_role",
......@@ -101,7 +101,7 @@ POLICY
"primary" => {
"id" => "fuga_role",
"attributes" => {
"arn"=> "arn:aws:iam::345678901234:role/fuga_role",
"arn" => "arn:aws:iam::345678901234:role/fuga_role",
"assume_role_policy" => "{\n \"Version\": \"2008-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"1\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"elastictranscoder.amazonaws.com\"\n },\n \"Action\": \"sts:AssumeRole\"\n }\n ]\n}\n",
"id" => "fuga_role",
"name" => "fuga_role",
......
......@@ -46,7 +46,7 @@ module Terraforming
before do
client.stub_responses(:list_users, users: users)
client.stub_responses(:list_user_policies, [{ policy_names: %w(hoge_policy)}, { policy_names: %w(fuga_policy) }])
client.stub_responses(:list_user_policies, [{ policy_names: %w(hoge_policy) }, { policy_names: %w(fuga_policy) }])
client.stub_responses(:get_user_policy, [hoge_policy, fuga_policy])
end
......
......@@ -57,7 +57,7 @@ resource "aws_iam_user" "fuga-piyo" {
"primary" => {
"id" => "hoge",
"attributes" => {
"arn"=> "arn:aws:iam::123456789012:user/hoge",
"arn" => "arn:aws:iam::123456789012:user/hoge",
"id" => "hoge",
"name" => "hoge",
"path" => "/",
......@@ -70,7 +70,7 @@ resource "aws_iam_user" "fuga-piyo" {
"primary" => {
"id" => "fuga.piyo",
"attributes" => {
"arn"=> "arn:aws:iam::345678901234:user/fuga",
"arn" => "arn:aws:iam::345678901234:user/fuga",
"id" => "fuga.piyo",
"name" => "fuga.piyo",
"path" => "/system/",
......
......@@ -61,7 +61,7 @@ resource "aws_nat_gateway" "nat-0c5b68b2c4d64ea12" {
"primary" => {
"id" => "nat-0c5b68b2c4d64e037",
"attributes" => {
"id" => "nat-0c5b68b2c4d64e037",
"id" => "nat-0c5b68b2c4d64e037",
"allocation_id" => "eipalloc-b02a3c79",
"subnet_id" => "subnet-cd5645f7",
"network_inferface_id" => "eni-03d4046f",
......@@ -75,7 +75,7 @@ resource "aws_nat_gateway" "nat-0c5b68b2c4d64ea12" {
"primary" => {
"id" => "nat-0c5b68b2c4d64ea12",
"attributes" => {
"id" => "nat-0c5b68b2c4d64ea12",
"id" => "nat-0c5b68b2c4d64ea12",
"allocation_id" => "eipalloc-a03a3c79",
"subnet_id" => "subnet-cd564c9e",
"network_inferface_id" => "eni-b6e4046f",
......
......@@ -84,7 +84,7 @@ module Terraforming
instance_id: "i-12345678",
delete_on_termination: true,
attachment_id: "eni-attach-12345678",
instance_owner_id: "345678901234",
instance_owner_id: "345678901234",
},
private_dns_name: "ip-2-2-2-2.ap-northeast-1.compute.internal",
availability_zone: "ap-northeast-1a",
......
......@@ -83,7 +83,7 @@ module Terraforming
before do
client.stub_responses(:list_hosted_zones,
hosted_zones: hosted_zones, marker: "", is_truncated: false, max_items: 1)
hosted_zones: hosted_zones, marker: "", is_truncated: false, max_items: 1)
client.stub_responses(:list_resource_record_sets, [
{ resource_record_sets: hoge_resource_record_sets, is_truncated: false, max_items: 1 },
{ resource_record_sets: fuga_resource_record_sets, is_truncated: false, max_items: 1 },
......@@ -137,7 +137,7 @@ resource "aws_route53_record" "-052-example-net-CNAME" {