# This file is intentionally outside the default tests/ directory. # Do not run it without confirmation of the standing B4 approval conditions. provider "aws" { region = var.region } override_resource { target = module.network_public.aws_flow_log.s3 values = { id = "fl-test-s3" } } override_resource { target = module.network_public.aws_flow_log.cloudwatch values = { id = "fl-test-cloudwatch" } } variables { region = "ap-northeast-3" name_prefix = "tftest-g3-8c2f" web_ami_id = "ami-0d82c759aab529d2d" test_public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHSftYPnELJxLgR9G8ftBeCIYo57KmlEc8A8BmqAHSLP tftest-g3-8c2f" } run "apply_network_group3_osaka" { command = apply assert { condition = length(output.vyos_route_network_interface_ids) == 5 && alltrue([ for id in values(output.vyos_route_network_interface_ids) : id == output.route_target_network_interface_id ]) error_message = "All five VyOS routes must target the created substitute network interface." } assert { condition = length(output.vyos_source_security_group_ids) == 6 && alltrue([ for id in values(output.vyos_source_security_group_ids) : id == output.vyos_source_security_group_id ]) error_message = "All six public ingress rules must reference the created substitute security group." } assert { condition = output.web_egress_policy_matches error_message = "The Osaka apply test must use the same 18 restricted egress rules as production." } assert { condition = alltrue([ for name in values(output.named_resources) : startswith(name, var.name_prefix) ]) error_message = "Every named Osaka test resource must use the dedicated prefix." } }