Skip to content

Commit

Permalink
NOBUG: Adding var for sso_issuer and sso_jwksuri (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieltruong authored Apr 8, 2022
1 parent d19ac0e commit c78014b
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 5 deletions.
2 changes: 2 additions & 0 deletions terraform/src/export.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ resource "aws_lambda_function" "exportPassLambda" {
GC_NOTIFY_CANCEL_TEMPLATE_ID = data.aws_ssm_parameter.gc_notify_cancel_template_id.value,
PASS_CANCELLATION_ROUTE = data.aws_ssm_parameter.pass_cancellation_route.value,
S3_BUCKET_DATA = data.aws_ssm_parameter.s3_bucket_data.value,
SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value,
SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value,
}
}

Expand Down
6 changes: 5 additions & 1 deletion terraform/src/facility.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ resource "aws_lambda_function" "readFacilityLambda" {

environment {
variables = {
TABLE_NAME = data.aws_ssm_parameter.db_name.value
TABLE_NAME = data.aws_ssm_parameter.db_name.value,
SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value,
SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value,
}
}

Expand Down Expand Up @@ -57,6 +59,8 @@ resource "aws_lambda_function" "writeFacilityLambda" {
environment {
variables = {
TABLE_NAME = data.aws_ssm_parameter.db_name.value
SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value,
SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value,
}
}

Expand Down
8 changes: 6 additions & 2 deletions terraform/src/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ resource "aws_lambda_function" "readParkLambda" {

environment {
variables = {
TABLE_NAME = data.aws_ssm_parameter.db_name.value
TABLE_NAME = data.aws_ssm_parameter.db_name.value,
SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value,
SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value,
}
}

Expand Down Expand Up @@ -71,7 +73,9 @@ resource "aws_lambda_function" "writeParkLambda" {

environment {
variables = {
TABLE_NAME = data.aws_ssm_parameter.db_name.value
TABLE_NAME = data.aws_ssm_parameter.db_name.value,
SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value,
SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value,
}
}

Expand Down
4 changes: 3 additions & 1 deletion terraform/src/metric.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ resource "aws_lambda_function" "metricLambda" {
environment {
variables = {
TABLE_NAME = data.aws_ssm_parameter.db_name.value,
JWT_SECRET = local.jwtSecret.jwtSecret
JWT_SECRET = local.jwtSecret.jwtSecret,
SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value,
SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value,
}
}

Expand Down
8 changes: 8 additions & 0 deletions terraform/src/params.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,12 @@ data "aws_ssm_parameter" "rocketchat_url" {

data "aws_ssm_parameter" "rocketchat_bearer_token" {
name = "/parks-reso-api/rocketchat_bearer_token"
}

data "aws_ssm_parameter" "sso_issuer" {
name = "/parks-reso-api/sso-issuer"
}

data "aws_ssm_parameter" "sso_jwksuri" {
name = "/parks-reso-api/sso-jwksuri"
}
8 changes: 7 additions & 1 deletion terraform/src/pass.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ resource "aws_lambda_function" "readPassLambda" {
GC_NOTIFY_API_KEY = data.aws_ssm_parameter.gc_notify_api_key.value,
GC_NOTIFY_CANCEL_TEMPLATE_ID = data.aws_ssm_parameter.gc_notify_cancel_template_id.value,
PASS_CANCELLATION_ROUTE = data.aws_ssm_parameter.pass_cancellation_route.value,
SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value,
SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value,
}
}

Expand Down Expand Up @@ -65,6 +67,8 @@ resource "aws_lambda_function" "writePassLambda" {
GC_NOTIFY_PARKING_RECEIPT_TEMPLATE_ID = data.aws_ssm_parameter.gc_notify_parking_receipt_template_id.value,
GC_NOTIFY_TRAIL_RECEIPT_TEMPLATE_ID = data.aws_ssm_parameter.gc_notify_trail_receipt_template_id.value,
PASS_CANCELLATION_ROUTE = data.aws_ssm_parameter.pass_cancellation_route.value,
SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value,
SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value,
}
}

Expand Down Expand Up @@ -108,7 +112,9 @@ resource "aws_lambda_function" "deletePassLambda" {
environment {
variables = {
TABLE_NAME = data.aws_ssm_parameter.db_name.value,
JWT_SECRET = local.jwtSecret.jwtSecret
JWT_SECRET = local.jwtSecret.jwtSecret,
SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value,
SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value,
}
}

Expand Down
2 changes: 2 additions & 0 deletions terraform/src/settings.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ resource "aws_lambda_function" "readConfigLambda" {
environment {
variables = {
TABLE_NAME = data.aws_ssm_parameter.db_name.value
SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value,
SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value,
}
}

Expand Down

0 comments on commit c78014b

Please sign in to comment.