Skip to content

Commit

Permalink
support type key for CodeBuild environment variables (#88)
Browse files Browse the repository at this point in the history
Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com>
  • Loading branch information
joe-niland and cloudpossebot authored Apr 22, 2021
1 parent 3c23c4e commit f2c178b
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 171 deletions.
173 changes: 89 additions & 84 deletions README.md

Large diffs are not rendered by default.

170 changes: 88 additions & 82 deletions docs/terraform.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion examples/complete/fixtures.us-east-2.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ environment_variables = [
{
name = "APP_URL"
value = "https://app.example.com"
type = "PLAINTEXT"
},
{
name = "COMPANY_NAME"
value = "Cloud Posse"
type = "PLAINTEXT"
},
{
name = "TIME_ZONE"
value = "America/Los_Angeles"

type = "PLAINTEXT"
}
]

Expand Down
4 changes: 3 additions & 1 deletion examples/complete/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ variable "environment_variables" {
{
name = string
value = string
type = string
}))

default = [
{
name = "NO_ADDITIONAL_BUILD_VARS"
value = "TRUE"
type = "PLAINTEXT"
}]

description = "A list of maps, that contain both the key 'name' and the key 'value' to be used as additional environment variables for the build"
description = "A list of maps, that contain the keys 'name', 'value', and 'type' to be used as additional environment variables for the build. Valid types are 'PLAINTEXT', 'PARAMETER_STORE', or 'SECRETS_MANAGER'"
}

variable "cache_expiration_days" {
Expand Down
4 changes: 3 additions & 1 deletion examples/vpc/fixtures.us-east-2.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ environment_variables = [
{
name = "APP_URL"
value = "https://app.example.com"
type = "PLAINTEXT"
},
{
name = "COMPANY_NAME"
value = "Cloud Posse"
type = "PLAINTEXT"
},
{
name = "TIME_ZONE"
value = "America/Los_Angeles"

type = "PLAINTEXT"
}
]

Expand Down
4 changes: 3 additions & 1 deletion examples/vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ variable "environment_variables" {
{
name = string
value = string
type = string
}))

default = [
{
name = "NO_ADDITIONAL_BUILD_VARS"
value = "TRUE"
type = "PLAINTEXT"
}]

description = "A list of maps, that contain both the key 'name' and the key 'value' to be used as additional environment variables for the build"
description = "A list of maps, that contain the keys 'name', 'value', and 'type' to be used as additional environment variables for the build. Valid types are 'PLAINTEXT', 'PARAMETER_STORE', or 'SECRETS_MANAGER'"
}

variable "cache_expiration_days" {
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ resource "aws_codebuild_project" "default" {
content {
name = environment_variable.value.name
value = environment_variable.value.value
type = environment_variable.value.type
}
}

Expand Down
4 changes: 3 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ variable "environment_variables" {
{
name = string
value = string
type = string
}))

default = [
{
name = "NO_ADDITIONAL_BUILD_VARS"
value = "TRUE"
type = "PLAINTEXT"
}]

description = "A list of maps, that contain both the key 'name' and the key 'value' to be used as additional environment variables for the build"
description = "A list of maps, that contain the keys 'name', 'value', and 'type' to be used as additional environment variables for the build. Valid types are 'PLAINTEXT', 'PARAMETER_STORE', or 'SECRETS_MANAGER'"
}

variable "cache_expiration_days" {
Expand Down

0 comments on commit f2c178b

Please sign in to comment.