-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: add Terraform devcontainer #90
Conversation
This VS Code devcontainer creates a development environment for Terraform and Terragrunt work.
Plan changes✅ Terraform Format: Plan: 6 to add, 6 to change, 6 to destroy Show planResource actions are indicated with the following symbols:
~ update in-place
-/+ destroy and then create replacement
<= read (data resources)
Terraform will perform the following actions:
# data.template_file.form_viewer_task will be read during apply
# (config refers to values not yet known)
<= data "template_file" "form_viewer_task" {
~ id = "d860f4b473912678133a3f101afb77ca7e1e46354703ef71fa47611222b106ac" -> (known after apply)
~ rendered = jsonencode(
[
- {
- environment = [
- {
- name = "METRIC_PROVIDER"
- value = "stdout"
},
- {
- name = "TRACER_PROVIDER"
- value = "stdout"
},
- {
- name = "SUBMISSION_API"
- value = "arn:aws:lambda:ca-central-1:687401027353:function:Submission"
},
- {
- name = "TEMPLATES_API"
- value = "arn:aws:lambda:ca-central-1:687401027353:function:Templates"
},
- {
- name = "ORGANISATIONS_API"
- value = "arn:aws:lambda:ca-central-1:687401027353:function:Organisations"
},
- {
- name = "NEXTAUTH_URL"
- value = "https://forms-staging.cdssandbox.xyz"
},
- {
- name = "REDIS_URL"
- value = "gcforms-redis-rep-group.uwpetx.ng.0001.cac1.cache.amazonaws.com"
},
- {
- name = "RELIABILITY_FILE_STORAGE"
- value = "forms-staging-reliability-file-storage"
},
]
- image = "687401027353.dkr.ecr.ca-central-1.amazonaws.com/form_viewer_staging"
- linuxParameters = {
- capabilities = {
- drop = [
- "ALL",
]
}
}
- logConfiguration = {
- logDriver = "awslogs"
- options = {
- awslogs-group = "Forms"
- awslogs-region = "ca-central-1"
- awslogs-stream-prefix = "ecs-form-viewer"
}
}
- name = "form_viewer"
- portMappings = [
- {
- containerPort = 3000
},
]
- secrets = [
- {
- name = "NOTIFY_API_KEY"
- valueFrom = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:notify_api_key-nV4keR"
},
- {
- name = "GOOGLE_CLIENT_ID"
- valueFrom = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:google_client_id-wRtgIh"
},
- {
- name = "GOOGLE_CLIENT_SECRET"
- valueFrom = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:google_client_secret-tePLmK"
},
- {
- name = "DATABASE_URL"
- valueFrom = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:server-database-url-0PSpE3"
},
]
},
]
) -> (known after apply)
# (2 unchanged attributes hidden)
}
# aws_ecs_task_definition.form_viewer must be replaced
-/+ resource "aws_ecs_task_definition" "form_viewer" {
~ arn = "arn:aws:ecs:ca-central-1:687401027353:task-definition/form-viewer:247" -> (known after apply)
~ container_definitions = jsonencode(
[
- {
- cpu = 0
- environment = [
- {
- name = "METRIC_PROVIDER"
- value = "stdout"
},
- {
- name = "NEXTAUTH_URL"
- value = "https://forms-staging.cdssandbox.xyz"
},
- {
- name = "ORGANISATIONS_API"
- value = "arn:aws:lambda:ca-central-1:687401027353:function:Organisations"
},
- {
- name = "REDIS_URL"
- value = "gcforms-redis-rep-group.uwpetx.ng.0001.cac1.cache.amazonaws.com"
},
- {
- name = "RELIABILITY_FILE_STORAGE"
- value = "forms-staging-reliability-file-storage"
},
- {
- name = "SUBMISSION_API"
- value = "arn:aws:lambda:ca-central-1:687401027353:function:Submission"
},
- {
- name = "TEMPLATES_API"
- value = "arn:aws:lambda:ca-central-1:687401027353:function:Templates"
},
- {
- name = "TRACER_PROVIDER"
- value = "stdout"
},
]
- essential = true
- image = "687401027353.dkr.ecr.ca-central-1.amazonaws.com/form_viewer_staging"
- linuxParameters = {
- capabilities = {
- drop = [
- "ALL",
]
}
}
- logConfiguration = {
- logDriver = "awslogs"
- options = {
- awslogs-group = "Forms"
- awslogs-region = "ca-central-1"
- awslogs-stream-prefix = "ecs-form-viewer"
}
}
- mountPoints = []
- name = "form_viewer"
- portMappings = [
- {
- containerPort = 3000
- hostPort = 3000
- protocol = "tcp"
},
]
- secrets = [
- {
- name = "NOTIFY_API_KEY"
- valueFrom = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:notify_api_key-nV4keR"
},
- {
- name = "GOOGLE_CLIENT_ID"
- valueFrom = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:google_client_id-wRtgIh"
},
- {
- name = "GOOGLE_CLIENT_SECRET"
- valueFrom = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:google_client_secret-tePLmK"
},
- {
- name = "DATABASE_URL"
- valueFrom = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:server-database-url-0PSpE3"
},
]
- volumesFrom = []
},
]
) -> (known after apply) # forces replacement
~ id = "form-viewer" -> (known after apply)
~ revision = 247 -> (known after apply)
tags = {
"CostCentre" = "Forms"
}
# (8 unchanged attributes hidden)
}
# aws_lambda_function.load_testing will be updated in-place
~ resource "aws_lambda_function" "load_testing" {
id = "LoadTesting"
~ last_modified = "2021-10-13T19:39:42.040+0000" -> (known after apply)
~ source_code_hash = "OtczZUYbSNub35avTueA8Gjm4ZXbqiEBUogE/CXdiDU=" -> "rf3NAx+8dyh+Rp8EIy7SO1fXk29QuRo1K0IU1F2nPbc="
tags = {}
# (19 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# aws_lambda_function.organisations will be updated in-place
~ resource "aws_lambda_function" "organisations" {
id = "Organisations"
~ layers = [
- "arn:aws:lambda:ca-central-1:687401027353:layer:organisations_node_packages:1",
] -> (known after apply)
tags = {}
# (19 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# aws_lambda_function.reliability will be updated in-place
~ resource "aws_lambda_function" "reliability" {
id = "Reliability"
~ layers = [
- "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_lib_packages:54",
- "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_node_packages:56",
] -> (known after apply)
tags = {}
# (19 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# aws_lambda_function.retrieval will be updated in-place
~ resource "aws_lambda_function" "retrieval" {
id = "Retrieval"
~ layers = [
- "arn:aws:lambda:ca-central-1:687401027353:layer:retrieval_node_packages:3",
] -> (known after apply)
tags = {}
# (19 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# aws_lambda_function.submission will be updated in-place
~ resource "aws_lambda_function" "submission" {
id = "Submission"
~ layers = [
- "arn:aws:lambda:ca-central-1:687401027353:layer:submission_node_packages:4",
] -> (known after apply)
tags = {}
# (19 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# aws_lambda_function.templates will be updated in-place
~ resource "aws_lambda_function" "templates" {
id = "Templates"
~ layers = [
- "arn:aws:lambda:ca-central-1:687401027353:layer:templates_node_packages:3",
] -> (known after apply)
tags = {}
# (19 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# aws_lambda_layer_version.organisations_lib must be replaced
-/+ resource "aws_lambda_layer_version" "organisations_lib" {
~ arn = "arn:aws:lambda:ca-central-1:687401027353:layer:organisations_node_packages:1" -> (known after apply)
- compatible_architectures = [] -> null
~ created_date = "2021-07-13T19:14:04.495+0000" -> (known after apply)
~ id = "arn:aws:lambda:ca-central-1:687401027353:layer:organisations_node_packages:1" -> (known after apply)
~ layer_arn = "arn:aws:lambda:ca-central-1:687401027353:layer:organisations_node_packages" -> (known after apply)
+ signing_job_arn = (known after apply)
+ signing_profile_version_arn = (known after apply)
~ source_code_hash = "QO1V+FhaIkZjr6Sl850U1vEKTXny0o1rGzhWUbBXbkw=" -> "48EJ84qpIym5jelu9uB98J+dCWlegI822XLuZb1ncP0=" # forces replacement
~ source_code_size = 2483467 -> (known after apply)
~ version = "1" -> (known after apply)
# (3 unchanged attributes hidden)
}
# aws_lambda_layer_version.reliability_nodejs must be replaced
-/+ resource "aws_lambda_layer_version" "reliability_nodejs" {
~ arn = "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_node_packages:56" -> (known after apply)
- compatible_architectures = [] -> null
~ created_date = "2021-10-13T19:39:46.800+0000" -> (known after apply)
~ id = "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_node_packages:56" -> (known after apply)
~ layer_arn = "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_node_packages" -> (known after apply)
+ signing_job_arn = (known after apply)
+ signing_profile_version_arn = (known after apply)
~ source_code_hash = "xFtAIqNcMYOGKJZH/7F0rnLXCL5J1AcAsZ3Ns371WNQ=" -> "DNBmSZrzWtKYDv7McTMdyG1KmLGobzXKAvRwv9j5QNs=" # forces replacement
~ source_code_size = 20779371 -> (known after apply)
~ version = "56" -> (known after apply)
# (3 unchanged attributes hidden)
}
# aws_lambda_layer_version.retrieval_lib must be replaced
-/+ resource "aws_lambda_layer_version" "retrieval_lib" {
~ arn = "arn:aws:lambda:ca-central-1:687401027353:layer:retrieval_node_packages:3" -> (known after apply)
- compatible_architectures = [] -> null
~ created_date = "2021-06-28T19:53:44.191+0000" -> (known after apply)
~ id = "arn:aws:lambda:ca-central-1:687401027353:layer:retrieval_node_packages:3" -> (known after apply)
~ layer_arn = "arn:aws:lambda:ca-central-1:687401027353:layer:retrieval_node_packages" -> (known after apply)
+ signing_job_arn = (known after apply)
+ signing_profile_version_arn = (known after apply)
~ source_code_hash = "RvSAqGag7CLOZltsLTfxoXP+3wBhARo6PjRibsXSP30=" -> "qcHId9Wnzl7ceyjE5U6ggZpbWencqEGKHx4OP0LSAx4=" # forces replacement
~ source_code_size = 3316708 -> (known after apply)
~ version = "3" -> (known after apply)
# (3 unchanged attributes hidden)
}
# aws_lambda_layer_version.submission_lib must be replaced
-/+ resource "aws_lambda_layer_version" "submission_lib" {
~ arn = "arn:aws:lambda:ca-central-1:687401027353:layer:submission_node_packages:4" -> (known after apply)
- compatible_architectures = [] -> null
~ created_date = "2021-04-29T12:58:47.849+0000" -> (known after apply)
~ id = "arn:aws:lambda:ca-central-1:687401027353:layer:submission_node_packages:4" -> (known after apply)
~ layer_arn = "arn:aws:lambda:ca-central-1:687401027353:layer:submission_node_packages" -> (known after apply)
+ signing_job_arn = (known after apply)
+ signing_profile_version_arn = (known after apply)
~ source_code_hash = "51vLtKdfwIEdnPUHX/lC01ol1wk+LX9kaGerlVkbjgU=" -> "1ARs9b+tsfyvs0fVLZZD65WBYoowJENJqyCGclujT+w=" # forces replacement
~ source_code_size = 3263905 -> (known after apply)
~ version = "4" -> (known after apply)
# (3 unchanged attributes hidden)
}
# aws_lambda_layer_version.templates_lib must be replaced
-/+ resource "aws_lambda_layer_version" "templates_lib" {
~ arn = "arn:aws:lambda:ca-central-1:687401027353:layer:templates_node_packages:3" -> (known after apply)
- compatible_architectures = [] -> null
~ created_date = "2021-06-29T16:11:14.218+0000" -> (known after apply)
~ id = "arn:aws:lambda:ca-central-1:687401027353:layer:templates_node_packages:3" -> (known after apply)
~ layer_arn = "arn:aws:lambda:ca-central-1:687401027353:layer:templates_node_packages" -> (known after apply)
+ signing_job_arn = (known after apply)
+ signing_profile_version_arn = (known after apply)
~ source_code_hash = "l1lxGU/o2C15AooV3dMWSp7XVXB2tnX6151tAaMh0Fc=" -> "abA8dRapPg32CDFgXsq6VHV5IWNMypeQKz8lRY0qZHo=" # forces replacement
~ source_code_size = 2403413 -> (known after apply)
~ version = "3" -> (known after apply)
# (3 unchanged attributes hidden)
}
Plan: 6 to add, 6 to change, 6 to destroy.
------------------------------------------------------------------------
This plan was saved to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
Releasing state lock. This may take a few moments...
|
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.
We'll probably want to modify the github workflow to only run the check on code that is actually changes to terraform. Currently triggering on any file changes.
Totally agree #91 😄 |
Summary
This VS Code devcontainer creates a development environment
for Terraform and Terragrunt work.
Related