Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Commit b3b7ca7

Browse files
Merge pull request #21 from Grupo-G03-4SOAT-FIAP/feature/125/k8s
fix: correção nos secrets
2 parents ef88857 + 36d52c8 commit b3b7ca7

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

main.tf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,28 @@ resource "aws_iam_role_policy_attachment" "db_pedidos_secret_to_role" {
212212
]
213213
}
214214

215+
# DB API de Pagamentos
216+
# ------------------------------
217+
218+
module "secrets_db_pagamentos" {
219+
source = "./modules/secrets-db"
220+
221+
secret_name = "prod/pagamentos/Mongodb"
222+
policy_name = "policy-secret-db-pagamentos"
223+
224+
region = local.region
225+
tags = local.tags
226+
}
227+
228+
resource "aws_iam_role_policy_attachment" "db_pagamentos_secret_to_role" {
229+
role = module.cluster_k8s.serviceaccount_role_name
230+
policy_arn = module.secrets_db_pagamentos.secretsmanager_secret_policy_arn
231+
232+
depends_on = [
233+
module.cluster_k8s
234+
]
235+
}
236+
215237
# Mercado Pago
216238
# ------------------------------
217239

modules/cluster-k8s/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module "eks" {
6161

6262
eks_managed_node_groups = {
6363
default = {
64-
instance_types = ["t3.small"] # A instance_type do Free Tier é t2.micro
64+
instance_types = ["t3.medium"] # A instance_type do Free Tier é t2.micro
6565

6666
# min_size = 2
6767
# max_size = 10

modules/secrets-db/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ locals {
2323
# Inicializa as Keys com valores default
2424
# Por segurança, após o provisionamento do Secret preencha os valores abaixo manualmente no Console da AWS no link abaixo:
2525
# https://us-east-1.console.aws.amazon.com/secretsmanager/secret?name=prod/RMS/MercadoPago&region=us-east-1
26-
username = null
27-
password = null
26+
username = null
27+
password = null
28+
engine = null
29+
host = null
30+
port = null
31+
dbInstanceIdentifier = null
2832
}
2933
}
3034

0 commit comments

Comments
 (0)