PaloAltoNetworks / terraform-aws-swfw-modules

Terraform Reusable Modules for Software Firewalls on AWS
https://registry.terraform.io/modules/PaloAltoNetworks/swfw-modules/aws
MIT License
14 stars 11 forks source link

fix(examples): Refactor examples for reference architectures #49

Closed sebastianczech closed 5 months ago

sebastianczech commented 5 months ago

Description

PR delivers for examples:

changes:

Motivation and Context

There were few motivations for this PR:

  1. issue #37
  2. internal discussion on planning meeting

As in previous year there were prepared examples for references architectures, there were done with below assumptions:

  1. internal modules should not to be rebuild during preparation of examples
  2. most of settings can be changed via modification of example.tfvars (e.g. new VPC, new subnet, additional route via TGW, IGW, NAT Gateway or GWLB endpoint etc.)
  3. minimal version of Terraform for modules and examples remains the same (Terraform 1.0, so there is no possibility to use optionals in examples)
  4. concepts used in modules (e.g. sets for subnets, NAT gateway, GWLB endpoints etc.) are not going to be changed

About the need of refactor of AWS modules we were talking multiple times, but we wanted to finish at first refactor of Azure modules - it's was finished already on April in https://github.com/PaloAltoNetworks/terraform-azurerm-swfw-modules/releases/tag/v3.0.0.

In order to define best user friendly example.tfvars (according to the Amazon Method - Working Backwards), refactor of internal modules, embedding some logic of existing modules in other modules (e.g. maybe subnet inside vpc module?) and rethink of set concept needs to be done (it's not in this PR) - this PR introduces fixes for the most painful fragments of the examples. Refactor of AWS modules will take time, this fixes can be introduced quicker.

If you still see another improvements in examples (without rebuilding internal modules):

  1. please put it as a comment and propose changes
  2. or prepare your own PR with proposition of completely new approach for examples

How Has This Been Tested?

Code was tested locally and via ChatOps.

Types of changes

Checklist

sebastianczech commented 5 months ago

/idempotence paths="examples/combined_design"

Testing job ID: 9545688800 Job result: SUCCESS

sebastianczech commented 5 months ago

/idempotence paths="examples/combined_design examples/combined_design_autoscale examples/isolated_design examples/isolated_design_autoscale"

Testing job ID: 9580464230 Job result: SUCCESS

sebastianczech commented 5 months ago

/idempotence paths="examples/centralized_design examples/centralized_design_autoscale examples/panorama_standalone examples/vmseries_standalone"

Testing job ID: 9581436136 Job result: FAILURE Job result: SUCCESS

sebastianczech commented 5 months ago

/idempotence paths="examples/vmseries_standalone"

Testing job ID: 9641433465 Job result: FAILURE Job result: SUCCESS