PaloAltoNetworks / terraform-aws-vmseries-modules

Terraform Reusable Modules for VM-Series on AWS
https://registry.terraform.io/modules/PaloAltoNetworks/vmseries-modules/aws
MIT License
40 stars 49 forks source link

fix(examples): Change region for examples from eu-central-1 to eu-west-1 #391

Closed sebastianczech closed 1 year ago

sebastianczech commented 1 year ago

Description

During release there was an error in eu-central-1 region. Even when we specify TGW attachment with enabled appliance mode support, attachment is created with disabled value. Then while checking idempotence Terratest propose to change it into enable as it's defined in default value for appliance_mode_support:

  TestIdempotence 2023-10-12T04:43:08Z command.go:185:   # module.transit_gateway_attachment["app1"].aws_ec2_transit_gateway_vpc_attachment.this will be updated in-place
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:   ~ resource "aws_ec2_transit_gateway_vpc_attachment" "this" {
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:       ~ appliance_mode_support                          = "disable" -> "enable"
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:         id                                              = "tgw-attach-0f219e9c790aa6aee"
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:         tags                                            = {
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:             "Name" = "tt-42b8-app1-spoke-vpc"
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:         }
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:         # (9 unchanged attributes hidden)
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:     }
  TestIdempotence 2023-10-12T04:43:08Z command.go:185: 
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:   # module.transit_gateway_attachment["app2"].aws_ec2_transit_gateway_vpc_attachment.this will be updated in-place
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:   ~ resource "aws_ec2_transit_gateway_vpc_attachment" "this" {
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:       ~ appliance_mode_support                          = "disable" -> "enable"
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:         id                                              = "tgw-attach-05adc27b67c0e7698"
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:         tags                                            = {
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:             "Name" = "tt-42b8-app2-spoke-vpc"
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:         }
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:         # (9 unchanged attributes hidden)
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:     }
  TestIdempotence 2023-10-12T04:43:08Z command.go:185: 
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:   # module.transit_gateway_attachment["security"].aws_ec2_transit_gateway_vpc_attachment.this will be updated in-place
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:   ~ resource "aws_ec2_transit_gateway_vpc_attachment" "this" {
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:       ~ appliance_mode_support                          = "disable" -> "enable"
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:         id                                              = "tgw-attach-09b2a15315de25671"
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:         tags                                            = {
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:             "Name" = "tt-42b8-vmseries"
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:         }
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:         # (9 unchanged attributes hidden)
  TestIdempotence 2023-10-12T04:43:08Z command.go:185:     }

While testing the same example in different regions e.g. us-east-1 or eu-west-1 there is no issue and TGW attachment is created with enabled appliance support (as it's defined in default value for appliance_mode_support).

It seems to be a bug in eu-central-1 region, so PRs delivers change of region for examples from eu-central-1 to eu-west-1 in order to successfully created release package.

Motivation and Context

There was an issue while doing release: https://github.com/PaloAltoNetworks/terraform-aws-vmseries-modules/actions/runs/6490065707

How Has This Been Tested?

Code was tested via ChatOps (see comments in PR).

Types of changes

Checklist

sebastianczech commented 1 year ago

/help

ChatOPS built in help:

Currently supported commands include:

The 1st command does not take arguments, the remaining take two:

Examples:

# run idempotence tests on listed modules with Terraform versions: 1.2 (latest patch available), 1.4 (latest patch available), 1.5.4.
/idempotence paths="examples/combined_design examples/panorama_standalone" tf_version="1.2 1.4 1.5.4"
# run validation tests with the latest available Terraform version on listed modules.
/validate paths="modules/vmseries modules/vpc examples/combined_design"
sebastianczech commented 1 year ago

/plan paths="examples/combined_design examples/centralized_design examples/combined_design_autoscale examples/combined_design" tf_version="1.5"

Testing job ID: 6492672081 Job result: SUCCESS

sebastianczech commented 1 year ago

/idempotence paths="examples/combined_design examples/centralized_design examples/combined_design_autoscale examples/combined_design" tf_version="1.5"

Testing job ID: 6492696896 Job result: FAILURE

sebastianczech commented 1 year ago

/idempotence paths="examples/combined_design examples/centralized_design examples/combined_design_autoscale examples/combined_design examples/isolated_design examples/isolated_design_autoscale examples/panorama_standalone examples/vmseries_standalone" tf_version="1.5"

Testing job ID: 6492872684 Job result: SUCCESS