Skip to content

Commit b807a6e

Browse files
committed
cleaning up again
1 parent 77620f3 commit b807a6e

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

terraform/pipelines/main.tf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module "default_bucket" {
1515
module "cluster_auth" {
1616
source = "./modules/eks-config"
1717

18-
eks_cluster_name = module.default_cluster.cluster_name
18+
eks_cluster_name = var.eks_cluster_name
1919
roles = [{
2020
rolearn = "${module.awsome_fastapi_pipeline.codebuild_iam_role_arn}"
2121
username = "${module.awsome_fastapi_pipeline.codebuild_iam_role_name}"
@@ -42,8 +42,8 @@ module "awsome_fastapi_pipeline" {
4242
repository_id = "The-DevSec-Blueprint/awsome-fastapi"
4343
branch_name = "main"
4444

45-
eks_cluster_name = module.default_cluster.cluster_name
46-
eks_cluster_arn = module.default_cluster.cluster_arn
45+
eks_cluster_name = var.eks_cluster_name
46+
eks_cluster_arn = "arn:aws:eks:${var.region}:${data.aws_caller_identity.current.account_id}:cluster/${var.eks_cluster_name}"
4747

4848
compute_type = "BUILD_GENERAL1_SMALL"
4949
build_image = "aws/codebuild/standard:5.0"
@@ -55,6 +55,4 @@ module "awsome_fastapi_pipeline" {
5555

5656
snyk_org_id = var.SNYK_ORG_ID
5757
snyk_token = var.SNYK_TOKEN
58-
59-
depends_on = [module.default_cluster]
6058
}

terraform/pipelines/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ variable "resource_prefix" {
44
default = "dsb"
55
}
66

7+
variable "eks_cluster_name" {
8+
type = string
9+
description = "Name of the EKS Cluster"
10+
default = "dsb-devsecops-cluster"
11+
}
12+
713
variable "region" {
814
type = string
915
description = "AWS Region"

0 commit comments

Comments
 (0)