Skip to content

Commit

Permalink
fix: enable attribute for all resources (#22)
Browse files Browse the repository at this point in the history
* fix: enable attribute for all resources

* fix: Update workflows tag

---------

Co-authored-by: Archit Chopra <[email protected]>
  • Loading branch information
h1manshu98 and 13archit authored Oct 3, 2023
1 parent 3e4cb09 commit 46cd712
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto_assignee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
jobs:
assignee:
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@1.0.6
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
jobs:
changelog:
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@1.0.6
secrets: inherit
with:
branch: 'master'
4 changes: 2 additions & 2 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
python-version: '3.x'

- name: 'create readme'
uses: 'clouddrove/github-actions@v9.0.2'
uses: 'clouddrove/github-actions@9.0.3'
with:
actions_subcommand: 'readme'
github_token: '${{ secrets.GITHUB }}'
Expand All @@ -34,7 +34,7 @@ jobs:
continue-on-error: true

- name: 'push readme'
uses: 'clouddrove/github-actions@v9.0.2'
uses: 'clouddrove/github-actions@9.0.3'
continue-on-error: true
with:
actions_subcommand: 'push'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ on:
workflow_dispatch:
jobs:
example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.6
with:
working_directory: './_example/'
2 changes: 1 addition & 1 deletion .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ on:
workflow_dispatch:
jobs:
tf-lint:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@1.0.6
secrets:
GITHUB: ${{ secrets.GITHUB }}
2 changes: 1 addition & 1 deletion .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
jobs:
tfsec:
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@1.0.6
secrets: inherit
with:
working_directory: '.'
10 changes: 5 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ resource "tls_locally_signed_cert" "root" {
## aws_acm_certificate. The ACM certificate resource allows requesting and management of certificates from the Amazon Certificate Manager..
##-----------------------------------------------------------------------------
resource "aws_acm_certificate" "root" {
count = var.certificate_enabled ? 1 : 0
count = var.enabled && var.certificate_enabled ? 1 : 0
private_key = join("", tls_private_key.server[*].private_key_pem)
certificate_body = join("", tls_locally_signed_cert.root[*].cert_pem)
certificate_chain = join("", tls_self_signed_cert.ca[*].cert_pem)
Expand Down Expand Up @@ -231,7 +231,7 @@ resource "aws_security_group" "this" {
## Provides network associations for AWS Client VPN endpoints.
##-----------------------------------------------------------------------------
resource "aws_ec2_client_vpn_network_association" "default" {
count = length(var.subnet_ids)
count = var.enabled ? length(var.subnet_ids) : 0
client_vpn_endpoint_id = join("", aws_ec2_client_vpn_endpoint.default[*].id)
subnet_id = element(var.subnet_ids, count.index)
}
Expand Down Expand Up @@ -260,7 +260,7 @@ resource "aws_cloudwatch_log_stream" "vpn" {
## Provides authorization rules for AWS Client VPN endpoints.
##-----------------------------------------------------------------------------
resource "aws_ec2_client_vpn_authorization_rule" "vpn_auth" {
count = length(var.network_cidr)
count = var.enabled ? length(var.network_cidr) : 0
client_vpn_endpoint_id = join("", aws_ec2_client_vpn_endpoint.default[*].id)
target_network_cidr = element(var.network_cidr, count.index)
authorize_all_groups = var.authorize_all_groups
Expand All @@ -270,7 +270,7 @@ resource "aws_ec2_client_vpn_authorization_rule" "vpn_auth" {
## Provides authorization rules for AWS Client VPN endpoints.
##-----------------------------------------------------------------------------
resource "aws_ec2_client_vpn_authorization_rule" "vpn_group_auth" {
count = length(var.group_ids)
count = var.enabled ? length(var.group_ids) : 0
client_vpn_endpoint_id = join("", aws_ec2_client_vpn_endpoint.default[*].id)
target_network_cidr = element(var.target_network_cidr, count.index)
access_group_id = element(var.group_ids, count.index)
Expand All @@ -280,7 +280,7 @@ resource "aws_ec2_client_vpn_authorization_rule" "vpn_group_auth" {
## Provides additional routes for AWS Client VPN endpoints.
##-----------------------------------------------------------------------------
resource "aws_ec2_client_vpn_route" "vpn_route" {
count = length(var.route_cidr)
count = var.enabled ? length(var.route_cidr) : 0
client_vpn_endpoint_id = join("", aws_ec2_client_vpn_endpoint.default[*].id)
destination_cidr_block = element(var.route_cidr, count.index)
target_vpc_subnet_id = element(var.route_subnet_ids, count.index)
Expand Down

0 comments on commit 46cd712

Please sign in to comment.