Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lgtm-cat-api ECS にアクセストークンの検証に必要となる環境変数を追加 #84

Merged
merged 1 commit into from
Feb 8, 2023
Merged
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
4 changes: 4 additions & 0 deletions modules/aws/cognito/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ output "idp_endpoint" {
output "lgtm_cat_bff_client_id" {
value = aws_cognito_user_pool_client.lgtm_cat_bff_client.id
}

output "cognito_user_pool_id" {
value = aws_cognito_user_pool.user_pool.id
}
1 change: 1 addition & 0 deletions modules/aws/ecs/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ resource "aws_ecs_task_definition" "api" {
db_name_arn = aws_ssm_parameter.db_name.arn
upload_images_bucket_name = var.upload_images_bucket_name
lgtm_images_cdn_domain = var.lgtm_images_cdn_domain
cognito_user_pool_id = var.cognito_user_pool_id
})

cpu = var.ecs_task_cpu
Expand Down
4 changes: 4 additions & 0 deletions modules/aws/ecs/task/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
{
"name": "LGTM_IMAGES_CDN_DOMAIN",
"value": "${lgtm_images_cdn_domain}"
},
{
"name": "COGNITO_USER_POOL_ID",
"value": "${cognito_user_pool_id}"
}
],
"logConfiguration": {
Expand Down
3 changes: 3 additions & 0 deletions modules/aws/ecs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,8 @@ variable "lgtm_images_cdn_domain" {
variable "sentry_dsn" {
type = string
}
variable "cognito_user_pool_id" {
type = string
}

data "aws_region" "current" {}
5 changes: 5 additions & 0 deletions providers/aws/environments/prod/17-cognito/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ output "lgtm_cat_bff_client_id" {
value = module.cognito.lgtm_cat_bff_client_id
sensitive = true
}

output "cognito_user_pool_id" {
value = module.cognito.cognito_user_pool_id
sensitive = true
}
1 change: 1 addition & 0 deletions providers/aws/environments/prod/20-api/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ module "ecs" {
db_username = local.db_username
lgtm_images_cdn_domain = data.terraform_remote_state.images.outputs.lgtm_images_cdn_domain
sentry_dsn = local.sentry_dsn
cognito_user_pool_id = data.terraform_remote_state.cognito.outputs.cognito_user_pool_id
}
5 changes: 5 additions & 0 deletions providers/aws/environments/stg/17-cognito/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ output "lgtm_cat_bff_client_id" {
value = module.cognito.lgtm_cat_bff_client_id
sensitive = true
}

output "cognito_user_pool_id" {
value = module.cognito.cognito_user_pool_id
sensitive = true
}
1 change: 1 addition & 0 deletions providers/aws/environments/stg/20-api/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ module "ecs" {
db_username = local.db_username
lgtm_images_cdn_domain = data.terraform_remote_state.images.outputs.lgtm_images_cdn_domain
sentry_dsn = local.sentry_dsn
cognito_user_pool_id = data.terraform_remote_state.cognito.outputs.cognito_user_pool_id
}