Skip to content

Commit

Permalink
removed N/A option from cloud account id var
Browse files Browse the repository at this point in the history
  • Loading branch information
mrostan committed May 29, 2024
1 parent c149e8a commit bfcc0e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ locals {
account_id = data.aws_caller_identity.current.account_id
partition_id = data.aws_partition.current.id
connect_to_vpc = length(var.private_subnets) >= 2 ? true : false
skip_cloud_account_policy = contains(["N/A", "590183797493"], var.cloud_account_id)
skip_cloud_account_policy = contains(["590183797493"], var.cloud_account_id)
invocation_role_source_arns = local.skip_cloud_account_policy ? ["arn:aws:iam::590183797493:root"] : ["arn:aws:iam::${var.cloud_account_id}:root", "arn:aws:iam::590183797493:root"]

# Data store properties
Expand Down
9 changes: 6 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ variable "image" {

variable "cloud_account_id" {
description = <<EOF
[Deprecated] For updates use the previous value, for new deployments use N/A.
The service that invokes the agent is being migrated to the AWS Account with ID: 590183797493.
For accounts created after April 24th, 2024 select 590183797493, for previously created
accounts select the Monte Carlo account your collection service is hosted in.
This can be found in the 'settings/integrations/collectors' tab on the UI or via the 'montecarlo collectors list' command on the CLI.
EOF
type = string
default = "190812797848"
validation {
condition = contains(["N/A", "190812797848", "799135046351", "682816785079", "637423407294", "590183797493"], var.cloud_account_id)
error_message = "Valid value is one of the following: N/A, 190812797848, 799135046351, 682816785079, 637423407294, 590183797493."
condition = contains(["190812797848", "799135046351", "682816785079", "637423407294", "590183797493"], var.cloud_account_id)
error_message = "Valid value is one of the following: 190812797848, 799135046351, 682816785079, 637423407294, 590183797493."
}
}

Expand Down

0 comments on commit bfcc0e9

Please sign in to comment.