Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "kubernetes_secret" "hmpps_person_on_probation_audit_queue_secret" {
metadata {
name = "sqs-hmpps-audit-secret"
namespace = var.namespace
}

data = {
sqs_queue_url = "https://sqs.eu-west-2.amazonaws.com/754256621582/Digital-Prison-Services-dev-hmpps_person_on_probation_audit_queue"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
locals {
sqs_queues = {
"Digital-Prison-Services-${var.environment}-hmpps_person_on_probation_audit_queue" = "hmpps-audit-${var.environment}",
}

sqs_policies = { for item in data.aws_ssm_parameter.irsa_policy_arns_sqs : item.name => item.value }
}

data "aws_ssm_parameter" "irsa_policy_arns_sqs" {
for_each = local.sqs_queues
name = "/${each.value}/sqs/${each.key}/irsa-policy-arn"
}

module "people-on-probation-ui-service-account" {
source = "github.com/ministryofjustice/cloud-platform-terraform-irsa?ref=2.1.0"
application = var.application
business_unit = var.business_unit
eks_cluster_name = var.eks_cluster_name
environment_name = var.environment
infrastructure_support = var.infrastructure_support
is_production = var.is_production
namespace = var.namespace
team_name = var.team_name

service_account_name = "hmpps-people-on-probation-ui"
role_policy_arns = local.sqs_policies
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ variable "github_token" {
variable "number_cache_clusters" {
default = "2"
}

variable "eks_cluster_name" {
description = "The name of the eks cluster to retrieve the OIDC information"
}
Loading