Fix group launch user data size before apply
Gzip the unchanged boot script and reserve 20 percent of the EC2 user-data limit. Derive and verify the queue URL so the size check runs during plan. Add real-dev mock plans, byte-for-byte decompression witnesses, Go size and Python CI guards, and a census proposal pending independent approval.
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
10 files changed,
+531
−27
docs/superpowers/notes/census-proposal-region-ha-p3b1-fixes.md+27 −0infra/modules/region-host/group.tf+32 −21infra/modules/region-host/tests/group.tftest.hcl+7 −3infra/modules/region-host/tests/group_alarms.tftest.hcl+4 −0infra/modules/region-host/tests/group_user_data.tftest.hcl+175 −0internal/provision/region_group_guards_test.go+202 −0internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-region-ha-p3b1-fixes.tsv+13 −0scripts/region_group_contract_test.py+53 −3scripts/testdata/region-group-plan/dev-boot-config.json+17 −0
diff --git a/docs/superpowers/notes/census-proposal-region-ha-p3b1-fixes.md b/docs/superpowers/notes/census-proposal-region-ha-p3b1-fixes.md| new file mode 100644 |
| index 000000000..b20071370 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-region-ha-p3b1-fixes.md |
| @@ -0,0 +1,27 @@ |
| +# Census approval: region-ha-p3b1-fixes |
| + |
| +Ruling `census-ruling-region-ha-p3b1-fixes`. The independent reviewer approves or rejects every change below, 1 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `infra/modules/region-host/group.tf` `external` | body | unchanged (1) | Gzip the unchanged group boot render, use shared plain and encoded locals, and refuse encoded payloads above 13107 bytes. Derive the queue URL from plan-known region, partition, account and queue name, then require equality with the returned queue URL before launch. Same root boot bytes and inputs; no new runtime reads or authority. | |
| +| `infra/modules/region-host/tests/group.tftest.hcl` `external` | body | unchanged (1) | Read the plain script local in boot assertions and retain the shell injection probe through the mocked partition DNS suffix, with the same queue URL bound by the launch precondition. Mock plans only; no runtime reads. | |
| +| `infra/modules/region-host/tests/group_alarms.tftest.hcl` `external` | body | unchanged (1) | Supply the real-shape group queue URL in the group alarm mock so the launch URL equality guard is exercised. Mock plans only; no runtime reads. | |
| + |
| +Envelopes re-pinned: `infra/modules/region-host`, `infra/modules/region-host/tests`. |
| + |
| +Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner. |
| + |
| +Recorded dispositions, which each change must still satisfy: |
| + |
| +- `infra/modules/region-host/group.tf` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Add opt-in pinned AMI/template ASG, group security group, validated reused/new ingress, fixed capacity and ABANDON launch hook; suspend AZRebalance, no refresh policy. Operator Terraform writes scoped queue and boot/ingress SSM parameters (stable array of ingress IPv4s) before launches; root boot snapshots these inputs. Explicit moves preserve fixed resource addresses.;rev3=census-ruling-region-ha-group-rtb;basis=The group route-table lookup finds an explicit subnet association first (aws_route_tables) and falls back to the VPC main table (association.main=true); same AWS describe reads, operator Terraform only, no root runtime read |
| +- `infra/modules/region-host/tests/group.tftest.hcl` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Add mock plans covering group shape, network/AMI checks, launch constraints, boot config/ingress parameters and default fixed absence. Test-only Terraform, no real AWS effects or root runtime reads.;rev3=census-ruling-region-ha-group-rtb;basis=Two mock runs: implicit main route table, explicit association wins; test-only Terraform |
| +- `infra/modules/region-host/tests/group_alarms.tftest.hcl` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p3a;basis=Add plan-only mock queue alarm defaults, thresholds, missing-data and regional notification assertions.;rev3=census-ruling-region-ha-p3b;basis=Mock group metric producers, alarm dimensions/windows/missing data and complete scoped SNS policy; retain fixed alarm expectations. Test-only Terraform input, no root runtime read. |
| + |
| +New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff: |
| + |
| +- new `infra/modules/region-host/tests/group_user_data.tftest.hcl:external`: reads +file:external; written legacy, accepted-legacy, frozen |
| + |
| +Seal: `526d434888d043a8b09d8fe196f6324782d6ca20d759b080f99daa528adf6a32` → `753f734e11d51c3f1d2121489154ebd2bd5cedb3d37dda8d26f798953665e548`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-region-ha-p3b1-fixes.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/infra/modules/region-host/group.tf b/infra/modules/region-host/group.tf| index a40a4efa9..71684a9a0 100644 |
| --- a/infra/modules/region-host/group.tf |
| +++ b/infra/modules/region-host/group.tf |
| @@ -29,6 +29,28 @@ locals { |
| target_group_arns = module.group_ingress[0].target_group_arns |
| public_ips = module.group_ingress[0].public_ips |
| } |
| + group_termination_queue_url = local.group_enabled ? "https://sqs.${data.aws_region.current.region}.${data.aws_partition.current[0].dns_suffix}/${data.aws_caller_identity.current.account_id}/${aws_sqs_queue.terminations.name}" : null |
| + group_init_script = local.group_enabled ? templatefile("${path.module}/group-init.sh.tftpl", { |
| + # POSIX single-quote escaping keeps even provider-computed values inert. |
| + config = { for key, value in { |
| + CARLOS_DEPLOYMENT = var.group_config.deployment |
| + CARLOS_DEPLOYMENT_BUCKET = trimprefix(var.deployment_bucket_arn, "arn:${data.aws_partition.current[0].partition}:s3:::") |
| + CARLOS_REGION = var.group_config.region |
| + CARLOS_PLACEMENT_REGION = var.group_config.placement_region |
| + AWS_REGION = data.aws_region.current.region |
| + CARLOS_POOLS = join(",", sort(tolist(var.group_config.pools))) |
| + CARLOS_BOOTSTRAP_OBJECT_KEY = "${local.group_ssm_path}/boot/bootstrap-object" |
| + CARLOS_BOOTSTRAP_HASH_KEY = "${local.group_ssm_path}/boot/bootstrap-sha256" |
| + CARLOS_INGRESS_KEY = "${local.group_ssm_path}/boot/ingress" |
| + CARLOS_GROUP_DATA_BUCKET = trimprefix(var.data_bucket_arn, "arn:${data.aws_partition.current[0].partition}:s3:::") |
| + CARLOS_GROUP_ACCOUNT = data.aws_caller_identity.current.account_id |
| + CARLOS_GROUP_NAME = var.name |
| + CARLOS_LAUNCH_HOOK_NAME = local.group_hook_name |
| + CARLOS_TERMINATION_QUEUE_URL = local.group_termination_queue_url |
| + CARLOS_RELEASE = var.group_config.release |
| + } : key => "'${replace(value, "'", "'\"'\"'")}'" } |
| + }) : null |
| + group_user_data = local.group_enabled ? base64gzip(local.group_init_script) : null |
| } |
| # A caller reusing P3a ingress passes its outputs. Only a new region owns a child. |
| @@ -195,28 +217,17 @@ resource "aws_launch_template" "group" { |
| delete_on_termination = true |
| } |
| } |
| - user_data = base64encode(templatefile("${path.module}/group-init.sh.tftpl", { |
| - # POSIX single-quote escaping keeps even provider-computed values inert. |
| - config = { for key, value in { |
| - CARLOS_DEPLOYMENT = var.group_config.deployment |
| - CARLOS_DEPLOYMENT_BUCKET = trimprefix(var.deployment_bucket_arn, "arn:${data.aws_partition.current[0].partition}:s3:::") |
| - CARLOS_REGION = var.group_config.region |
| - CARLOS_PLACEMENT_REGION = var.group_config.placement_region |
| - AWS_REGION = data.aws_region.current.region |
| - CARLOS_POOLS = join(",", sort(tolist(var.group_config.pools))) |
| - CARLOS_BOOTSTRAP_OBJECT_KEY = "${local.group_ssm_path}/boot/bootstrap-object" |
| - CARLOS_BOOTSTRAP_HASH_KEY = "${local.group_ssm_path}/boot/bootstrap-sha256" |
| - CARLOS_INGRESS_KEY = "${local.group_ssm_path}/boot/ingress" |
| - CARLOS_GROUP_DATA_BUCKET = trimprefix(var.data_bucket_arn, "arn:${data.aws_partition.current[0].partition}:s3:::") |
| - CARLOS_GROUP_ACCOUNT = data.aws_caller_identity.current.account_id |
| - CARLOS_GROUP_NAME = var.name |
| - CARLOS_LAUNCH_HOOK_NAME = local.group_hook_name |
| - CARLOS_TERMINATION_QUEUE_URL = aws_sqs_queue.terminations.id |
| - CARLOS_RELEASE = var.group_config.release |
| - } : key => "'${replace(value, "'", "'\"'\"'")}'" } |
| - })) |
| - tags = local.group_tags |
| + user_data = local.group_user_data |
| + tags = local.group_tags |
| lifecycle { |
| + precondition { |
| + condition = aws_sqs_queue.terminations.id == local.group_termination_queue_url |
| + error_message = "the group must own its termination queue and regional queue selection" |
| + } |
| + precondition { |
| + condition = length(local.group_user_data) <= floor(16384 * 0.8) |
| + error_message = "encoded user data length exceeds floor(16384 * 0.8) = 13107 bytes" |
| + } |
| precondition { |
| condition = data.aws_ami.group[0].root_device_type == "ebs" && can(regex("^/dev/[a-zA-Z0-9]+$", data.aws_ami.group[0].root_device_name)) |
| error_message = "the pinned group AMI must have an EBS root device" |
diff --git a/infra/modules/region-host/tests/group.tftest.hcl b/infra/modules/region-host/tests/group.tftest.hcl| index d8cbe0076..15533596c 100644 |
| --- a/infra/modules/region-host/tests/group.tftest.hcl |
| +++ b/infra/modules/region-host/tests/group.tftest.hcl |
| @@ -424,15 +424,19 @@ run "new_ingress_owner" { |
| run "group_boot_quotes" { |
| command = plan |
| + override_data { |
| + target = data.aws_partition.current |
| + values = { partition = "aws", dns_suffix = "amazonaws.com'$(printf injected)'" } |
| + } |
| override_resource { |
| target = aws_sqs_queue.terminations |
| values = { |
| arn = "arn:aws:sqs:eu-west-1:123456789012:carlos-dev-ie-group-terminations" |
| - id = "https://sqs.eu-west-1.amazonaws.com/123456789012/queue'$(printf injected)'" |
| + id = "https://sqs.eu-west-1.amazonaws.com'$(printf injected)'/123456789012/carlos-dev-ie-group-terminations" |
| } |
| } |
| assert { |
| - condition = strcontains(base64decode(aws_launch_template.group[0].user_data), "TASK 3") |
| + condition = strcontains(local.group_init_script, "TASK 3") |
| error_message = "the group template must reserve the boot steps for Task 3" |
| } |
| } |
| @@ -456,7 +460,7 @@ run "group_home_placement" { |
| } |
| } |
| assert { |
| - condition = strcontains(base64decode(aws_launch_template.group[0].user_data), "CARLOS_PLACEMENT_REGION=''") |
| + condition = strcontains(local.group_init_script, "CARLOS_PLACEMENT_REGION=''") |
| error_message = "group home placement must remain empty beside its canonical region" |
| } |
| } |
diff --git a/infra/modules/region-host/tests/group_alarms.tftest.hcl b/infra/modules/region-host/tests/group_alarms.tftest.hcl| index 50bea336a..d302d8339 100644 |
| --- a/infra/modules/region-host/tests/group_alarms.tftest.hcl |
| +++ b/infra/modules/region-host/tests/group_alarms.tftest.hcl |
| @@ -169,6 +169,10 @@ override_resource { |
| } |
| run "group_alarm_producers" { |
| command = plan |
| + override_resource { |
| + target = aws_sqs_queue.terminations |
| + values = { arn = "arn:aws:sqs:eu-west-1:123456789012:carlos-dev-ie-group-terminations", id = "https://sqs.eu-west-1.amazonaws.com/123456789012/carlos-dev-ie-group-terminations" } |
| + } |
| variables { |
| alerts_email = "ops@example.com" |
| termination_queue_alarm = true |
diff --git a/infra/modules/region-host/tests/group_user_data.tftest.hcl b/infra/modules/region-host/tests/group_user_data.tftest.hcl| new file mode 100644 |
| index 000000000..70861caba |
| --- /dev/null |
| +++ b/infra/modules/region-host/tests/group_user_data.tftest.hcl |
| @@ -0,0 +1,175 @@ |
| +mock_provider "aws" { |
| + mock_resource "aws_launch_template" { defaults = { id = "lt-0123456789abcdef0" } } |
| + mock_resource "aws_security_group" { defaults = { id = "sg-0123456789abcdef1" } } |
| +} |
| +override_data { |
| + target = data.aws_region.current |
| + values = { region = "eu-west-1" } |
| +} |
| +override_data { |
| + target = data.aws_partition.current |
| + values = { partition = "aws", dns_suffix = "amazonaws.com" } |
| +} |
| +override_data { |
| + target = data.aws_caller_identity.current |
| + values = { account_id = "640012953448" } |
| +} |
| +override_data { |
| + target = data.aws_vpc.host |
| + values = { cidr_block = "10.0.0.0/16", cidr_block_associations = [] } |
| +} |
| +override_data { |
| + target = data.aws_subnets.group |
| + values = { ids = ["subnet-0502e41d505e0450f", "subnet-0975dda9ac0e65347"] } |
| +} |
| +override_data { |
| + target = data.aws_route_table.group |
| + values = { routes = [{ cidr_block = "0.0.0.0/0", gateway_id = "igw-0123456789abcdef0", carrier_gateway_id = "", core_network_arn = "", destination_prefix_list_id = "", egress_only_gateway_id = "", instance_id = "", ipv6_cidr_block = "", local_gateway_id = "", nat_gateway_id = "", network_interface_id = "", odb_network_arn = "", transit_gateway_id = "", vpc_endpoint_id = "", vpc_peering_connection_id = "" }] } |
| +} |
| +override_data { |
| + target = data.aws_lb.group |
| + values = { |
| + vpc_id = "vpc-02212d67a9fca3b20" |
| + internal = false |
| + load_balancer_type = "network" |
| + ip_address_type = "ipv4" |
| + enable_cross_zone_load_balancing = true |
| + security_groups = ["sg-075e6d9267b33ecad"] |
| + subnet_mapping = [ |
| + { subnet_id = "subnet-0502e41d505e0450f", allocation_id = "eipalloc-08e89e7941e0a208f", ipv6_address = "", outpost_id = "", private_ipv4_address = "" }, |
| + { subnet_id = "subnet-0975dda9ac0e65347", allocation_id = "eipalloc-0ed8f1f952b0fd2d2", ipv6_address = "", outpost_id = "", private_ipv4_address = "" } |
| + ] |
| + } |
| +} |
| +override_data { |
| + target = data.aws_lb_target_group.group_http |
| + values = { vpc_id = "vpc-02212d67a9fca3b20", port = 80, protocol = "TCP", target_type = "instance", load_balancer_arns = ["arn:aws:elasticloadbalancing:eu-west-1:640012953448:loadbalancer/net/carlos-dev-ie-nlb/45da5de177dd7c19"], preserve_client_ip = "true" } |
| +} |
| +override_data { |
| + target = data.aws_lb_target_group.group_https |
| + values = { vpc_id = "vpc-02212d67a9fca3b20", port = 443, protocol = "TCP", target_type = "instance", load_balancer_arns = ["arn:aws:elasticloadbalancing:eu-west-1:640012953448:loadbalancer/net/carlos-dev-ie-nlb/45da5de177dd7c19"], preserve_client_ip = "true" } |
| +} |
| +override_data { |
| + target = data.aws_eip.group["eu-west-1a"] |
| + values = { public_ip = "54.77.110.223" } |
| +} |
| +override_data { |
| + target = data.aws_eip.group["eu-west-1c"] |
| + values = { public_ip = "18.203.21.74" } |
| +} |
| +override_resource { |
| + target = aws_sqs_queue.terminations |
| + values = { arn = "arn:aws:sqs:eu-west-1:640012953448:carlos-dev-ie-group-terminations", id = "https://sqs.eu-west-1.amazonaws.com/640012953448/carlos-dev-ie-group-terminations" } |
| +} |
| +override_resource { |
| + target = aws_cloudwatch_event_rule.terminations |
| + values = { arn = "arn:aws:events:eu-west-1:640012953448:rule/carlos-dev-ie-group-terminations" } |
| +} |
| +override_resource { |
| + target = aws_iam_role.host |
| + values = { id = "carlos-dev-ie-group", arn = "arn:aws:iam::640012953448:role/carlos-dev-ie-group" } |
| +} |
| +override_resource { |
| + target = aws_sns_topic.alerts |
| + values = { arn = "arn:aws:sns:eu-west-1:640012953448:carlos-dev-ie-group-alerts" } |
| +} |
| +override_data { |
| + target = data.aws_ami.group |
| + values = { id = "ami-020434b3e0470d552", root_device_name = "/dev/xvda", root_device_type = "ebs" } |
| +} |
| +variables { |
| + mode = "group" |
| + box_count = 2 |
| + name = "carlos-dev-ie-group" |
| + sg_description = "carlos dev IE group (P3b-1, disposable)" |
| + iam_name = "carlos-dev-ie-group" |
| + instance_type = "t4g.micro" |
| + root_volume_size = 20 |
| + user_data = "" |
| + ssm_parameter_arn = "" |
| + vpc_id = "vpc-02212d67a9fca3b20" |
| + deployment_bucket_arn = "arn:aws:s3:::carlos-dev-640012953448" |
| + data_bucket_arn = "arn:aws:s3:::carlos-dev-ie-640012953448" |
| + alerts_email = "paul@rslw.com" |
| + group_config = { |
| + deployment = "dev" |
| + region = "ie" |
| + placement_region = "" |
| + pools = ["hapair"] |
| + ami_id = "ami-020434b3e0470d552" |
| + release = "v0.34.2" |
| + configuration_kms_key_arn = "arn:aws:kms:eu-west-1:640012953448:key/67c17304-3f76-4ad6-94a1-5b6e174c73cd" |
| + } |
| + group_zones = { |
| + "eu-west-1a" = { subnet_id = "subnet-0502e41d505e0450f", allocation_id = "eipalloc-08e89e7941e0a208f" } |
| + "eu-west-1c" = { subnet_id = "subnet-0975dda9ac0e65347", allocation_id = "eipalloc-0ed8f1f952b0fd2d2" } |
| + } |
| + group_ingress = { |
| + nlb_arn = "arn:aws:elasticloadbalancing:eu-west-1:640012953448:loadbalancer/net/carlos-dev-ie-nlb/45da5de177dd7c19" |
| + nlb_security_group_id = "sg-075e6d9267b33ecad" |
| + target_group_arns = { |
| + "80" = "arn:aws:elasticloadbalancing:eu-west-1:640012953448:targetgroup/carlos-dev-ie-nlb-80/2f5186277337ce74" |
| + "443" = "arn:aws:elasticloadbalancing:eu-west-1:640012953448:targetgroup/carlos-dev-ie-nlb-443/c33262405df2e5df" |
| + } |
| + public_ips = { "eu-west-1a" = "54.77.110.223", "eu-west-1c" = "18.203.21.74" } |
| + } |
| +} |
| + |
| +run "real_dev_user_data" { |
| + command = plan |
| + assert { |
| + condition = length(aws_launch_template.group[0].user_data) <= 13107 |
| + error_message = "the encoded group user data must stay within 13107 characters" |
| + } |
| + assert { |
| + condition = aws_launch_template.group[0].user_data == base64gzip(templatefile("${path.module}/group-init.sh.tftpl", { |
| + config = { for key, value in { |
| + CARLOS_DEPLOYMENT = var.group_config.deployment |
| + CARLOS_DEPLOYMENT_BUCKET = trimprefix(var.deployment_bucket_arn, "arn:${data.aws_partition.current[0].partition}:s3:::") |
| + CARLOS_REGION = var.group_config.region |
| + CARLOS_PLACEMENT_REGION = var.group_config.placement_region |
| + AWS_REGION = data.aws_region.current.region |
| + CARLOS_POOLS = join(",", sort(tolist(var.group_config.pools))) |
| + CARLOS_BOOTSTRAP_OBJECT_KEY = "${local.group_ssm_path}/boot/bootstrap-object" |
| + CARLOS_BOOTSTRAP_HASH_KEY = "${local.group_ssm_path}/boot/bootstrap-sha256" |
| + CARLOS_INGRESS_KEY = "${local.group_ssm_path}/boot/ingress" |
| + CARLOS_GROUP_DATA_BUCKET = trimprefix(var.data_bucket_arn, "arn:${data.aws_partition.current[0].partition}:s3:::") |
| + CARLOS_GROUP_ACCOUNT = data.aws_caller_identity.current.account_id |
| + CARLOS_GROUP_NAME = var.name |
| + CARLOS_LAUNCH_HOOK_NAME = local.group_hook_name |
| + CARLOS_TERMINATION_QUEUE_URL = aws_sqs_queue.terminations.id |
| + CARLOS_RELEASE = var.group_config.release |
| + } : key => "'${replace(value, "'", "'\"'\"'")}'" } |
| + })) |
| + error_message = "the launch template user data must be the gzip of the rendered group init template" |
| + } |
| + assert { |
| + condition = local.group_user_data == base64gzip(local.group_init_script) |
| + error_message = "the group user data must be the gzip of the plain group init script" |
| + } |
| +} |
| + |
| +run "oversize_user_data" { |
| + command = plan |
| + variables { |
| + group_config = { |
| + deployment = "dev" |
| + region = "ie" |
| + placement_region = "" |
| + pools = ["hapair"] |
| + ami_id = "ami-020434b3e0470d552" |
| + release = "v0.34.2-${join("", [for index in range(1024) : sha256(tostring(index))])}" |
| + configuration_kms_key_arn = "arn:aws:kms:eu-west-1:640012953448:key/67c17304-3f76-4ad6-94a1-5b6e174c73cd" |
| + } |
| + } |
| + expect_failures = [aws_launch_template.group] |
| +} |
| + |
| +run "queue_url_mismatch" { |
| + command = plan |
| + override_resource { |
| + target = aws_sqs_queue.terminations |
| + values = { arn = "arn:aws:sqs:eu-west-1:640012953448:carlos-dev-ie-group-terminations", id = "https://sqs.eu-west-1.amazonaws.com/640012953448/another-queue" } |
| + } |
| + expect_failures = [aws_launch_template.group] |
| +} |
diff --git a/internal/provision/region_group_guards_test.go b/internal/provision/region_group_guards_test.go| new file mode 100644 |
| index 000000000..bf1e8b634 |
| --- /dev/null |
| +++ b/internal/provision/region_group_guards_test.go |
| @@ -0,0 +1,202 @@ |
| +package provision |
| + |
| +import ( |
| + "bytes" |
| + "compress/gzip" |
| + "encoding/base64" |
| + "encoding/json" |
| + "io" |
| + "os" |
| + "os/exec" |
| + "path/filepath" |
| + "regexp" |
| + "slices" |
| + "strings" |
| + "testing" |
| +) |
| + |
| +func groupGuardFile(t *testing.T, name string) []byte { |
| + t.Helper() |
| + b, err := os.ReadFile(filepath.Join("../..", name)) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + return b |
| +} |
| + |
| +func groupDevConfig(t *testing.T) map[string]string { |
| + t.Helper() |
| + var config map[string]string |
| + if err := json.Unmarshal(groupGuardFile(t, "scripts/testdata/region-group-plan/dev-boot-config.json"), &config); err != nil { |
| + t.Fatal(err) |
| + } |
| + return config |
| +} |
| + |
| +// This renderer implements the template's one sorted map loop, whitespace |
| +// trimming and escaped interpolation. Refuse new template syntax instead of |
| +// estimating it. The offline OpenTofu witness below compares every byte. |
| +func renderGroupScript(t *testing.T, config map[string]string) []byte { |
| + t.Helper() |
| + template := string(groupGuardFile(t, "infra/modules/region-host/group-init.sh.tftpl")) |
| + loop := "%{ for key, value in config ~}\n${key}=${value}\nexport ${key}\n%{ endfor ~}\n" |
| + if strings.Count(template, loop) != 1 { |
| + t.Fatal("group template loop changed; update the renderer and OpenTofu witness") |
| + } |
| + var keys []string |
| + for key := range config { |
| + keys = append(keys, key) |
| + } |
| + slices.Sort(keys) |
| + var assignments strings.Builder |
| + for _, key := range keys { |
| + assignments.WriteString(key + "='" + strings.ReplaceAll(config[key], "'", "'\"'\"'") + "'\nexport " + key + "\n") |
| + } |
| + rest := strings.Replace(template, loop, "", 1) |
| + rest = strings.ReplaceAll(strings.ReplaceAll(rest, "$${", ""), "%%{", "") |
| + if strings.Contains(rest, "${") || strings.Contains(rest, "%{") { |
| + t.Fatal("unhandled group template syntax") |
| + } |
| + rendered := strings.Replace(template, loop, assignments.String(), 1) |
| + return []byte(strings.ReplaceAll(strings.ReplaceAll(rendered, "$${", "${"), "%%{", "%{")) |
| +} |
| + |
| +// OpenTofu uses gzip.NewWriter, Write, Flush, Close, then standard base64. |
| +// Compressor revisions can change the encoded bytes; both sizes are checked. |
| +func encodeGroupScript(t *testing.T, script []byte) string { |
| + t.Helper() |
| + var compressed bytes.Buffer |
| + writer := gzip.NewWriter(&compressed) |
| + if _, err := writer.Write(script); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := writer.Flush(); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := writer.Close(); err != nil { |
| + t.Fatal(err) |
| + } |
| + return base64.StdEncoding.EncodeToString(compressed.Bytes()) |
| +} |
| + |
| +func TestRegionGroupUserDataSize(t *testing.T) { |
| + script := renderGroupScript(t, groupDevConfig(t)) |
| + encoded := encodeGroupScript(t, script) |
| + t.Logf("dev user data: plain=%d old base64=%d gzip+base64=%d limit=13107", len(script), base64.StdEncoding.EncodedLen(len(script)), len(encoded)) |
| + if len(encoded) > 13107 { |
| + t.Fatalf("group user data is %d bytes; limit 13107 (80%% of 16384)", len(encoded)) |
| + } |
| + module := string(groupGuardFile(t, "infra/modules/region-host/group.tf")) |
| + config := groupDevConfig(t) |
| + configBlock := strings.Split(strings.Split(module, "config = { for key, value in {")[1], "} : key =>")[0] |
| + declared := regexp.MustCompile(`(?m)^\s*([A-Z_]+)\s*=`).FindAllStringSubmatch(configBlock, -1) |
| + if len(declared) != len(config) { |
| + t.Fatal("dev fixture config keys differ from the module") |
| + } |
| + for _, match := range declared { |
| + if _, ok := config[match[1]]; !ok { |
| + t.Fatalf("dev fixture missing %s", match[1]) |
| + } |
| + } |
| + for _, pattern := range []string{ |
| + `group_user_data\s*=\s*local.group_enabled \? base64gzip\(local.group_init_script\) : null`, |
| + `user_data\s*=\s*local.group_user_data`, |
| + `condition\s*=\s*length\(local.group_user_data\) <= floor\(16384 \* 0.8\)`, |
| + } { |
| + if !regexp.MustCompile(pattern).MatchString(module) { |
| + t.Fatalf("group encoding or plan guard changed: %s", pattern) |
| + } |
| + } |
| +} |
| + |
| +func groupGuardBinary(t *testing.T, name string) string { |
| + t.Helper() |
| + binary, err := exec.LookPath(name) |
| + if err == nil { |
| + return binary |
| + } |
| + if os.Getenv("CI") != "" || os.Getenv("AMADAN_CI") != "" { |
| + t.Fatalf("%s is required in CI: %v", name, err) |
| + } |
| + t.Skipf("%s is not installed: %v", name, err) |
| + return "" |
| +} |
| + |
| +func TestRegionGroupUserDataOpenTofu(t *testing.T) { |
| + tofu := groupGuardBinary(t, "tofu") |
| + config := groupDevConfig(t) |
| + for key, value := range config { |
| + config[key] = "'" + strings.ReplaceAll(value, "'", "'\"'\"'") + "'" |
| + } |
| + values, err := json.Marshal(config) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + template, err := filepath.Abs("../../infra/modules/region-host/group-init.sh.tftpl") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + templateJSON, _ := json.Marshal(template) |
| + module := string(groupGuardFile(t, "infra/modules/region-host/group.tf")) |
| + expression := regexp.MustCompile(`(?m)^\s*group_user_data\s*=([^\n]+)`).FindStringSubmatch(module) |
| + if len(expression) != 2 { |
| + t.Fatal("missing module user-data expression") |
| + } |
| + root := "locals {\n group_enabled = true\n group_init_script = templatefile(" + string(templateJSON) + ", { config = " + string(values) + " })\n group_user_data = " + expression[1] + "\n}\n" |
| + dir := t.TempDir() |
| + if err := os.WriteFile(filepath.Join(dir, "main.tf"), []byte(root), 0600); err != nil { |
| + t.Fatal(err) |
| + } |
| + cmd := exec.Command(tofu, "console", "-no-color") |
| + cmd.Dir = dir |
| + cmd.Stdin = strings.NewReader("jsonencode({plain=local.group_init_script,encoded=local.group_user_data})\n") |
| + output, err := cmd.CombinedOutput() |
| + if err != nil { |
| + t.Fatalf("offline OpenTofu witness: %v\n%s", err, output) |
| + } |
| + var unquoted string |
| + if err := json.Unmarshal(output, &unquoted); err != nil { |
| + t.Fatalf("%v: %s", err, output) |
| + } |
| + var result struct { |
| + Plain string |
| + Encoded string |
| + } |
| + if err := json.Unmarshal([]byte(unquoted), &result); err != nil { |
| + t.Fatal(err) |
| + } |
| + compressed, err := base64.StdEncoding.DecodeString(result.Encoded) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + reader, err := gzip.NewReader(bytes.NewReader(compressed)) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + decoded, err := io.ReadAll(reader) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := reader.Close(); err != nil { |
| + t.Fatal(err) |
| + } |
| + plain := renderGroupScript(t, groupDevConfig(t)) |
| + if !bytes.Equal(decoded, []byte(result.Plain)) || !bytes.Equal(decoded, plain) { |
| + t.Fatal("OpenTofu gzip payload differs from the plain template render") |
| + } |
| + t.Logf("OpenTofu encoded size=%d; Go encoded size=%d", len(result.Encoded), len(encodeGroupScript(t, plain))) |
| + if len(result.Encoded) > 13107 { |
| + t.Fatalf("OpenTofu encoded user data exceeds 13107 bytes: %d", len(result.Encoded)) |
| + } |
| +} |
| + |
| +func TestRegionGroupPythonGuards(t *testing.T) { |
| + python := groupGuardBinary(t, "python3") |
| + cmd := exec.Command(python, "-B", "-m", "unittest", "-v", "scripts.check_region_group_plan_test", "scripts.region_group_contract_test") |
| + cmd.Dir = "../.." |
| + output, err := cmd.CombinedOutput() |
| + if err != nil { |
| + t.Fatalf("region group Python guards: %v\n%s", err, output) |
| + } |
| + t.Logf("%s", output) |
| +} |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index d9cc40bbc..08f1e3498 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -87,3 +87,4 @@ plan14-root-reads-stateless-replicas-3.tsv 703d9a189185e2075ec088bf9349e58132573 |
| plan14-root-reads-region-ha-p3b.tsv face84b4c688cd3c179b0a34ced4d3521e71de8e63cbd45f21c27972c5b1a921 |
| plan14-root-reads-stateless-coordinator-oneboxfleet.tsv face84b4c688cd3c179b0a34ced4d3521e71de8e63cbd45f21c27972c5b1a921 |
| plan14-root-reads-region-ha-group-rtb.tsv 526d434888d043a8b09d8fe196f6324782d6ca20d759b080f99daa528adf6a32 |
| +plan14-root-reads-region-ha-p3b1-fixes.tsv 753f734e11d51c3f1d2121489154ebd2bd5cedb3d37dda8d26f798953665e548 |
diff --git a/internal/provision/testdata/plan14-root-reads-region-ha-p3b1-fixes.tsv b/internal/provision/testdata/plan14-root-reads-region-ha-p3b1-fixes.tsv| new file mode 100644 |
| index 000000000..286cb4f7c |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-region-ha-p3b1-fixes.tsv |
| @@ -0,0 +1,13 @@ |
| +# Census overlay region-ha-p3b1-fixes, written by census-propose (#369). census-ruling-region-ha-p3b1-fixes, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-region-ha-p3b1-fixes.md. |
| +# 3 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy 624bced8dc523030ba899c4b29f0828973de87776d441b16f220ee485591f70e infra/modules/region-host/group.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Add opt-in pinned AMI/template ASG, group security group, validated reused/new ingress, fixed capacity and ABANDON launch hook; suspend AZRebalance, no refresh policy. Operator Terraform writes scoped queue and boot/ingress SSM parameters (stable array of ingress IPv4s) before launches; root boot snapshots these inputs. Explicit moves preserve fixed resource addresses.;rev3=census-ruling-region-ha-group-rtb;basis=The group route-table lookup finds an explicit subnet association first (aws_route_tables) and falls back to the VPC main table (association.main=true); same AWS describe reads, operator Terraform only, no root runtime read;rev3=census-ruling-region-ha-p3b1-fixes;basis=Gzip the unchanged group boot render, use shared plain and encoded locals, and refuse encoded payloads above 13107 bytes. Derive the queue URL from plan-known region, partition, account and queue name, then require equality with the returned queue URL before launch. Same root boot bytes and inputs; no new runtime reads or authority. file:external@0 b94284337382ad4c94e2775998a4b6e62853ea894242906e78c6914b23918cb9 |
| +@legacy 27612db189486436e3946168de5953f47e46a30e574e51aa9af60847715ae737 infra/modules/region-host/tests/group.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Add mock plans covering group shape, network/AMI checks, launch constraints, boot config/ingress parameters and default fixed absence. Test-only Terraform, no real AWS effects or root runtime reads.;rev3=census-ruling-region-ha-group-rtb;basis=Two mock runs: implicit main route table, explicit association wins; test-only Terraform;rev3=census-ruling-region-ha-p3b1-fixes;basis=Read the plain script local in boot assertions and retain the shell injection probe through the mocked partition DNS suffix, with the same queue URL bound by the launch precondition. Mock plans only; no runtime reads. file:external@0 06edbbe1f0b14f7ea8b531beac3da79b85fcae40f8d7ebbc91c5402d2605f7d7 |
| +@legacy 2d4379d97336420b3a26a84cb0c6ecfc30ee822025e946ef8e1e7f51e766b7e0 infra/modules/region-host/tests/group_alarms.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3a;basis=Add plan-only mock queue alarm defaults, thresholds, missing-data and regional notification assertions.;rev3=census-ruling-region-ha-p3b;basis=Mock group metric producers, alarm dimensions/windows/missing data and complete scoped SNS policy; retain fixed alarm expectations. Test-only Terraform input, no root runtime read.;rev3=census-ruling-region-ha-p3b1-fixes;basis=Supply the real-shape group queue URL in the group alarm mock so the launch URL equality guard is exercised. Mock plans only; no runtime reads. file:external@0 9e9fb877ee04f8ddae2b03eaac13f4da470439e4d6fa64888e9c1928931b2299 |
| +@legacy 179958636f522721ad16694de6d2d3f6572f054056da3cbb76a1a5e62d1b4d10 infra/modules/region-host/tests/group_user_data.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b1-fixes;basis=Add mock plans with the saved real dev inputs, exact gzip/templatefile equality and 13107-byte limit, plus an existing release input inflated to prove the launch precondition refuses oversize data. Test-only Terraform; no runtime reads. file:external@0 9cac548524056a417fe558b3022845b44148a6439cd627b84758858936ea2952 |
| +infra/modules/region-host/group.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Add opt-in pinned AMI/template ASG, group security group, validated reused/new ingress, fixed capacity and ABANDON launch hook; suspend AZRebalance, no refresh policy. Operator Terraform writes scoped queue and boot/ingress SSM parameters (stable array of ingress IPv4s) before launches; root boot snapshots these inputs. Explicit moves preserve fixed resource addresses.;rev3=census-ruling-region-ha-group-rtb;basis=The group route-table lookup finds an explicit subnet association first (aws_route_tables) and falls back to the VPC main table (association.main=true); same AWS describe reads, operator Terraform only, no root runtime read;rev3=census-ruling-region-ha-p3b1-fixes;basis=Gzip the unchanged group boot render, use shared plain and encoded locals, and refuse encoded payloads above 13107 bytes. Derive the queue URL from plan-known region, partition, account and queue name, then require equality with the returned queue URL before launch. Same root boot bytes and inputs; no new runtime reads or authority. file:external@0 b94284337382ad4c94e2775998a4b6e62853ea894242906e78c6914b23918cb9 |
| +infra/modules/region-host/tests/group.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Add mock plans covering group shape, network/AMI checks, launch constraints, boot config/ingress parameters and default fixed absence. Test-only Terraform, no real AWS effects or root runtime reads.;rev3=census-ruling-region-ha-group-rtb;basis=Two mock runs: implicit main route table, explicit association wins; test-only Terraform;rev3=census-ruling-region-ha-p3b1-fixes;basis=Read the plain script local in boot assertions and retain the shell injection probe through the mocked partition DNS suffix, with the same queue URL bound by the launch precondition. Mock plans only; no runtime reads. file:external@0 06edbbe1f0b14f7ea8b531beac3da79b85fcae40f8d7ebbc91c5402d2605f7d7 |
| +infra/modules/region-host/tests/group_alarms.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3a;basis=Add plan-only mock queue alarm defaults, thresholds, missing-data and regional notification assertions.;rev3=census-ruling-region-ha-p3b;basis=Mock group metric producers, alarm dimensions/windows/missing data and complete scoped SNS policy; retain fixed alarm expectations. Test-only Terraform input, no root runtime read.;rev3=census-ruling-region-ha-p3b1-fixes;basis=Supply the real-shape group queue URL in the group alarm mock so the launch URL equality guard is exercised. Mock plans only; no runtime reads. file:external@0 9e9fb877ee04f8ddae2b03eaac13f4da470439e4d6fa64888e9c1928931b2299 |
| +infra/modules/region-host/tests/group_user_data.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b1-fixes;basis=Add mock plans with the saved real dev inputs, exact gzip/templatefile equality and 13107-byte limit, plus an existing release input inflated to prove the launch precondition refuses oversize data. Test-only Terraform; no runtime reads. file:external@0 9cac548524056a417fe558b3022845b44148a6439cd627b84758858936ea2952 |
| +@coverage infra/modules/region-host e9a09976054d449e6a83e0e5643ec200a41505ea37c501ed5874d0cb9d968141 |
| +@coverage infra/modules/region-host/tests 9da05156166fe86283998817356a706d8ccda973fab327cd3b242eb0e488bf44 |
diff --git a/scripts/region_group_contract_test.py b/scripts/region_group_contract_test.py| index 7e14af4c1..4b4a6afdc 100644 |
| --- a/scripts/region_group_contract_test.py |
| +++ b/scripts/region_group_contract_test.py |
| @@ -6,11 +6,13 @@ Task 2 base commit using fixed_state_unchanged, with the same mock region. |
| import ast |
| import re |
| import base64 |
| +import gzip |
| import fnmatch |
| import json |
| from pathlib import Path |
| import subprocess |
| import sys |
| +import unittest |
| def seq(value): |
| @@ -213,7 +215,7 @@ def audit_group(plan, dns): |
| assert allowed(statements, 'route53:ChangeResourceRecordSets', 'arn:aws:route53:::hostedzone/ZTESTDNS', ctx) |
| assert not allowed(statements, 'route53:ChangeResourceRecordSets', 'arn:aws:route53:::hostedzone/ZFOREIGN', ctx) |
| assert not allowed(statements, 'route53:ChangeResourceRecordSets', 'arn:aws:route53:::hostedzone/ZTESTDNS', dict(ctx, **{'route53:ChangeResourceRecordSetsRecordTypes': ['A']})) |
| - script = base64.b64decode(resources['aws_launch_template.group[0]']['user_data']).decode() |
| + script = gzip.decompress(base64.b64decode(resources['aws_launch_template.group[0]']['user_data'])).decode() |
| subprocess.run(['sh', '-n'], input=script, text=True, check=True) |
| for label, block in re.findall(r"python3 - <<'(PY[A-Z]*)'\n(.*?)\n\1", script, re.S): |
| ast.parse(block) |
| @@ -238,9 +240,23 @@ def main(path): |
| assert actual == expected, 'fixed resource attributes changed from Task 2 base' |
| print('fixed_state_unchanged: every managed resource attribute matches the original plan') |
| seen.add(run) |
| + elif run == 'real_dev_user_data': |
| + resources = {r['address']: r['values'] for r in plan['planned_values']['root_module']['resources']} |
| + encoded = resources['aws_launch_template.group[0]']['user_data'] |
| + config = json.loads((Path(__file__).parent / 'testdata/region-group-plan/dev-boot-config.json').read_text()) |
| + template = (Path(__file__).parents[1] / 'infra/modules/region-host/group-init.sh.tftpl').read_text() |
| + loop = '%{ for key, value in config ~}\n${key}=${value}\nexport ${key}\n%{ endfor ~}\n' |
| + assert template.count(loop) == 1 |
| + assignments = ''.join(key + "='" + value.replace("'", "'\"'\"'") + "'\nexport " + key + "\n" |
| + for key, value in sorted(config.items())) |
| + plain = template.replace(loop, assignments).replace('$${', '${').replace('%%{', '%{').encode() |
| + assert gzip.decompress(base64.b64decode(encoded)) == plain |
| + assert len(encoded) <= 13107 |
| + print(f'real dev user data: plain={len(plain)}, old base64={len(base64.b64encode(plain))}, gzip+base64={len(encoded)}; exact bytes match') |
| + seen.add(run) |
| elif run == 'group_boot_quotes': |
| resources = {r['address']: r['values'] for r in plan['planned_values']['root_module']['resources']} |
| - script = base64.b64decode(resources['aws_launch_template.group[0]']['user_data']).decode() |
| + script = gzip.decompress(base64.b64decode(resources['aws_launch_template.group[0]']['user_data'])).decode() |
| script = script.split('# TASK 3:', 1)[0] + '\nprintf \'%s\' "$CARLOS_TERMINATION_QUEUE_URL"' |
| result = subprocess.run(['sh'], input=script, text=True, capture_output=True, check=True) |
| assert result.stdout == resources['aws_sqs_queue.terminations']['id'], result.stdout |
| @@ -249,7 +265,41 @@ def main(path): |
| elif run in {'group_iam_exact_scope', 'group_dns_duties_enabled'}: |
| audit_group(plan, run == 'group_dns_duties_enabled') |
| seen.add(run) |
| - assert seen == {'fixed_state_unchanged', 'group_iam_exact_scope', 'group_dns_duties_enabled', 'group_boot_quotes'}, seen |
| + assert seen == {'fixed_state_unchanged', 'group_iam_exact_scope', 'group_dns_duties_enabled', 'group_boot_quotes', 'real_dev_user_data'}, seen |
| + |
| + |
| +class ContractTests(unittest.TestCase): |
| + def test_ssm_core_inheritance_and_explicit_deny(self): |
| + resource = 'arn:aws:ssm:eu-west-1:123456789012:parameter/carlos/release-key' |
| + statements = [{'Effect': 'Allow', 'Action': sorted(SSM_CORE), 'Resource': '*'}] |
| + self.assertTrue(allowed(statements, 'ssm:GetParameter', resource)) |
| + statements.append({'Effect': 'Deny', 'Action': 'ssm:GetParameter*', 'Resource': resource}) |
| + self.assertFalse(allowed(statements, 'ssm:GetParameter', resource)) |
| + |
| + def test_conditioned_deny_and_notresource(self): |
| + statements = [ |
| + {'Effect': 'Allow', 'Action': 'ssm:GetParameter', 'Resource': '*'}, |
| + {'Effect': 'Deny', 'Action': 'ssm:GetParameter', |
| + 'NotResource': ['regional', 'shared']}, |
| + ] |
| + self.assertTrue(allowed(statements, 'ssm:GetParameter', 'regional')) |
| + self.assertFalse(allowed(statements, 'ssm:GetParameter', 'foreign')) |
| + statements = [{'Effect': 'Allow', 'Action': 'kms:Decrypt', 'Resource': 'key', |
| + 'Condition': {'StringEquals': {'kms:ViaService': 'ssm.eu-west-1.amazonaws.com'}}}] |
| + self.assertFalse(allowed(statements, 'kms:Decrypt', 'key')) |
| + self.assertTrue(allowed(statements, 'kms:Decrypt', 'key', |
| + {'kms:ViaService': 'ssm.eu-west-1.amazonaws.com'})) |
| + |
| + def test_boot_template_syntax(self): |
| + template = (Path(__file__).parents[1] / 'infra/modules/region-host/group-init.sh.tftpl').read_text() |
| + script = re.sub(r'%\{ for key, value in config ~}.*?%\{ endfor ~}\n', '', template, flags=re.S) |
| + script = script.replace('$${', '${') |
| + subprocess.run(['sh', '-n'], input=script, text=True, check=True) |
| + blocks = re.findall(r"python3 - <<'(PY[A-Z]*)'\n(.*?)\n\1", script, re.S) |
| + self.assertTrue(blocks) |
| + for label, block in blocks: |
| + with self.subTest(label=label): |
| + ast.parse(block) |
| if __name__ == '__main__': |
diff --git a/scripts/testdata/region-group-plan/dev-boot-config.json b/scripts/testdata/region-group-plan/dev-boot-config.json| new file mode 100644 |
| index 000000000..1f445d4a9 |
| --- /dev/null |
| +++ b/scripts/testdata/region-group-plan/dev-boot-config.json |
| @@ -0,0 +1,17 @@ |
| +{ |
| + "AWS_REGION": "eu-west-1", |
| + "CARLOS_BOOTSTRAP_HASH_KEY": "/carlos/dev/ie/boot/bootstrap-sha256", |
| + "CARLOS_BOOTSTRAP_OBJECT_KEY": "/carlos/dev/ie/boot/bootstrap-object", |
| + "CARLOS_DEPLOYMENT": "dev", |
| + "CARLOS_DEPLOYMENT_BUCKET": "carlos-dev-640012953448", |
| + "CARLOS_GROUP_ACCOUNT": "640012953448", |
| + "CARLOS_GROUP_DATA_BUCKET": "carlos-dev-ie-640012953448", |
| + "CARLOS_GROUP_NAME": "carlos-dev-ie-group", |
| + "CARLOS_INGRESS_KEY": "/carlos/dev/ie/boot/ingress", |
| + "CARLOS_LAUNCH_HOOK_NAME": "carlos-initial-launch", |
| + "CARLOS_PLACEMENT_REGION": "", |
| + "CARLOS_POOLS": "hapair", |
| + "CARLOS_REGION": "ie", |
| + "CARLOS_RELEASE": "v0.34.2", |
| + "CARLOS_TERMINATION_QUEUE_URL": "https://sqs.eu-west-1.amazonaws.com/640012953448/carlos-dev-ie-group-terminations" |
| +} |