Skip to content

Commit

Permalink
attempt a build
Browse files Browse the repository at this point in the history
  • Loading branch information
drewmullen committed Aug 3, 2023
1 parent c511d5b commit 9b391fe
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
1 change: 1 addition & 0 deletions examples/public_private_flow_logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ At this point, only cloud-watch logs are support, pending: https://github.com/aw
| <a name="output_private_subnets_tags_length"></a> [private\_subnets\_tags\_length](#output\_private\_subnets\_tags\_length) | Count of private subnet tags for a single az. |
| <a name="output_public_subnets"></a> [public\_subnets](#output\_public\_subnets) | Map of public subnet attributes grouped by az. |
| <a name="output_public_subnets_tags_length"></a> [public\_subnets\_tags\_length](#output\_public\_subnets\_tags\_length) | Count of public subnet tags for a single az. |
| <a name="output_vpc_attributes"></a> [vpc\_attributes](#output\_vpc\_attributes) | Output of all VPC attributes. |
<!-- END_TF_DOCS -->
5 changes: 5 additions & 0 deletions examples/public_private_flow_logs/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ output "private_subnets_tags_length" {
description = "Count of private subnet tags for a single az."
value = length(module.vpc.private_subnet_attributes_by_az["private/${data.aws_availability_zones.current.names[0]}"].tags)
}

output "vpc_attributes" {
description = "Output of all VPC attributes."
value = module.vpc.vpc_attributes
}
25 changes: 18 additions & 7 deletions tests/test.tftest.hcl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
run "validate_public_private_example_root" {
command = plan
variables {
subnets = null
az_count = null
name = null
}

variables {
subnets = null
az_count = null
name = null
}
run "plan_validate_public_private_example_root" {
command = plan

module {
source = "./examples/public_private_flow_logs"
Expand All @@ -16,3 +16,14 @@ run "validate_public_private_example_root" {
error_message = "its not drew"
}
}

run "apply_validate_public_private_example_root" {
module {
source = "./examples/public_private_flow_logs"
}

assert {
condition = module.vpc.vpc_attributes.cidr_block == "10.0.0.0/20"
error_message = "Cidr block should be \"10.0.0.0/20\""
}
}

0 comments on commit 9b391fe

Please sign in to comment.