# Variables ==================================================================== # Account ID ------------------------------------------------------------------- variable "account_id" { description = "ID of the target member account to set contacts on. Uses current account if omitted." type = string default = null } # Primary Contact -------------------------------------------------------------- # # Notes: # - Used by AWS for legal, tax, and account ownership communications # - phone must include country code (e.g. '+12065551234') # - country_code must be a valid ISO 3166-1 alpha-2 code (e.g. 'US', 'GB') # # Example: # primary_contact = { # full_name = "Platform Team" # company_name = "Example Corp" # phone = "+12065551234" # address_line_1 = "123 Any Street" # city = "Seattle" # state_or_region = "WA" # postal_code = "98101" # country_code = "US" # } # variable "primary_contact" { description = "Primary account contact used by AWS for legal, tax, and account ownership purposes." type = object({ full_name = string company_name = optional(string) phone = string website_url = optional(string) address_line_1 = string address_line_2 = optional(string) city = string state_or_region = optional(string) district_or_county = optional(string) postal_code = string country_code = string }) default = null } # Alternate Contacts ----------------------------------------------------------- # # Notes: # - Valid keys are 'billing', 'security', 'operations' (case-insensitive) # - billing receives billing alerts, invoices, and payment notifications # - security receives security findings, abuse notifications, and vulnerability reports # - operations receives service notifications, maintenance windows, and operational issues # - phone must include country code (e.g. '+12065551234') # # Example: # alternate_contacts = { # billing = { # name = "Finance Team" # title = "Finance Manager" # email = "aws-billing@example.com" # phone = "+12065551234" # } # security = { # name = "Security Team" # title = "Security Engineer" # email = "aws-security@example.com" # phone = "+12065551234" # } # operations = { # name = "Platform Team" # title = "Platform Engineer" # email = "aws-operations@example.com" # phone = "+12065551234" # } # } # variable "alternate_contacts" { description = "Alternate contacts for billing, security, and operations notifications." type = map(object({ name = string title = string email = string phone = string })) default = {} validation { condition = alltrue([for k in keys(var.alternate_contacts) : contains(["billing", "security", "operations"], lower(k))]) error_message = "Valid keys for alternate_contacts are 'billing', 'security', and 'operations'." } }