Skip to content
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

RWEB-8118: synths for pbsorg #6

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ locals {
defaulted_tags = merge(
var.tags,
{
Name = local.name
"${var.organization}:billing:product" = var.product
"${var.organization}:billing:environment" = var.environment
creator = local.creator
repo = var.repo
Name = local.name
"${var.organization}:billing:owner" = var.owner
"${var.organization}:billing:product" = var.product
"${var.organization}:billing:environment" = var.environment
creator = local.creator
repo = var.repo
}
)

Expand Down
14 changes: 3 additions & 11 deletions optional.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
variable "name" {
description = "Name of the synthetics module. If null, will default to product."
type = string
default = null
}

variable "schedule" {
Expand Down Expand Up @@ -41,7 +40,7 @@ variable "handler" {
variable "delete_lambda" {
description = "Specifies whether to also delete the Lambda functions and layers used by this canary."
type = bool
default = false
default = true
}

variable "vpc_config" {
Expand Down Expand Up @@ -78,17 +77,10 @@ variable "run_config" {
variable "canary_script_s3_location" {
description = "Location in Amazon S3 where Synthetics stores the canary script for a canary. Conflicts with `zip_file`."
type = object({
bucket = optional(string)
key = optional(string)
bucket = string
key = string
version = optional(string)
})
default = {}
}

variable "zip_file" {
description = "ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with `canary_script_s3_location`."
type = string
default = null
}

variable "start_canary" {
Expand Down
13 changes: 13 additions & 0 deletions tags.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ variable "product" {
condition = can(regex("[a-z\\-]+", var.product))
error_message = "The product variable violates approved regex."
}
default = "pbsorg"
}

variable "repo" {
Expand All @@ -23,6 +24,7 @@ variable "repo" {
condition = can(regex("(?:git|ssh|https?|git@[-\\w.]+):(\\/\\/)?(.*?)(\\.git)(\\/?|\\#[-\\d\\w._]+?)$", var.repo))
error_message = "The repo variable violates approved regex."
}
default = "[email protected]:pbs/pbsorg"
}

variable "organization" {
Expand All @@ -32,6 +34,17 @@ variable "organization" {
condition = can(regex("[a-z\\-]+", var.organization))
error_message = "The organization variable violates approved regex."
}
default = "pbs"
}

variable "owner" {
description = "The group within PBS that is accountable for the project using this module."
type = string
validation {
condition = contains(["videoapps", "identity", "ap", "webservices", "vidtech", "core", "consumer"], var.owner)
error_message = "The organization variable violates approved regex."
}
default = "ap"
}

variable "tags" {
Expand Down
Loading