-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature Lambda buckets & ECS tags #4
Feature Lambda buckets & ECS tags #4
Conversation
This is intended to support using the terraform as a primary deployment tool for the application into different environments. By default stub code is pushed into s3 but if the `tfvars` are specified then the lambdas will honor that revised code ultimately allowing us to version the `tfvars` file as part of our deployments. The goal is to provide a reproducible snapshot of any environment using the `tfvars` file.
This allows the tfvars to become an environment's source of truth.
/cc @dgonzalez |
7f38f1a
to
2b1abf8
Compare
callback_lambda_s3_bucket = "" | ||
callback_lambda_s3_key = "" | ||
cso_lambda_s3_bucket = "" | ||
cso_lambda_s3_key = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed on a call about naming:
lambda_cso_s3_key
Pending small cosmetic change but pretty good! |
…pecific variables
ecs_api.tf
Outdated
@@ -93,9 +93,10 @@ data "template_file" "api_service_container_definitions" { | |||
template = file("templates/api_service_task_definition.tpl") | |||
|
|||
vars = { | |||
api_image_uri = "${aws_ecr_repository.api.repository_url}:latest" | |||
api_image_uri = "${aws_ecr_repository.api.repository_url}:${var.api_container_tag}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@segfault Guessing this is a redundant line ?
Can we change the container in the var names to image ?
Is the idea that you could set the migrations_image_repo_url ? If so will the created ECR repos be ignored if you use a different image registry ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me
@@ -0,0 +1,18 @@ | |||
resource "aws_s3_bucket" "lambdas" { | |||
bucket = module.labels.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this name - should we have a suffix
redoing this against the current repo based on the feedback |
To support using
tfvars
as an environment state snapshot in our deploy tooling we need to have the terraform honor specific settings. This changes the default lambda behavior which uploads stubs over to one that supports the original workflow and one where the deployable is explicitly specified. The same behavior and intent exists on the ECS side.This is one possible deployment workflow, but it should work for any existing environments with zero friction.