locals { project = "apm-wo-analysis" account_id = "011934824531" environment = "prod" hcp_project = "seahaven-prod" hcp_workspace = "apm-wo-analysis-prod" apply_role = "hcptf-apm-wo-analysis" plan_role = "hcptf-apm-wo-analysis-plan" deploy_role = "githubdeploy-apm-wo-analysis" stack_name = local.project stack_prefix = "apm-wo-analysis-" artifacts_bucket_name = "apm-wo-analysis-artifacts-${local.account_id}" exports_bucket_name = "apm-wo-analysis-exports-${local.account_id}" ssm_prefix = "/apm-wo-analysis" site_alerts_arn = "arn:aws:sns:${var.aws_region}:${local.account_id}:site-alerts" github_oidc_provider_arn = "arn:aws:iam::${local.account_id}:oidc-provider/token.actions.githubusercontent.com" # Org has Actions OIDC use_immutable_subject=true. github_oidc_sub = "repo:Sea-Haven-Industries@183236204/apm-wo-analysis@1252708919:environment:prod" glue_database = "apm_wo_analysis" glue_table = "apm_wo_snapshots" athena_workgroup = "apm-wo-analysis" pandas_layer_arn = "arn:aws:lambda:us-east-1:336392948345:layer:AWSSDKPandas-Python312-Arm64:27" secret_names = [ "apm-wo-analysis/slack-credentials", "apm-wo-analysis/anthropic-api-key", ] grafana_url_param = "${local.ssm_prefix}/grafana-base-url" grafana_dashboard_url = "https://${var.grafana_domain}/d/apm-wo/apm-work-orders?from=now-30d&to=now" grafana_config_prefix = "grafana-config" grafana_backup_tag = "apm-grafana-backup" azs = ["${var.aws_region}a", "${var.aws_region}b"] public_subnet_cidrs = { "${var.aws_region}a" = cidrsubnet(var.vpc_cidr, 8, 0) "${var.aws_region}b" = cidrsubnet(var.vpc_cidr, 8, 1) } private_subnet_cidrs = { "${var.aws_region}a" = cidrsubnet(var.vpc_cidr, 8, 10) "${var.aws_region}b" = cidrsubnet(var.vpc_cidr, 8, 11) } snapshot_columns = [ { name = "wo_number", type = "string" }, { name = "wo_description", type = "string" }, { name = "equipment_code", type = "string" }, { name = "site", type = "string" }, { name = "due_date", type = "string" }, { name = "department", type = "string" }, { name = "wo_status", type = "string" }, { name = "hold_reason", type = "string" }, { name = "last_comment", type = "string" }, { name = "last_comment_by", type = "string" }, { name = "last_comment_date", type = "string" }, { name = "contractor", type = "string" }, { name = "contractor_description", type = "string" }, { name = "category", type = "string" }, { name = "is_escalation", type = "boolean" }, { name = "is_action", type = "boolean" }, { name = "mismatch", type = "string" }, ] functions = { classifier = { function_name = "apm-wo-analysis-classifier" role_name = "apm-wo-analysis-classifier" handler = "handler.handler" timeout = 120 memory_size = 512 duration_ms = 96000 layers = [local.pandas_layer_arn] } slack_post = { function_name = "apm-wo-analysis-slack-post" role_name = "apm-wo-analysis-slack-post" handler = "handler.handler" timeout = 30 memory_size = 256 duration_ms = 24000 layers = [] } slack_interactions = { function_name = "apm-wo-analysis-slack-interactions" role_name = "apm-wo-analysis-slack-interactions" handler = "interactions.handler" timeout = 30 memory_size = 256 duration_ms = 24000 layers = [] } } }