Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit c99aaa2d authored by Vara Bonthu's avatar Vara Bonthu
Browse files

Fixed naming convention for resources

parent 67c089fd
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ resource "kubernetes_config_map" "aws_auth" {
labels = merge(
{
"app.kubernetes.io/managed-by" = "Terraform"
"terraform.io/module" = "terraform-aws-eks-accelerator"
"terraform.io/module" = "terraform-ssp-amazon-eks"
},
var.aws_auth_additional_labels
)
......
......@@ -23,14 +23,14 @@ Ensure that you have installed the following tools in your Mac or Windows Laptop
#### Step1: Clone the repo using the command below
```shell script
git clone https://gitlab.aws.dev/vabonthu/terraform-aws-eks-accelerator-patterns.git
git clone https://github.com/aws-samples/terraform-ssp-eks-patterns.git
```
#### Step2: Run Terraform INIT
to initialize a working directory with configuration files
```shell script
cd deploy/advanced/live/preprod/eu-west-1/application_acct/dev
cd examples/advanced/live/preprod/
terraform init
```
......
# terraform-aws-eks-accelerator-patterns
# terraform-ssp-eks-patterns
The following steps walks you through the deployment of this example
......@@ -23,14 +23,14 @@ Ensure that you have installed the following tools in your Mac or Windows Laptop
#### Step1: Clone the repo using the command below
```shell script
git clone https://gitlab.aws.dev/vabonthu/terraform-aws-eks-accelerator-patterns.git
git clone https://github.com/aws-samples/terraform-ssp-eks-patterns.git
```
#### Step2: Run Terraform INIT
to initialize a working directory with configuration files
```shell script
cd deploy/eks-cluster-with-new-vpc
cd examples/1-eks-cluster-with-new-vpc/
terraform init
```
......
......@@ -27,7 +27,7 @@ resource "kubernetes_namespace" "aws_observability" {
labels = {
aws-observability = "enabled"
"app.kubernetes.io/managed-by" = "terraform-aws-eks-accelerator"
"app.kubernetes.io/managed-by" = "terraform-ssp-amazon-eks"
}
}
}
......
......@@ -17,21 +17,21 @@
*/
# Kubernetes Namesapce
resource "kubernetes_namespace" "ns" {
resource "kubernetes_namespace" "add_on_ns" {
metadata {
name = var.kubernetes_namespace
labels = {
"app.kubernetes.io/managed-by" = "terraform-aws-eks-accelerator"
"app.kubernetes.io/managed-by" = "terraform-ssp-amazon-eks"
}
}
}
# Kubernetes service account
resource "kubernetes_service_account" "keda_sa" {
resource "kubernetes_service_account" "add_on_sa" {
metadata {
name = var.kubernetes_service_account
namespace = kubernetes_namespace.ns.id
namespace = kubernetes_namespace.add_on_ns.id
annotations = { "eks.amazonaws.com/role-arn" : aws_iam_role.irsa.arn }
}
automount_service_account_token = true
......
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"sqs:GetQueueUrl",
"sqs:ListDeadLetterSourceQueues",
"sqs:ReceiveMessage",
"sqs:GetQueueAttributes",
"sqs:ListQueueTags",
"cloudwatch:DescribeAlarmHistory",
"cloudwatch:GetDashboard",
"cloudwatch:GetInsightRuleReport",
"cloudwatch:ListTagsForResource",
"cloudwatch:DescribeAlarms",
"cloudwatch:GetMetricStream"
],
"Resource": [
"arn:aws:cloudwatch:*:${data.aws_caller_identity.current.account_id}:metric-stream/*",
"arn:aws:sqs:*:${data.aws_caller_identity.current.account_id}:*"
]
},
{
"Effect": "Allow",
"Action": [
"cloudwatch:DescribeInsightRules",
"sqs:ListQueues",
"cloudwatch:GetMetricData",
"cloudwatch:ListMetricStreams",
"cloudwatch:DescribeAlarmsForMetric",
"cloudwatch:ListDashboards",
"cloudwatch:GetMetricStatistics",
"cloudwatch:GetMetricWidgetImage",
"cloudwatch:ListMetrics",
"cloudwatch:DescribeAnomalyDetectors"
],
"Resource": "*"
}
]
}
......@@ -93,52 +93,9 @@ module "irsa" {
resource "aws_iam_policy" "keda_irsa" {
count = var.keda_create_irsa ? 1 : 0
description = "KEDA IAM role policy for SQS and CloudWatch"
name = "${var.eks_cluster_name}-${local.keda_helm_app["name"]}-irsa"
path = var.iam_role_path
description = "KEDA IAM role policy for SQS and CloudWatch"
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"sqs:GetQueueUrl",
"sqs:ListDeadLetterSourceQueues",
"sqs:ReceiveMessage",
"sqs:GetQueueAttributes",
"sqs:ListQueueTags",
"cloudwatch:DescribeAlarmHistory",
"cloudwatch:GetDashboard",
"cloudwatch:GetInsightRuleReport",
"cloudwatch:ListTagsForResource",
"cloudwatch:DescribeAlarms",
"cloudwatch:GetMetricStream"
],
"Resource": [
"arn:aws:cloudwatch:*:${data.aws_caller_identity.current.account_id}:metric-stream/*",
"arn:aws:sqs:*:${data.aws_caller_identity.current.account_id}:*"
]
},
{
"Effect": "Allow",
"Action": [
"cloudwatch:DescribeInsightRules",
"sqs:ListQueues",
"cloudwatch:GetMetricData",
"cloudwatch:ListMetricStreams",
"cloudwatch:DescribeAlarmsForMetric",
"cloudwatch:ListDashboards",
"cloudwatch:GetMetricStatistics",
"cloudwatch:GetMetricWidgetImage",
"cloudwatch:ListMetrics",
"cloudwatch:DescribeAnomalyDetectors"
],
"Resource": "*"
}
]
}
EOF
policy = file("${path.module}/keda-default-iam-policy.json")
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment