Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
Updated tags as per the Terraform 12.x
Browse files Browse the repository at this point in the history
  • Loading branch information
soujadas committed Nov 6, 2020
1 parent 518879d commit d5c5a80
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/alb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ resource "aws_alb" "<%= module_name_of(load_balancer) %>" {
}

<%- end -%>
tags {
tags = {
<% tags.each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/dynamo_db.erb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ resource "aws_dynamodb_table" "<%= table.table_name -%>" {
}
<%- end -%>
<%- tags(table).each do |tag| -%>
tags {
tags = {
<%= tag.key %> = "<%= tag.value -%>"
}
<%- end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/ec2.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ resource "aws_instance" "<%= module_name_of(instance) %>" {
<% end -%>
<% end -%>
tags {
tags = {
<% instance.tags.each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/elastic_file_system.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "aws_efs_file_system" "<%= module_name_of(efs) %>" {
performance_mode = "<%= efs.performance_mode %>"
<% end -%>
<% if efs.name -%>
tags {
tags = {
Name = "<%= efs.name %>"
}
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/elb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ resource "aws_elb" "<%= module_name_of(load_balancer) %>" {
timeout = <%= load_balancer.health_check.timeout %>
}

tags {
tags = {
<% @client.describe_tags(load_balancer_names: [load_balancer.load_balancer_name]).tag_descriptions.first.tags.each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/internet_gateway.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
resource "aws_internet_gateway" "<%= module_name_of(internet_gateway) %>" {
vpc_id = "<%= internet_gateway.attachments[0].vpc_id %>"

tags {
tags = {
<% internet_gateway.tags.each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/network_acl.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ resource "aws_network_acl" "<%= module_name_of(network_acl) %>" {
}

<% end -%>
tags {
tags = {
<% network_acl.tags.each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/network_interface.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resource "aws_network_interface" "<%= module_name_of(network_interface) %>" {
}
<% end -%>
<% if network_interface.tag_set.length > 0 -%>
tags {
tags = {
<% network_interface.tag_set.each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/route53_zone.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resource "aws_route53_zone" "<%= module_name_of(hosted_zone) %>" {
vpc_region = "<%= vpc.vpc_region %>"
<%- end -%>

tags {
tags = {
<% tags_of(hosted_zone).each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/route_table.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "aws_route_table" "<%= module_name_of(route_table) %>" {
propagating_vgws = <%= propagaving_vgws_of(route_table).inspect %>
<% end -%>
tags {
tags = {
<% route_table.tags.each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/security_group.erb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ resource "aws_security_group" "<%= module_name_of(security_group) %>" {

<% end -%>
<% if security_group.tags.length > 0 -%>
tags {
tags = {
<% security_group.tags.each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/subnet.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resource "aws_subnet" "<%= module_name_of(subnet) %>" {
availability_zone = "<%= subnet.availability_zone %>"
map_public_ip_on_launch = <%= subnet.map_public_ip_on_launch %>

tags {
tags = {
<% subnet.tags.each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/vpc.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resource "aws_vpc" "<%= module_name_of(vpc) %>" {
enable_dns_support = <%= enable_dns_support?(vpc) %>
instance_tenancy = "<%= vpc.instance_tenancy %>"

tags {
tags = {
<% vpc.tags.each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/vpn_gateway.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
resource "aws_vpn_gateway" "<%= module_name_of(vpn_gateway) %>" {
vpc_id = "<%= vpn_gateway.vpc_attachments[0].vpc_id %>"
availability_zone = "<%= vpn_gateway.availability_zone %>"
tags {
tags = {
<% vpn_gateway.tags.each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
Expand Down

0 comments on commit d5c5a80

Please sign in to comment.