Prepare group 3 and 4 Osaka tests
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# This file is intentionally outside the default tests/ directory.
|
||||
# Do not run it without the required approval and an existing Marketplace
|
||||
# subscription for the selected VyOS AMI.
|
||||
|
||||
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-g34-8c2f"
|
||||
web_ami_id = "ami-0d82c759aab529d2d"
|
||||
vyos_ami_id = "ami-096d9368e5980d5fb"
|
||||
test_public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHSftYPnELJxLgR9G8ftBeCIYo57KmlEc8A8BmqAHSLP tftest-g34-8c2f"
|
||||
}
|
||||
|
||||
run "apply_network_group3_4_osaka" {
|
||||
command = apply
|
||||
|
||||
assert {
|
||||
condition = !output.vyos_source_dest_check
|
||||
error_message = "The Osaka VyOS instance must disable source/destination checking."
|
||||
}
|
||||
|
||||
assert {
|
||||
condition = length(output.vyos_route_network_interface_ids) == 5 && alltrue([
|
||||
for id in values(output.vyos_route_network_interface_ids) : id == output.vyos_primary_network_interface_id
|
||||
])
|
||||
error_message = "All five VyOS routes must target the created VyOS primary ENI."
|
||||
}
|
||||
|
||||
assert {
|
||||
condition = length(output.vyos_source_security_group_ids) == 6 && alltrue([
|
||||
for id in values(output.vyos_source_security_group_ids) : id == output.vyos_security_group_id
|
||||
])
|
||||
error_message = "All six public ingress rules must reference the created VyOS security group."
|
||||
}
|
||||
|
||||
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."
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user