terraform-aws-vmseries-modules
terraform-aws-vmseries-modules copied to clipboard
Terratest coverage for modules
Summary
We will create Terratest test code to cover the below modules
VM-Series
- [x] Initial Deployment
- [x] Add/remove routes after deployment
- [ ] Add/remove security group rules
- [ ] Add/remove interfaces to the firewall
- [ ] Add/remove public IP from an interface
- [ ] Change userdata parameters
- [ ] Add/remove tags
- [ ] S3 bootstrapping
Autoscaling
- [ ] Initial deployment
- [ ] Scale out/in by changing desired/max instances for auto-scaling group
- [ ] Change userdata parameters
- [ ] Add/remove tags
- [ ] Add/remove interfaces
- [ ] Add/remove public IPs
- [ ] TBD - End-to-end autoscaling testing based on vmseries published metrics
Panorama
- [x] Initial Deployment
- [ ] Add/remove interface to Panorama
- [ ] Add/remove public IP from the primary interface
- [ ] Add/remove logging disk
- [ ] Add new tags
ALB
- [x] Initial Deployment
- [ ] Add/remove listener rules
- [ ] Add/remove members in the target group
- [ ] Add/remove tags
NLB
- [x] Initial Deployment
- [ ] Add/remove listener rules
- [ ] Add/remove members in the target group
- [ ] Add/remove tags
VPC
- [x] Initial Deployment
- [ ] Brownfield use case with
create_vpc
set to false - [ ] Add/remove VPC endpoints
TGW
- [x] Initial Deployment
- [ ] Brownfield use case for using an existing TGW with
create
set to false - [ ] Add/remove TGW route tables
- [ ] Brownfield use case for using an existing TGW rtb with
create
set to false
GWLB
- [x] Initial Deployment
- [ ] Add/remove GWLB endpoints
- [ ] Brownfield use case for using an existing GWLB
Tasks:
- [x] Prepare template of test skeleton
- [x] Prepare tests for modules
- [x] alb
- [x] asg
- [x] bootstrap
- [ ] crosszone_failover
- [ ] gwlb
- [ ] gwlb_endpoint_set
- [ ] nat_gateway_set
- [ ] nlb
- [x] panorama
- [x] subnet_set
- [x] transit_gateway
- [x] transit_gateway_attachment
- [x] transit_gateway_peering
- [ ] vmseries
- [x] vpc
- [ ] vpc_endpoint
- [x] vpc_route
Proposition of next steps regarding testing VM-Series modules for AWS:
- [ ] close all open issues with label
tests
andstale
(besides this issue - #86) - [x] after merging PR 2 with samples for Terratest test skeleton:
- [x] in all Go files in folders
examples
andtests
changeimport
in order to use test skeleton for Terratest - replacegithub.com/PaloAltoNetworks/terraform-aws-vmseries-modules/go/testskeleton
bygithub.com/PaloAltoNetworks/terraform-modules-vmseries-tests-skeleton/pkg/testskeleton
- [x] remove Go files with folders from
go/testskeleton
andgo/helpers
- [x] in all Go files in folders
- [ ] in folder
tests
, which contains integrations tests for modules:- [ ] add integration tests for modules, which are working only with
terraform plan
(this kind of tests are going to be executed for PR CI) - now we don't have such tests for modules at all (only for examples we have it) - [ ] simplify existing integration tests for modules, which are deploying every module (this kind of tests are going to be executed for Release CI) - now sometimes for 1 module we have multiple tests e.g. for
vmseries
module we have tests:TestOutputForModuleVmseriesWithFullVariables
,TestOutputForModuleVmseriesWithMinimumVariables
,TestOutputForModuleVmseriesWithS3BootstrappingAndFullVariables
. In order to shorten time of testing and limits cloud costs, maybe we should have only 2 kind of tests:TestModuleNNNPlan
,TestModuleNNNDeployment
. - [ ] add tests for modules, for which currently we don't have any tests in folder
tests
e.g. for modulenlb
- [ ] add integration tests for modules, which are working only with
- [ ] extend GitHub workflows to execute modules tests from folder
tests
for PR CI (only plan) and for Release CI (with apply) - now we are not executing any Terratest from foldertests
, only from folderexamples
, which for PR CI are only checking the plan, for Release CI are deploying all examples.
After fulfilling all above steps we can start to think how to prepare E2E tests, in which we can configure VM-Series, deploy spokes VPCs and VMs and finally test traffic flows - inbound, outbound or east-west.