Skip to content

Commit 39a238b

Browse files
authored
Merge pull request #42 from clouddrove/fix/enable-false
Fix: enable false
2 parents 0274b00 + 3321e29 commit 39a238b

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

.github/workflows/auto_assignee.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88
jobs:
99
assignee:
10-
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@master
10+
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@1.0.6
1111
secrets:
1212
GITHUB: ${{ secrets.GITHUB }}
1313
with:

.github/workflows/changelog.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88
jobs:
99
call-workflow-changelog:
10-
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master
10+
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@1.0.6
1111
secrets: inherit
1212
with:
1313
branch: 'master'

.github/workflows/readme.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
python-version: '3.x'
1919

2020
- name: 'create readme'
21-
uses: 'clouddrove/github-actions@v9.0.2'
21+
uses: 'clouddrove/github-actions@9.0.3'
2222
with:
2323
actions_subcommand: 'readme'
2424
github_token: '${{ secrets.GITHUB }}'
@@ -35,7 +35,7 @@ jobs:
3535
continue-on-error: true
3636

3737
- name: 'push readme'
38-
uses: 'clouddrove/github-actions@v9.0.2'
38+
uses: 'clouddrove/github-actions@9.0.3'
3939
continue-on-error: true
4040
with:
4141
actions_subcommand: 'push'
@@ -51,4 +51,4 @@ jobs:
5151
env:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
5353
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
54-
if: always()
54+
if: always()

.github/workflows/tf-checks.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
name: tf-checks
22
on:
33
push:
4-
branches: [ master ]
4+
branches: [ 1.0.6 ]
55
pull_request:
66
workflow_dispatch:
77
jobs:
88
tf-checks-basic-example:
9-
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
9+
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.6
1010
with:
1111
working_directory: './_example/basic/'
1212
tf-checks-complete-example:
13-
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
13+
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.6
1414
with:
1515
working_directory: './_example/complete/'
1616
tf-checks-only_rules-example:
17-
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
17+
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.6
1818
with:
1919
working_directory: './_example/only_rules/'
2020
tf-checks-prefx_list-example:
21-
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
21+
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.6
2222
with:
2323
working_directory: './_example/prefix_list/'

.github/workflows/tflint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ on:
66
workflow_dispatch:
77
jobs:
88
tf-lint:
9-
uses: clouddrove/test-tfsec/.github/workflows/tflint.yaml@master
9+
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
1010
secrets:
1111
GITHUB: ${{ secrets.GITHUB }}

.github/workflows/tfsec.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
jobs:
77
tfsec:
8-
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master
8+
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@1.0.6
99
secrets: inherit
1010
with:
1111
working_directory: '.'

main.tf

+5-5
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ resource "aws_security_group_rule" "new_sg_ingress_with_prefix_list" {
106106
protocol = each.value.protocol
107107
to_port = each.value.to_port
108108
security_group_id = aws_security_group.default[0].id
109-
prefix_list_ids = lookup(each.value, "prefix_list_ids", null) == null ? aws_ec2_managed_prefix_list.prefix_list.*.id : lookup(each.value, "prefix_list_ids", null)
109+
prefix_list_ids = lookup(each.value, "prefix_list_ids", null) == null ? aws_ec2_managed_prefix_list.prefix_list[*].id : lookup(each.value, "prefix_list_ids", null)
110110
description = lookup(each.value, "description", null)
111111
}
112112

@@ -158,7 +158,7 @@ resource "aws_security_group_rule" "existing_sg_ingress_with_prefix_list" {
158158
protocol = each.value.protocol
159159
to_port = each.value.to_port
160160
security_group_id = data.aws_security_group.existing[0].id
161-
prefix_list_ids = lookup(each.value, "prefix_list_ids", null) == null ? aws_ec2_managed_prefix_list.prefix_list.*.id : lookup(each.value, "prefix_list_ids", null)
161+
prefix_list_ids = lookup(each.value, "prefix_list_ids", null) == null ? aws_ec2_managed_prefix_list.prefix_list[*].id : lookup(each.value, "prefix_list_ids", null)
162162
description = lookup(each.value, "description", null)
163163
}
164164

@@ -210,7 +210,7 @@ resource "aws_security_group_rule" "new_sg_egress_with_prefix_list" {
210210
protocol = each.value.protocol
211211
to_port = each.value.to_port
212212
security_group_id = aws_security_group.default[0].id
213-
prefix_list_ids = lookup(each.value, "prefix_list_ids", null) == null ? aws_ec2_managed_prefix_list.prefix_list.*.id : lookup(each.value, "prefix_list_ids", null)
213+
prefix_list_ids = lookup(each.value, "prefix_list_ids", null) == null ? aws_ec2_managed_prefix_list.prefix_list[*].id : lookup(each.value, "prefix_list_ids", null)
214214
description = lookup(each.value, "description", null)
215215
}
216216

@@ -262,6 +262,6 @@ resource "aws_security_group_rule" "existing_sg_egress_with_prefix_list" {
262262
protocol = each.value.protocol
263263
to_port = each.value.to_port
264264
security_group_id = data.aws_security_group.existing[0].id
265-
prefix_list_ids = lookup(each.value, "prefix_list_ids", null) == null ? aws_ec2_managed_prefix_list.prefix_list.*.id : lookup(each.value, "prefix_list_ids", null)
265+
prefix_list_ids = lookup(each.value, "prefix_list_ids", null) == null ? aws_ec2_managed_prefix_list.prefix_list[*].id : lookup(each.value, "prefix_list_ids", null)
266266
description = lookup(each.value, "source_address_prefix", null)
267-
}
267+
}

outputs.tf

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
output "prefix_list_id" {
2-
value = var.prefix_list_enabled && length(var.prefix_list_ids) < 1 ? aws_ec2_managed_prefix_list.prefix_list[0].id : null
2+
value = var.enable && var.prefix_list_enabled && length(var.prefix_list_ids) < 1 ? aws_ec2_managed_prefix_list.prefix_list[0].id : null
33
description = "The ID of the prefix list."
44
}
55

66
output "security_group_id" {
7-
value = var.new_sg ? aws_security_group.default[0].id : null
7+
value = var.new_sg && var.enable ? aws_security_group.default[0].id : null
88
description = "IDs on the AWS Security Groups associated with the instance."
99
}
1010

1111
output "security_group_arn" {
12-
value = var.new_sg ? aws_security_group.default[0].arn : null
12+
value = var.new_sg && var.enable ? aws_security_group.default[0].arn : null
1313
description = "IDs on the AWS Security Groups associated with the instance."
1414
}
1515

1616
output "security_group_tags" {
17-
value = var.new_sg ? aws_security_group.default[0].tags : null
17+
value = var.new_sg && var.enable ? aws_security_group.default[0].tags : null
1818
description = "A mapping of public tags to assign to the resource."
1919
}

0 commit comments

Comments
 (0)