variable "upwind_trusted_account_id" { # For the majority of use cases this should be left as the default. description = "The identifier of the trusted account used for IAM cross-account access." type = string default = "340457201789" validation { condition = can(regex("^[0-9]{12}$", var.upwind_trusted_account_id)) error_message = "The value for the Upwind trusted account id must be a 12-digit AWS account ID." } } variable "upwind_cfn_bucket" { # For the majority of use cases this should be left as the default. Non-production # Upwind environments host their CloudFormation templates on a different bucket # (e.g. get.upwind.dev). description = "Hostname of the Upwind S3 bucket that hosts the CloudFormation templates referenced by the account service role policies." type = string default = "get.upwind.io" validation { condition = length(var.upwind_cfn_bucket) > 0 error_message = "The Upwind CloudFormation bucket host must not be empty." } } variable "external_id" { # The external_id is attached to the trusted entities allowing assume-role requests from upwind to be authenticated. description = "The external ID for secure cross-account role assumption." type = string } variable "orchestrator_account_id" { # Additional permissions will be created in the orchestrator account - allowing CloudScanners to be installed. If provided additional roles will also be provided # in this account. description = "The account ID of the Upwind orchestrator account. If specified, certain roles will only be created in this account to maintain operational security and control." type = string default = null # If the orchestrator account id role is set it must be a valid account id validation { condition = can(regex("^[0-9]{12}$", var.orchestrator_account_id)) || var.orchestrator_account_id == null error_message = "The value for the orchestrator account id must be a 12-digit AWS account ID or an empty string." } } variable "management_account_id" { # The Organization discovery role will be created in the management account. description = "The account ID of the AWS Organization management account. The Org discover role will be created in this account." type = string # If the orchestrator account id role is set it must be a valid account id validation { condition = can(regex("^[0-9]{12}$", var.management_account_id)) error_message = "The value for the AWS management account must be a 12-digit AWS account ID or an empty string." } } variable "install_roles_in_management_account" { # Enabling this option will install additional roles in the management account which allows that account to be scanned if required. # It would also allow the management account to be used as the orchestrator account if the same account is selected. description = "Install the additional roles in the management account - if required." type = bool default = false } variable "organization_role_name" { description = "The base name of the IAM role to be created, used for account discovery within the AWS Org." type = string default = "UpwindOrganizationServiceRole" validation { condition = can(regex("^[a-zA-Z0-9-_]+$", var.organization_role_name)) error_message = "The base Org discovery role name contains invalid characters." } # Full Role name validation is delegated to the sub modules. } variable "account_service_role_name" { description = "The base name of the IAM role to be created, used for security auditing purposes." type = string default = "UpwindAccountServiceRole" validation { condition = can(regex("^[a-zA-Z0-9-_]+$", var.account_service_role_name)) error_message = "The base Account service role name contains invalid characters." } # Full role name validation is delegated to the sub modules. } variable "account_service_cloudformation_policy_name" { description = "The base name to be used for the Cloudformation policy name in the account service role." type = string default = "UpwindAccountServiceCloudFormationPolicy" validation { condition = can(regex("^[a-zA-Z0-9-_]+$", var.account_service_cloudformation_policy_name)) error_message = "The Cloudformation policy base name contains invalid characters." } # Full policy name validation is delegated to the sub modules. } variable "account_service_cloudscanner_ec2_policy_name" { description = "The base name to be used for the CloudScanner EC2 policy name in the account service role." type = string default = "UpwindAccountServiceCloudScannerEC2Policy" validation { condition = can(regex("^[a-zA-Z0-9-_]+$", var.account_service_cloudscanner_ec2_policy_name)) error_message = "The CloudScanner EC2 policy base name contains invalid characters." } # Full policy name validation is delegated to the sub modules. } variable "account_service_cloudscanner_policy_name" { description = "The base name to be used for the CloudScanner policy name in the account service role." type = string default = "UpwindAccountServiceCloudScannerPolicy" validation { condition = can(regex("^[a-zA-Z0-9-_]+$", var.account_service_cloudscanner_policy_name)) error_message = "The CloudScanner policy base name contains invalid characters." } # Full policy name validation is delegated to the sub modules. } variable "account_service_cloudscanner_ec2_network_policy_name" { description = <