Skip to content

Commit

Permalink
ECR stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeemster committed Apr 3, 2024
1 parent e5d0318 commit 72554ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ locals {
container_memory = "${module.instance_type_metrics.memory_application_mb}m"
java_opts = var.java_opts

private_ecr_registry = var.private_ecr_registry
is_private_ecr_registry = local.is_private_ecr_registry
private_ecr_registry = var.private_ecr_registry
region = data.aws_region.current.name
})
}

Expand Down
4 changes: 4 additions & 0 deletions templates/user-data.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ sudo base64 --decode << EOF > $${CONFIG_DIR}/iglu-server.hocon
${config_b64}
EOF

%{ if is_private_ecr_registry }
aws ecr get-login-password --region ${region} | docker login --username AWS --password-stdin ${private_ecr_registry}
%{ endif ~}

# Run the server setup
set +e
sudo docker run \
Expand Down

0 comments on commit 72554ee

Please sign in to comment.