Skip to content

Commit

Permalink
adding variables to csr and planet env modules (#5526)
Browse files Browse the repository at this point in the history
Co-authored-by: Hope Aitchison <[email protected]>
  • Loading branch information
robertsweetman and haitchison authored Apr 2, 2024
1 parent f9a5b21 commit 0d48405
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
9 changes: 6 additions & 3 deletions terraform/environments/corporate-staff-rostering/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,13 @@ module "baseline" {
}

module "cross_account_cloudwatch" {
source = "../../modules/cross_account_cloudwatch"
environment = module.environment
options = merge(
source = "../../modules/cross_account_cloudwatch"
environment = module.environment
options = merge(
local.cloudwatch_monitoring_options,
local.cloudwatch_local_environment_monitoring_options,
)
monitoring_account_id = module.environment.account_ids.corporate-staff-rostering-production
source_account_ids = [module.environment.account_ids.planetfm-production]
monitoring_account_sink_identifier = "arn:aws:oam:eu-west-2:${module.environment.account_ids.corporate-staff-rostering-production}:sink/c78e5972-8464-4244-949f-872b726bc563"
}
19 changes: 12 additions & 7 deletions terraform/environments/corporate-staff-rostering/variables.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# variable "monitoring_account_sink_identifier" {
# variable "monitoring_account_sink_identifier" {
# type = string
# default = "arn:aws:oam:eu-west-2:${module.environment.account_ids.corporate-staff-rostering-production}:sink/c78e5972-8464-4244-949f-872b726bc563"
# }

# variable "monitoring_account_id" {
# type = string
# default = "arn:aws:oam:eu-west-2:775245656481:sink/7d4f9ba0-e432-49d1-8f34-1fda2d165bf8"
# } TODO
# default = module.environment.account_ids.corporate-staff-rostering-production
# }

variable "monitoring_account_id" {
type = string
default = "221841889672" # corporate-staff-rostering-production account
}
# variable "source_account_ids" {
# type = list(string)
# default = [module.environment.account_ids.planetfm-production]
# }
10 changes: 6 additions & 4 deletions terraform/environments/planetfm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,13 @@ module "baseline" {
}

module "cross_account_cloudwatch" {
source = "../../modules/cross_account_cloudwatch"
environment = module.environment
options = merge(
source = "../../modules/cross_account_cloudwatch"
environment = module.environment
options = merge(
local.cloudwatch_monitoring_options,
local.cloudwatch_local_environment_monitoring_options,
)
monitoring_account_id = module.environment.account_ids.corporate-staff-rostering-production
source_account_ids = [module.environment.account_ids.planetfm-production]
monitoring_account_sink_identifier = "arn:aws:oam:eu-west-2:${module.environment.account_ids.corporate-staff-rostering-production}:sink/c78e5972-8464-4244-949f-872b726bc563"
}

0 comments on commit 0d48405

Please sign in to comment.