Skip to content

Commit

Permalink
Merge pull request #12 from silvercar/sg-0.12
Browse files Browse the repository at this point in the history
Update security group template to terraform 0.12 format
  • Loading branch information
kenske authored May 12, 2020
2 parents 71e58af + 4ab3048 commit 14228d8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
command: pylint src




workflows:
version: 2
build:
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ignore-patterns=

# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
init-hook="from pylint.config import find_pylintrc; import os, sys; sys.path.append(os.path.dirname(find_pylintrc()))"

# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
Expand Down
3 changes: 2 additions & 1 deletion src/terrafort/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ def fmt(content):
formatted = subprocess.run(["terraform", "fmt", "-"],
stdout=subprocess.PIPE,
input=content,
encoding='ascii')
encoding='ascii',
check=False)
return formatted.stdout
4 changes: 2 additions & 2 deletions src/terrafort/templates/aws_security_group.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ resource "aws_security_group" "{{ resource.GroupName }}" {
vpc_id = "{{ resource.VpcId }}"
revoke_rules_on_delete = true

tags {
{% for tag in resource.Tags %} "{{ tag.Key }}" = "{{tag.Value}}"
tags = {
{% for tag in resource.Tags %} {{ tag.Key }} = "{{tag.Value}}"
{% endfor %}
}
}

0 comments on commit 14228d8

Please sign in to comment.