Skip to content

Commit 11c1abd

Browse files
authored
Merge pull request #1 from pablo19sc/main
v0.0.1 VPC Lattice module
2 parents d102af4 + 73bf26d commit 11c1abd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2056
-67
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ terraform.rc
4040

4141
go.mod
4242
go.sum
43+
44+
.DS_Store

.header.md

Lines changed: 302 additions & 4 deletions
Large diffs are not rendered by default.

.project_automation/functional_tests/entrypoint.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ echo "Starting Functional Tests"
99

1010
cd ${PROJECT_PATH}
1111

12+
export AWS_DEFAULT_REGION=eu-west-1
13+
1214
#********** Checkov Analysis *************
1315
echo "Running Checkov Analysis"
1416
terraform init
1517
terraform plan -out tf.plan
1618
terraform show -json tf.plan > tf.json
17-
checkov
19+
checkov --download-external-modules true
1820

1921
#********** Terratest execution **********
2022
echo "Running Terratest"

README.md

Lines changed: 362 additions & 0 deletions
Large diffs are not rendered by default.

data.tf

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# --- root/data.tf ---
2+
3+
locals {
4+
# ---------- VPC Lattice Service Network variables -----------
5+
# Determine if a Service Network should be created
6+
create_service_network = contains(keys(var.service_network), "name")
7+
# Service Network identifier
8+
service_network = local.create_service_network ? aws_vpclattice_service_network.lattice_service_network[0].id : try(var.service_network.identifier, null)
9+
# Service Network ARN
10+
service_network_arn = local.create_service_network ? aws_vpclattice_service_network.lattice_service_network[0].arn : try(var.service_network.identifier, null)
11+
# Checking if Service Network identifier was provided by the user
12+
sn_identifier_provided = contains(keys(var.service_network), "identifier")
13+
# Checking if Service Network auth policy should be created
14+
sn_auth_policy = (try(var.service_network.auth_type, "NONE") == "AWS_IAM") && (contains(keys(var.service_network), "auth_policy"))
15+
16+
# ---------- VPC Lattice Service variables ---------
17+
# Service Association - if Service Network is created or passed
18+
create_service_association = local.create_service_network || local.sn_identifier_provided
19+
20+
# ---------- VPC Lattice Target Groups ----------
21+
# We create a map of target group IDs
22+
target_group_ids = merge(
23+
try({ for k, v in aws_vpclattice_target_group.lambda_lattice_target_group : k => v.id }, {}),
24+
try({ for k, v in aws_vpclattice_target_group.lattice_target_group : k => v.id }, {}),
25+
)
26+
}
27+
28+
# Sanitizes tags for aws provider
29+
module "tags" {
30+
source = "aws-ia/label/aws"
31+
version = "0.0.5"
32+
33+
tags = var.tags
34+
}

examples/basic/.header.md

Whitespace-only changes.

examples/basic/README.md

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

examples/basic/main.tf

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

examples/basic/outputs.tf

Whitespace-only changes.

examples/basic/providers.tf

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

0 commit comments

Comments
 (0)