Skip to content

Commit

Permalink
remove aws profile
Browse files Browse the repository at this point in the history
  • Loading branch information
aembryonic committed Dec 20, 2024
1 parent 6f97184 commit c0e154a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ terraform {
region = "us-east-1"
# dynamodb_table = "terraform-lock-integration-db"
encrypt = true
#profile = "nlp_tf"
# profile = "nlp_tf"
}
}

provider "aws" {
region = var.aws_region
#profile = var.aws_profile
# profile = var.aws_profile
#shared_credentials_files = ["~/.aws/credentials"]
}

Expand Down
10 changes: 4 additions & 6 deletions modules/server/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ locals {
app_image_url = "${data.aws_caller_identity.current_user.account_id}.dkr.ecr.${var.aws_region}.amazonaws.com/${var.app_image}:latest"
}

data "template_file" "config" {
template = file("./modules/server/templates/ecr_image/image.json")

vars = {
locals {
rendered_config = templatefile("./modules/server/templates/ecr_image/image.json", {
app_image = local.app_image_url
app_port = var.app_port
fargate_cpu = var.fargate_cpu
Expand Down Expand Up @@ -113,7 +111,7 @@ data "template_file" "config" {
reliability_model_version = var.reliability_model_version
# OpenAI API key
ssm_openai_api_key_arn = var.ssm_openai_api_key_arn
}
})
}

resource "aws_ecs_task_definition" "task-def" {
Expand All @@ -124,7 +122,7 @@ resource "aws_ecs_task_definition" "task-def" {
requires_compatibilities = ["FARGATE"]
cpu = var.fargate_cpu
memory = var.fargate_memory
container_definitions = data.template_file.config.rendered
container_definitions = local.rendered_config
}

resource "aws_ecs_service" "service" {
Expand Down

0 comments on commit c0e154a

Please sign in to comment.