Skip to content

Commit 7b4bc8d

Browse files
authored
Merge pull request #567 from OWASP/cloudtest
Fixes for new TF provider in AWS
2 parents 9aba437 + b789e9c commit 7b4bc8d

9 files changed

+30
-21
lines changed

aws/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ The documentation below is auto-generated to give insight on what's created via
102102
|------|---------|
103103
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.1 |
104104
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.48.0 |
105-
| <a name="requirement_http"></a> [http](#requirement\_http) | ~> 3.1 |
105+
| <a name="requirement_http"></a> [http](#requirement\_http) | ~> 3.2.1 |
106106
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.4.3 |
107107

108108
## Providers
109109

110110
| Name | Version |
111111
|------|---------|
112112
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.48.0 |
113-
| <a name="provider_http"></a> [http](#provider\_http) | ~> 3.1 |
113+
| <a name="provider_http"></a> [http](#provider\_http) | ~> 3.2.1 |
114114
| <a name="provider_random"></a> [random](#provider\_random) | ~> 3.4.3 |
115115

116116
## Modules
@@ -160,6 +160,7 @@ The documentation below is auto-generated to give insight on what's created via
160160
| Name | Description |
161161
|------|-------------|
162162
| <a name="output_cluster_endpoint"></a> [cluster\_endpoint](#output\_cluster\_endpoint) | Endpoint for EKS control plane. |
163+
| <a name="output_cluster_id"></a> [cluster\_id](#output\_cluster\_id) | The id of the cluster |
163164
| <a name="output_cluster_security_group_id"></a> [cluster\_security\_group\_id](#output\_cluster\_security\_group\_id) | Security group ids attached to the cluster control plane. |
164165
| <a name="output_irsa_role"></a> [irsa\_role](#output\_irsa\_role) | The role ARN used in the IRSA setup |
165166
| <a name="output_secrets_manager_secret_name"></a> [secrets\_manager\_secret\_name](#output\_secrets\_manager\_secret\_name) | The name of the secrets manager secret |

aws/irsa.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ resource "aws_iam_role_policy_attachment" "irsa_role_attachment" {
3939

4040
resource "aws_iam_policy" "secret_manager" {
4141
name_prefix = "secret-manager"
42-
description = "EKS secret manager policy for cluster ${module.eks.cluster_id}"
42+
description = "EKS secret manager policy for cluster ${module.eks.cluster_name}"
4343
policy = data.aws_iam_policy_document.secret_manager.json
4444
}
4545

aws/k8s/secret-challenge-vault-deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
volumeAttributes:
4040
secretProviderClass: "wrongsecrets-aws-secretsmanager"
4141
containers:
42-
- image: jeroenwillemsen/wrongsecrets:1.5.12-k8s-vault
42+
- image: jeroenwillemsen/wrongsecrets:1.5.13RC1-k8s-vault
4343
imagePullPolicy: IfNotPresent
4444
name: secret-challenge
4545
securityContext:

aws/main.tf

+14-14
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ module "eks" {
7272

7373

7474
cluster_endpoint_private_access = true
75+
cluster_endpoint_public_access = true
7576

7677
cluster_endpoint_public_access_cidrs = ["${data.http.ip.response_body}/32"]
7778

@@ -84,24 +85,23 @@ module "eks" {
8485
disk_iops = 3000
8586
instance_types = ["t3a.large"]
8687

87-
iam_role_additional_policies = [
88-
"arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy",
89-
"arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy",
90-
"arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly",
91-
"arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore",
92-
"arn:aws:iam::aws:policy/AmazonEKSVPCResourceController",
93-
"arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy"
94-
]
88+
iam_role_additional_policies = {
89+
AmazonEKSWorkerNodePolicy : "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy",
90+
AmazonEKS_CNI_Policy : "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy",
91+
AmazonEC2ContainerRegistryReadOnly : "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly",
92+
AmazonSSMManagedInstanceCore : "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore",
93+
AmazonEKSVPCResourceController : "arn:aws:iam::aws:policy/AmazonEKSVPCResourceController",
94+
AmazonEBSCSIDriverPolicy : "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy"
95+
}
9596
}
9697

9798
eks_managed_node_groups = {
9899
bottlerocket_default = {
99-
create_launch_template = false
100-
launch_template_name = ""
101-
min_size = 1
102-
max_size = 3
103-
desired_size = 1
104-
capacity_type = "SPOT"
100+
use_custom_launch_template = false
101+
min_size = 1
102+
max_size = 3
103+
desired_size = 1
104+
capacity_type = "SPOT"
105105

106106
ami_type = "BOTTLEROCKET_x86_64"
107107
platform = "bottlerocket"

aws/outputs.tf

+5
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ output "secrets_manager_secret_name" {
1717
description = "The name of the secrets manager secret"
1818
value = aws_secretsmanager_secret.secret.name
1919
}
20+
21+
output "cluster_id" {
22+
description = "The id of the cluster"
23+
value = module.eks.cluster_id
24+
}

aws/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ terraform {
99
version = "~> 3.4.3"
1010
}
1111
http = {
12-
version = "~> 3.1"
12+
version = "~> 3.2.1"
1313
}
1414
}
1515
}

azure/k8s/secret-challenge-vault-deployment.yml.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ spec:
4141
volumeAttributes:
4242
secretProviderClass: "azure-wrongsecrets-vault"
4343
containers:
44-
- image: jeroenwillemsen/wrongsecrets:1.5.12-k8s-vault
44+
- image: jeroenwillemsen/wrongsecrets:1.5.13RC1-k8s-vault
4545
imagePullPolicy: IfNotPresent
4646
name: secret-challenge
4747
securityContext:

gcp/k8s/secret-challenge-vault-deployment.yml.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
volumeAttributes:
4040
secretProviderClass: "wrongsecrets-gcp-secretsmanager"
4141
containers:
42-
- image: jeroenwillemsen/wrongsecrets:1.5.12-k8s-vault
42+
- image: jeroenwillemsen/wrongsecrets:1.5.13RC1-k8s-vault
4343
imagePullPolicy: IfNotPresent
4444
name: secret-challenge
4545
ports:

js/package-lock.json

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)