Skip to content

Commit a9893c1

Browse files
committed
feat: allow for extra_container_definitions
fixes #133
1 parent 76c90ef commit a9893c1

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
@@ -293,6 +293,12 @@ variable "custom_container_definitions" {
293293
default = ""
294294
}
295295

296+
variable "extra_container_definitions" {
297+
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"
298+
type = list(any)
299+
default = []
300+
}
301+
296302
variable "entrypoint" {
297303
description = "The entry point that is passed to the container"
298304
type = list(string)

0 commit comments

Comments
 (0)