Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
update terraform to provision endpoints - change docker script
Browse files Browse the repository at this point in the history
  • Loading branch information
vggonzal authored and vggonzal committed Aug 6, 2023
1 parent 9c4d711 commit df60c48
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions terraform/hydrocron-main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,6 @@ resource "aws_security_group_rule" "allow_app_in" {
source_security_group_id = aws_security_group.service-app-sg.id
}

environment {
variables = {
DB_HOST=data.aws_ssm_parameter.fts-db-host.value
DB_NAME=data.aws_ssm_parameter.fts-db-name.value
DB_USERNAME=data.aws_ssm_parameter.fts-db-user.value
DB_PASSWORD_SSM_NAME=data.aws_ssm_parameter.fts-db-user-pass.name
}
}


resource "aws_api_gateway_deployment" "hydrocron-api-gateway-deployment" {
rest_api_id = aws_api_gateway_rest_api.hydrocron-api-gateway.id
Expand Down Expand Up @@ -244,6 +235,14 @@ resource "aws_codebuild_project" "hydrocron" {
type = "S3"
}

environment {
compute_type = "BUILD_GENERAL1_SMALL"
image_pull_credentials_type = "CODEBUILD"
privileged_mode = false
image = "aws/codebuild/standard:3.0"
type = "LINUX_CONTAINER"
}

logs_config {
cloudwatch_logs {
status = "ENABLED"
Expand All @@ -262,4 +261,13 @@ resource "aws_codebuild_project" "hydrocron" {
location = "podaac-services-${var.stage}-deploy/internal/hydrocron/"
}

vpc_config {
vpc_id = var.vpc_id

subnets = var.private_subnets

security_group_ids = [
aws_security_group.service-app-sg.id
]
}
}

0 comments on commit df60c48

Please sign in to comment.