Skip to content

Commit a1de62c

Browse files
authored
chore: Remove remaining modules from project, update workflows now that modules are removed (#1699)
1 parent 667f502 commit a1de62c

File tree

15 files changed

+3
-606
lines changed

15 files changed

+3
-606
lines changed

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ jobs:
6060
- uses: dorny/paths-filter@v2
6161
id: changes
6262
with:
63-
# We only need to check Terraform files for the current directory
64-
# because the `preCommitMaxVersion` job will run the full,
65-
# exhaustive checks (always)
6663
filters: |
6764
src:
6865
- '${{ matrix.directory }}/*.tf'
@@ -87,71 +84,10 @@ jobs:
8784
directory: ${{ matrix.directory }}
8885

8986
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
90-
uses: clowdhaus/terraform-composite-actions/[email protected]
91-
# Run only validate pre-commit check on min version supported
92-
if: ${{ matrix.directory != '.' && steps.changes.outputs.src== 'true' }}
93-
with:
94-
terraform-version: ${{ steps.minMax.outputs.minVersion }}
95-
tflint-version: ${{ env.TFLINT_VERSION }}
96-
args: 'terraform_validate --color=always --show-diff-on-failure --files ${{ matrix.directory }}/*'
97-
98-
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
99-
uses: clowdhaus/terraform-composite-actions/[email protected]
100-
# Run only validate pre-commit check on min version supported
101-
if: ${{ matrix.directory == '.' && steps.changes.outputs.src== 'true' }}
102-
with:
103-
terraform-version: ${{ steps.minMax.outputs.minVersion }}
104-
tflint-version: ${{ env.TFLINT_VERSION }}
105-
args: 'terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf)'
106-
107-
preCommitMaxVersion:
108-
name: Max TF pre-commit
109-
runs-on: ubuntu-latest
110-
needs: collectInputs
111-
steps:
112-
- name: Harden Runner
113-
uses: step-security/harden-runner@v2
114-
with:
115-
egress-policy: audit
116-
117-
- name: Remove default Terraform
118-
run: rm -rf $(which terraform)
119-
120-
- name: Checkout
121-
uses: actions/checkout@v3
122-
123-
- uses: dorny/paths-filter@v2
124-
id: changes
125-
with:
126-
filters: |
127-
src:
128-
- '**/*.tf'
129-
130-
- name: Config Terraform plugin cache
131-
if: steps.changes.outputs.src== 'true'
132-
run: mkdir --parents ${{ env.TERRAFORM_DOCS_VERSION }}
133-
134-
- name: Cache Terraform
135-
uses: actions/cache@v3
136-
if: steps.changes.outputs.src== 'true'
137-
with:
138-
path: ${{ env.TF_PLUGIN_CACHE_DIR }}
139-
key: ${{ runner.os }}-terraform-${{ hashFiles('**/.terraform.lock.hcl') }}
140-
restore-keys: ${{ runner.os }}-terraform-
141-
142-
- name: Install tfsec
143-
if: steps.changes.outputs.src== 'true'
144-
run: curl -sSLo ./tfsec https://github.com/aquasecurity/tfsec/releases/download/${{ env.TFSEC_VERSION }}/tfsec-$(uname)-amd64 && chmod +x tfsec && sudo mv tfsec /usr/bin/
145-
146-
- name: Terraform min/max versions
147-
id: minMax
148-
uses: clowdhaus/[email protected]
149-
if: steps.changes.outputs.src== 'true'
150-
151-
- name: Pre-commit Terraform ${{ steps.minMax.outputs.maxVersion }}
15287
uses: clowdhaus/terraform-composite-actions/[email protected]
15388
if: steps.changes.outputs.src== 'true'
15489
with:
15590
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
15691
terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }}
15792
tflint-version: ${{ env.TFLINT_VERSION }}
93+
args: '--files ${{ matrix.directory }}/*'

.pre-commit-config.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,4 @@ repos:
3232
- '--args=--only=terraform_standard_module_structure'
3333
- '--args=--only=terraform_workspace_remote'
3434
- id: terraform_validate
35-
exclude: docs
36-
# - id: terraform_tfsec
37-
# files: ^examples/ # only scan `examples/*` which are the implementation
38-
# args:
39-
# - --args=--config-file=__GIT_WORKING_DIR__/tfsec.yaml
40-
# - --args=--concise-output
35+
exclude: (docs|modules)

examples/fully-private-cluster/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,12 @@ Ensure that you have the following tools installed locally:
2929

3030
Since this is a Fully Private Amazon EKS Cluster, make sure that you'll have access to the Amazon VPC where the cluster will be deployed, otherwise you won't be able to access it.
3131

32-
For this example, we'll be using an Amazon Cloud9 environment to run Terraform and manage the Amazon EKS Cluster. The Cloud9 environment is already running in the Default VPC, we'll setup a VPC peering between the Default and the Cluster VPC in order to have access to the Kubernetes API and manage our EKS Cluster.
33-
32+
See the [`privatelink-access`](https://github.com/aws-ia/terraform-aws-eks-blueprints/tree/main/examples/privatelink-access) pattern for using AWS PrivateLink to access the private cluster from another VPC.
3433

3534
To provision this example:
3635

3736
```sh
3837
terraform init
39-
terraform apply -target module.vpc -target module.vpc_endpoints -target module.vpc_endpoints_sg
40-
terraform apply -target module.eks
4138
terraform apply
4239
```
4340

examples/fully-private-cluster/main.tf

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -116,43 +116,3 @@ module "vpc_endpoints" {
116116

117117
tags = local.tags
118118
}
119-
120-
resource "aws_vpc_peering_connection" "this" {
121-
peer_vpc_id = module.vpc.vpc_id
122-
vpc_id = module.vpc.default_vpc_id
123-
auto_accept = true
124-
125-
accepter {
126-
allow_remote_vpc_dns_resolution = true
127-
}
128-
129-
requester {
130-
allow_remote_vpc_dns_resolution = true
131-
}
132-
}
133-
134-
resource "aws_route" "default_to_eks" {
135-
route_table_id = module.vpc.default_vpc_default_route_table_id
136-
destination_cidr_block = module.vpc.vpc_cidr_block
137-
vpc_peering_connection_id = aws_vpc_peering_connection.this.id
138-
depends_on = [module.vpc]
139-
}
140-
141-
resource "aws_route" "eks_to_default" {
142-
for_each = { for rt in module.vpc.private_route_table_ids : rt => rt }
143-
144-
route_table_id = each.value
145-
destination_cidr_block = module.vpc.default_vpc_cidr_block
146-
vpc_peering_connection_id = aws_vpc_peering_connection.this.id
147-
depends_on = [module.vpc]
148-
}
149-
150-
resource "aws_vpc_security_group_ingress_rule" "this" {
151-
for_each = { for sg in concat([module.eks.cluster_security_group_id, module.eks.cluster_primary_security_group_id]) : sg => sg }
152-
security_group_id = each.value
153-
154-
cidr_ipv4 = module.vpc.default_vpc_cidr_block
155-
from_port = 443
156-
to_port = 443
157-
ip_protocol = "tcp"
158-
}

modules/irsa/README.md

Lines changed: 0 additions & 75 deletions
This file was deleted.

modules/irsa/main.tf

Lines changed: 0 additions & 91 deletions
This file was deleted.

modules/irsa/outputs.tf

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)