Skip to content

Commit

Permalink
CCM-5100: Fix file formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
m-houston committed Jul 3, 2024
1 parent 75b7172 commit ac42e10
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion amplify/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
]
}
}
}
}
4 changes: 2 additions & 2 deletions infrastructure/modules/amplify-app/amplify-app.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
resource "aws_amplify_app" "app" {
name = "${local.csi}"
name = local.csi

iam_service_role_arn = aws_iam_role.service_role.arn

repository = var.repository
repository = var.repository
access_token = var.github_pat

# Only enable automation for dev environment
Expand Down
6 changes: 3 additions & 3 deletions infrastructure/modules/amplify-app/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ variable "module" {
}

variable "stage" {
type = string
type = string
description = "The domain PTL stage (prod|nonprod)"
}

Expand All @@ -25,7 +25,7 @@ variable "cognito_user_pool_id" {
}

variable "cognito_hosted_login_domain" {
type = string
type = string
description = "The domain assigned to the cognito user pool to handle login callbacks"
}

Expand All @@ -39,6 +39,6 @@ variable "domain_name" {
}

variable "github_pat" {
type = string
type = string
description = "GitHub Personal Access Token used to initialise a new Amplify app"
}
12 changes: 6 additions & 6 deletions infrastructure/modules/amplify-branch/amplify-branch.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
resource "aws_amplify_branch" "branch" {
app_id = var.amplify_app_id
branch_name = var.branch
display_name = var.subdomain
description = "${var.branch}"
app_id = var.amplify_app_id
branch_name = var.branch
display_name = var.subdomain
description = var.branch
enable_pull_request_preview = false # PR previews are not supported for public repos

environment_variables = {
Expand All @@ -14,8 +14,8 @@ resource "aws_amplify_branch" "branch" {
}

resource "aws_amplify_domain_association" "domain" {
app_id = var.amplify_app_id
domain_name = "${var.subdomain}.${var.domain_name}"
app_id = var.amplify_app_id
domain_name = "${var.subdomain}.${var.domain_name}"
enable_auto_sub_domain = false

# Wait for domain verification in prod stage environments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ resource "aws_cognito_user_pool_client" "client" {

callback_urls = flatten([
["https://${var.subdomain}.${var.domain_name}/auth/", "https://${var.subdomain}.${var.amplify_app_id}.amplifyapp.com/auth/"],
var.stage == "nonprod" ? ["http://localhost:3000/auth/"] :
var.environment == "prod" ? ["https://notify.nhs.net/auth/"] : []
var.stage == "nonprod" ? ["http://localhost:3000/auth/"] :
var.environment == "prod" ? ["https://notify.nhs.net/auth/"] : []
])
supported_identity_providers = flatten([
var.stage == "nonprod" ? ["COGNITO"] : [],
var.stage == "nonprod" ? ["COGNITO"] : [],
var.cognito_user_pool_identity_provider_names
])
allowed_oauth_flows = ["code"]
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/modules/route53-zone/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ locals {
)

deployment_default_tags = {
Domain = var.domain
Domain = var.domain
Environment = var.environment
Component = var.component
Module = var.module
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/modules/route53-zone/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ variable "module" {
}

variable "stage" {
type = string
type = string
description = "The domain PTL stage (prod|nonprod)"
}
2 changes: 1 addition & 1 deletion infrastructure/modules/userpool/cognito-userpool.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aws_cognito_user_pool" "userpool" {
name = "${local.csi}"
name = local.csi

username_attributes = ["email"]

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/modules/userpool/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ locals {
)

deployment_default_tags = {
Domain = var.domain
Domain = var.domain
Environment = var.environment
Component = var.component
Module = var.module
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/modules/userpool/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ output "identity_provider_names" {

output "hosted_login_domain" {
# TODO does not need suffix after switching to custom FQDN
value = "${ aws_cognito_user_pool_domain.domain.domain }.auth.eu-west-2.amazoncognito.com"
value = "${aws_cognito_user_pool_domain.domain.domain}.auth.eu-west-2.amazoncognito.com"
}
6 changes: 3 additions & 3 deletions infrastructure/modules/userpool/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ variable "component" {
}

variable "module" {
type = string
type = string
default = "userpool"
}

variable "stage" {
type = string
type = string
description = "The domain PTL stage (prod|nonprod)"
}

variable "app_url" {
type = string
type = string
description = "URL of web application used for auth callbacks"
}

0 comments on commit ac42e10

Please sign in to comment.