Skip to content

Commit

Permalink
Merge pull request #10 from monte-carlo-data/mrostan/mes-146-caas-mig…
Browse files Browse the repository at this point in the history
…ration-update-aws-agent-templates

MES-146 Update agent template for CaaS migration
  • Loading branch information
mrostan authored May 30, 2024
2 parents ea83e13 + bfcc0e9 commit 4eca59d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
12 changes: 7 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
locals {
# Wrapper metadata
mcd_wrapper_version = "0.1.4"
mcd_wrapper_version = "0.1.5"
mcd_agent_platform = "AWS"
mcd_agent_service_name = "REMOTE_AGENT"
mcd_agent_deployment_type = "TERRAFORM"

# Deployment properties
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
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(["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
mcd_agent_store_name = "mcd-agent-store-${random_id.mcd_agent_id.hex}"
Expand Down Expand Up @@ -432,7 +434,7 @@ resource "aws_iam_role" "mcd_agent_service_invocation_role" {
{
"Effect" : "Allow",
"Principal" : {
"AWS" : "arn:aws:iam::${var.cloud_account_id}:root"
"AWS" : local.invocation_role_source_arns
},
"Action" : "sts:AssumeRole",
"Condition" : {
Expand Down
7 changes: 4 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ variable "image" {

variable "cloud_account_id" {
description = <<EOF
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
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"
Expand Down

0 comments on commit 4eca59d

Please sign in to comment.