Skip to content
Open
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
4 changes: 2 additions & 2 deletions terraform/deployments/govuk-reports/iam.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# IAM role for govuk-reports application with access to Cost Explorer, RDS, and tagging APIs

locals {
govuk_reports_service_account_name = "govuk-reports"
govuk_reports_service_account_name = "govuk-reports-prototype"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably still include the cluster id/name, otherwise we'll get conflicts if we try to deploy it in an ephemeral cluster (which share an AWS account)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so keep govuk-reports-govuk?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a good point on ephemeral clusters.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe remove the first govuk. Just so it doesn't make my skin crawl :p

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll say govuk-reports-prototype-govuk in most envs, yeah. But in Terraform it'll read in a less skin itching way at least

}

# IAM policy document for govuk-reports permissions
Expand Down Expand Up @@ -62,7 +62,7 @@ module "govuk_reports_iam_role" {
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
version = "~> 5.20"

role_name = "${local.govuk_reports_service_account_name}-${data.tfe_outputs.cluster_infrastructure.nonsensitive_values.cluster_id}"
role_name = local.govuk_reports_service_account_name
role_description = "Role for govuk-reports application. Corresponds to ${local.govuk_reports_service_account_name} k8s ServiceAccount."
max_session_duration = 28800

Expand Down
Loading