Skip to content

Commit e43cdc5

Browse files
committed
feat: allow for extra_container_definitions
fixes #133
1 parent 05b9dc7 commit e43cdc5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ locals {
2828
alb_authenication_method = length(keys(var.alb_authenticate_oidc)) > 0 ? "authenticate-oidc" : length(keys(var.alb_authenticate_cognito)) > 0 ? "authenticate-cognito" : "forward"
2929

3030
# Container definitions
31-
container_definitions = var.custom_container_definitions == "" ? var.atlantis_bitbucket_user_token != "" ? module.container_definition_bitbucket.json_map_encoded_list : module.container_definition_github_gitlab.json_map_encoded_list : var.custom_container_definitions
31+
container_definitions = var.custom_container_definitions == "" ? var.atlantis_bitbucket_user_token != "" ? jsonencode(concat([module.container_definition_bitbucket.json_map_object], var.extra_container_definitions)) : jsonencode(concat([module.container_definition_github_gitlab.json_map_object], var.extra_container_definitions)) : var.custom_container_definitions
3232

3333
container_definition_environment = [
3434
{

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,12 @@ variable "custom_container_definitions" {
287287
default = ""
288288
}
289289

290+
variable "extra_container_definitions" {
291+
description = "A list of valid container definitions provided as a single valid JSON document. These will be provided as supplimentary to the main Atlantis container definition"
292+
type = list(any)
293+
default = []
294+
}
295+
290296
variable "entrypoint" {
291297
description = "The entry point that is passed to the container"
292298
type = list(string)

0 commit comments

Comments
 (0)