Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
terraform-aws-security-group
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Terraform Modules
terraform-aws-security-group
Commits
097ef79d
Unverified
Commit
097ef79d
authored
Apr 23, 2018
by
Anton Babenko
Committed by
GitHub
Apr 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Not ignore changes in rules description (#52)
parent
c41e4d01
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
42 deletions
+2
-42
.pre-commit-config.yaml
.pre-commit-config.yaml
+2
-2
main.tf
main.tf
+0
-40
No files found.
.pre-commit-config.yaml
View file @
097ef79d
repos
:
-
repo
:
git://github.com/antonbabenko/pre-commit-terraform
sha
:
v1.5
.0
rev
:
v1.6
.0
hooks
:
-
id
:
terraform_fmt
-
repo
:
git://github.com/pre-commit/pre-commit-hooks
sha
:
v1.2.0
rev
:
v1.2.3
hooks
:
-
id
:
check-merge-conflict
main.tf
View file @
097ef79d
...
...
@@ -29,10 +29,6 @@ resource "aws_security_group_rule" "ingress_rules" {
from_port
=
"
${
element
(
var
.
rules
[
var
.
ingress_rules
[
count
.
index
]],
0
)
}
"
to_port
=
"
${
element
(
var
.
rules
[
var
.
ingress_rules
[
count
.
index
]],
1
)
}
"
protocol
=
"
${
element
(
var
.
rules
[
var
.
ingress_rules
[
count
.
index
]],
2
)
}
"
lifecycle
{
ignore_changes
=
[
"description"
]
}
}
##########################
...
...
@@ -53,10 +49,6 @@ resource "aws_security_group_rule" "ingress_with_source_security_group_id" {
from_port
=
"
${
lookup
(
var
.
ingress_with_source_security_group_id
[
count
.
index
],
"from_port"
,
element
(
var
.
rules
[
lookup
(
var
.
ingress_with_source_security_group_id
[
count
.
index
],
"rule"
,
"_"
)],
0
))
}
"
to_port
=
"
${
lookup
(
var
.
ingress_with_source_security_group_id
[
count
.
index
],
"to_port"
,
element
(
var
.
rules
[
lookup
(
var
.
ingress_with_source_security_group_id
[
count
.
index
],
"rule"
,
"_"
)],
1
))
}
"
protocol
=
"
${
lookup
(
var
.
ingress_with_source_security_group_id
[
count
.
index
],
"protocol"
,
element
(
var
.
rules
[
lookup
(
var
.
ingress_with_source_security_group_id
[
count
.
index
],
"rule"
,
"_"
)],
2
))
}
"
lifecycle
{
ignore_changes
=
[
"description"
]
}
}
# Security group rules with "cidr_blocks", but without "ipv6_cidr_blocks", "source_security_group_id" and "self"
...
...
@@ -73,10 +65,6 @@ resource "aws_security_group_rule" "ingress_with_cidr_blocks" {
from_port
=
"
${
lookup
(
var
.
ingress_with_cidr_blocks
[
count
.
index
],
"from_port"
,
element
(
var
.
rules
[
lookup
(
var
.
ingress_with_cidr_blocks
[
count
.
index
],
"rule"
,
"_"
)],
0
))
}
"
to_port
=
"
${
lookup
(
var
.
ingress_with_cidr_blocks
[
count
.
index
],
"to_port"
,
element
(
var
.
rules
[
lookup
(
var
.
ingress_with_cidr_blocks
[
count
.
index
],
"rule"
,
"_"
)],
1
))
}
"
protocol
=
"
${
lookup
(
var
.
ingress_with_cidr_blocks
[
count
.
index
],
"protocol"
,
element
(
var
.
rules
[
lookup
(
var
.
ingress_with_cidr_blocks
[
count
.
index
],
"rule"
,
"_"
)],
2
))
}
"
lifecycle
{
ignore_changes
=
[
"description"
]
}
}
# Security group rules with "ipv6_cidr_blocks", but without "cidr_blocks", "source_security_group_id" and "self"
...
...
@@ -93,10 +81,6 @@ resource "aws_security_group_rule" "ingress_with_ipv6_cidr_blocks" {
from_port
=
"
${
lookup
(
var
.
ingress_with_ipv6_cidr_blocks
[
count
.
index
],
"from_port"
,
element
(
var
.
rules
[
lookup
(
var
.
ingress_with_ipv6_cidr_blocks
[
count
.
index
],
"rule"
,
"_"
)],
0
))
}
"
to_port
=
"
${
lookup
(
var
.
ingress_with_ipv6_cidr_blocks
[
count
.
index
],
"to_port"
,
element
(
var
.
rules
[
lookup
(
var
.
ingress_with_ipv6_cidr_blocks
[
count
.
index
],
"rule"
,
"_"
)],
1
))
}
"
protocol
=
"
${
lookup
(
var
.
ingress_with_ipv6_cidr_blocks
[
count
.
index
],
"protocol"
,
element
(
var
.
rules
[
lookup
(
var
.
ingress_with_ipv6_cidr_blocks
[
count
.
index
],
"rule"
,
"_"
)],
2
))
}
"
lifecycle
{
ignore_changes
=
[
"description"
]
}
}
# Security group rules with "self", but without "cidr_blocks" and "source_security_group_id"
...
...
@@ -114,10 +98,6 @@ resource "aws_security_group_rule" "ingress_with_self" {
from_port
=
"
${
lookup
(
var
.
ingress_with_self
[
count
.
index
],
"from_port"
,
element
(
var
.
rules
[
lookup
(
var
.
ingress_with_self
[
count
.
index
],
"rule"
,
"_"
)],
0
))
}
"
to_port
=
"
${
lookup
(
var
.
ingress_with_self
[
count
.
index
],
"to_port"
,
element
(
var
.
rules
[
lookup
(
var
.
ingress_with_self
[
count
.
index
],
"rule"
,
"_"
)],
1
))
}
"
protocol
=
"
${
lookup
(
var
.
ingress_with_self
[
count
.
index
],
"protocol"
,
element
(
var
.
rules
[
lookup
(
var
.
ingress_with_self
[
count
.
index
],
"rule"
,
"_"
)],
2
))
}
"
lifecycle
{
ignore_changes
=
[
"description"
]
}
}
#################
...
...
@@ -142,10 +122,6 @@ resource "aws_security_group_rule" "egress_rules" {
from_port
=
"
${
element
(
var
.
rules
[
var
.
egress_rules
[
count
.
index
]],
0
)
}
"
to_port
=
"
${
element
(
var
.
rules
[
var
.
egress_rules
[
count
.
index
]],
1
)
}
"
protocol
=
"
${
element
(
var
.
rules
[
var
.
egress_rules
[
count
.
index
]],
2
)
}
"
lifecycle
{
ignore_changes
=
[
"description"
]
}
}
#########################
...
...
@@ -166,10 +142,6 @@ resource "aws_security_group_rule" "egress_with_source_security_group_id" {
from_port
=
"
${
lookup
(
var
.
egress_with_source_security_group_id
[
count
.
index
],
"from_port"
,
element
(
var
.
rules
[
lookup
(
var
.
egress_with_source_security_group_id
[
count
.
index
],
"rule"
,
"_"
)],
0
))
}
"
to_port
=
"
${
lookup
(
var
.
egress_with_source_security_group_id
[
count
.
index
],
"to_port"
,
element
(
var
.
rules
[
lookup
(
var
.
egress_with_source_security_group_id
[
count
.
index
],
"rule"
,
"_"
)],
1
))
}
"
protocol
=
"
${
lookup
(
var
.
egress_with_source_security_group_id
[
count
.
index
],
"protocol"
,
element
(
var
.
rules
[
lookup
(
var
.
egress_with_source_security_group_id
[
count
.
index
],
"rule"
,
"_"
)],
2
))
}
"
lifecycle
{
ignore_changes
=
[
"description"
]
}
}
# Security group rules with "cidr_blocks", but without "ipv6_cidr_blocks", "source_security_group_id" and "self"
...
...
@@ -186,10 +158,6 @@ resource "aws_security_group_rule" "egress_with_cidr_blocks" {
from_port
=
"
${
lookup
(
var
.
egress_with_cidr_blocks
[
count
.
index
],
"from_port"
,
element
(
var
.
rules
[
lookup
(
var
.
egress_with_cidr_blocks
[
count
.
index
],
"rule"
,
"_"
)],
0
))
}
"
to_port
=
"
${
lookup
(
var
.
egress_with_cidr_blocks
[
count
.
index
],
"to_port"
,
element
(
var
.
rules
[
lookup
(
var
.
egress_with_cidr_blocks
[
count
.
index
],
"rule"
,
"_"
)],
1
))
}
"
protocol
=
"
${
lookup
(
var
.
egress_with_cidr_blocks
[
count
.
index
],
"protocol"
,
element
(
var
.
rules
[
lookup
(
var
.
egress_with_cidr_blocks
[
count
.
index
],
"rule"
,
"_"
)],
2
))
}
"
lifecycle
{
ignore_changes
=
[
"description"
]
}
}
# Security group rules with "ipv6_cidr_blocks", but without "cidr_blocks", "source_security_group_id" and "self"
...
...
@@ -206,10 +174,6 @@ resource "aws_security_group_rule" "egress_with_ipv6_cidr_blocks" {
from_port
=
"
${
lookup
(
var
.
egress_with_ipv6_cidr_blocks
[
count
.
index
],
"from_port"
,
element
(
var
.
rules
[
lookup
(
var
.
egress_with_ipv6_cidr_blocks
[
count
.
index
],
"rule"
,
"_"
)],
0
))
}
"
to_port
=
"
${
lookup
(
var
.
egress_with_ipv6_cidr_blocks
[
count
.
index
],
"to_port"
,
element
(
var
.
rules
[
lookup
(
var
.
egress_with_ipv6_cidr_blocks
[
count
.
index
],
"rule"
,
"_"
)],
1
))
}
"
protocol
=
"
${
lookup
(
var
.
egress_with_ipv6_cidr_blocks
[
count
.
index
],
"protocol"
,
element
(
var
.
rules
[
lookup
(
var
.
egress_with_ipv6_cidr_blocks
[
count
.
index
],
"rule"
,
"_"
)],
2
))
}
"
lifecycle
{
ignore_changes
=
[
"description"
]
}
}
# Security group rules with "self", but without "cidr_blocks" and "source_security_group_id"
...
...
@@ -227,10 +191,6 @@ resource "aws_security_group_rule" "egress_with_self" {
from_port
=
"
${
lookup
(
var
.
egress_with_self
[
count
.
index
],
"from_port"
,
element
(
var
.
rules
[
lookup
(
var
.
egress_with_self
[
count
.
index
],
"rule"
,
"_"
)],
0
))
}
"
to_port
=
"
${
lookup
(
var
.
egress_with_self
[
count
.
index
],
"to_port"
,
element
(
var
.
rules
[
lookup
(
var
.
egress_with_self
[
count
.
index
],
"rule"
,
"_"
)],
1
))
}
"
protocol
=
"
${
lookup
(
var
.
egress_with_self
[
count
.
index
],
"protocol"
,
element
(
var
.
rules
[
lookup
(
var
.
egress_with_self
[
count
.
index
],
"rule"
,
"_"
)],
2
))
}
"
lifecycle
{
ignore_changes
=
[
"description"
]
}
}
################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment