Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: Rename from vmseries to swfw #17

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @PaloAltoNetworks/azure-vmseries-modules-codeowners @PaloAltoNetworks/aws-vmseries-modules-codeowners @PaloAltoNetworks/gcp-vmseries-modules-codeowners
* @PaloAltoNetworks/azure-swfw-modules-codeowners @PaloAltoNetworks/aws-swfw-modules-codeowners @PaloAltoNetworks/gcp-swfw-modules-codeowners
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Bug Report
description: Create an issue to help us improve
title: '[Bug Report] <Short title of the bug>'
assignees: aws-vmseries-modules-codeowners
title: "[Bug Report] <Short title of the bug>"
assignees: aws-swfw-modules-codeowners
body:
- type: textarea
attributes:
Expand All @@ -12,7 +12,7 @@ body:
- type: input
attributes:
label: Test skeleton version
description: What is the test skeleton version in use (https://github.com/PaloAltoNetworks/terraform-modules-vmseries-tests-skeleton/releases)? Please include the commit hash if you're using an unreleased version.
description: What is the test skeleton version in use (https://github.com/PaloAltoNetworks/terraform-modules-swfw-tests-skeleton/releases)? Please include the commit hash if you're using an unreleased version.
placeholder: eg. v0.1.2
validations:
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Feature request
description: Suggest an idea for this project
# title: '[Enhancement] <Title>'
labels: enhancement
assignees: aws-vmseries-modules-codeowners
assignees: aws-swfw-modules-codeowners
body:
- type: textarea
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_pr_title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ on:
jobs:
lint_pr_title:
name: Lint PR
uses: PaloAltoNetworks/terraform-modules-vmseries-ci-workflows/.github/workflows/[email protected]
uses: PaloAltoNetworks/terraform-modules-swfw-ci-workflows/.github/workflows/[email protected]
if: github.actor != 'dependabot[bot]'
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
[
"@semantic-release/github",
{
"successComment": ":tada: This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:\n\nThe release is available on [Terraform Registry](https://registry.terraform.io/modules/PaloAltoNetworks/vmseries-modules/aws/latest) and [GitHub release](../releases/tag/v${nextRelease.version})\n\n> Posted by [semantic-release](https://github.com/semantic-release/semantic-release) bot"
"successComment": ":tada: This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:\n\nThe release is available on [GitHub release](../releases/tag/v${nextRelease.version})\n\n> Posted by [semantic-release](https://github.com/semantic-release/semantic-release) bot"
}
]
],
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

## Description

Test skeleton with Terratest in Go used to execute integration and e2e tests for VM-Series modules:
Test skeleton with Terratest in Go used to execute integration and e2e tests for Software Firewall modules:
- [terraform-aws-vmseries-modules](https://github.com/PaloAltoNetworks/terraform-aws-vmseries-modules)
- [terraform-azurerm-vmseries-modules](https://github.com/PaloAltoNetworks/terraform-azurerm-vmseries-modules)
- [terraform-google-vmseries-modules](https://github.com/PaloAltoNetworks/terraform-google-vmseries-modules)
- [terraform-aws-swfw-modules](https://github.com/PaloAltoNetworks/terraform-aws-swfw-modules)
- [terraform-azurerm-swfw-modules](https://github.com/PaloAltoNetworks/terraform-azurerm-swfw-modules)
- [terraform-google-swfw-modules](https://github.com/PaloAltoNetworks/terraform-google-swfw-modules)

## Usage

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/PaloAltoNetworks/terraform-modules-vmseries-tests-skeleton
module github.com/PaloAltoNetworks/terraform-modules-swfw-tests-skeleton

go 1.20

Expand Down
8 changes: 4 additions & 4 deletions samples/vmseries_example_plan_and_deploy/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### VPCS ###

module "vpc" {
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vpc"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vpc"

for_each = var.vpcs

Expand All @@ -19,7 +19,7 @@ module "vpc" {

module "subnet_sets" {
for_each = toset(flatten([for _, v in { for vk, vv in var.vpcs : vk => distinct([for sk, sv in vv.subnets : "${vk}-${sv.set}"]) } : v]))
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/subnet_set"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/subnet_set"

name = split("-", each.key)[1]
vpc_id = module.vpc[split("-", each.key)[0]].id
Expand Down Expand Up @@ -64,7 +64,7 @@ locals {

module "vpc_routes" {
for_each = { for route in local.vpc_routes : "${route.subnet_key}_${route.to_cidr}" => route }
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vpc_route"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vpc_route"

route_table_ids = module.subnet_sets[each.value.subnet_key].unique_route_table_ids
to_cidr = each.value.to_cidr
Expand Down Expand Up @@ -132,7 +132,7 @@ locals {

module "vmseries" {
for_each = { for vmseries in local.vmseries_instances : "${vmseries.group}-${vmseries.instance}" => vmseries }
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vmseries"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vmseries"

name = "${var.name_prefix}${each.key}"
vmseries_version = each.value.common.panos_version
Expand Down
2 changes: 1 addition & 1 deletion samples/vmseries_example_plan_and_deploy/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/PaloAltoNetworks/terraform-modules-vmseries-tests-skeleton/pkg/testskeleton"
"github.com/PaloAltoNetworks/terraform-modules-swfw-tests-skeleton/pkg/testskeleton"
"github.com/gruntwork-io/terratest/modules/logger"
"github.com/gruntwork-io/terratest/modules/terraform"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resource "random_string" "random_sufix" {

# Test security VPC
module "security_vpc" {
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vpc"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vpc"

name = "${var.name_prefix}${random_string.random_sufix.id}"
cidr_block = var.security_vpc_cidr
Expand All @@ -19,7 +19,7 @@ module "security_vpc" {

# Subnets configured in test security VPC
module "security_subnet_sets" {
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/subnet_set"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/subnet_set"

for_each = toset(distinct([for _, v in var.security_vpc_subnets : v.set]))

Expand All @@ -33,7 +33,7 @@ module "security_subnet_sets" {
# Routes configured in test security VPC
module "security_vpc_routes" {
for_each = { for route in local.security_vpc_routes : "${route.subnet_key}_${route.to_cidr}" => route }
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vpc_route"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vpc_route"

route_table_ids = module.security_subnet_sets[each.value.subnet_key].unique_route_table_ids
to_cidr = each.value.to_cidr
Expand All @@ -43,7 +43,7 @@ module "security_vpc_routes" {
# Optinal S3 bucket for bootstrapping
module "bootstrap" {
count = var.use_s3_bucket_to_bootstrap ? 1 : 0
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/bootstrap"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/bootstrap"
prefix = local.bucket_name_prefix
global_tags = var.global_tags
plugin-op-commands = var.plugin_op_commands
Expand All @@ -52,7 +52,7 @@ module "bootstrap" {
# VM-Series deployed for tests
module "vmseries" {
for_each = var.vmseries
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vmseries"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vmseries"

name = "${var.name_prefix}${random_string.random_sufix.id}${var.name_sufix}"
ssh_key_name = aws_key_pair.generated_key.key_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package vmseries_module_check_additional_changes_after_deployment
import (
"testing"

"github.com/PaloAltoNetworks/terraform-modules-vmseries-tests-skeleton/pkg/testskeleton"
"github.com/PaloAltoNetworks/terraform-modules-swfw-tests-skeleton/pkg/testskeleton"
"github.com/gruntwork-io/terratest/modules/logger"
"github.com/gruntwork-io/terratest/modules/terraform"
tfjson "github.com/hashicorp/terraform-json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ locals {

module "panorama_vpc_routes" {
for_each = { for route in local.panorama_vpc_routes : "${route.subnet_key}_${route.to_cidr}" => route }
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vpc_route"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vpc_route"

next_hop_set = each.value.next_hop_set
route_table_ids = module.security_subnet_sets[each.value.subnet_key].unique_route_table_ids
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resource "random_string" "random_sufix" {

# Test security VPC
module "security_vpc" {
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vpc"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vpc"

name = "${var.name_prefix}${random_string.random_sufix.id}"
cidr_block = var.security_vpc_cidr
Expand All @@ -19,7 +19,7 @@ module "security_vpc" {

# Subnets configured in test security VPC
module "security_subnet_sets" {
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/subnet_set"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/subnet_set"

for_each = toset(distinct([for _, v in var.security_vpc_subnets : v.set]))

Expand All @@ -33,7 +33,7 @@ module "security_subnet_sets" {
# Routes configured in test security VPC
module "security_vpc_routes" {
for_each = { for route in local.security_vpc_routes : "${route.subnet_key}_${route.to_cidr}" => route }
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vpc_route"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vpc_route"

route_table_ids = module.security_subnet_sets[each.value.subnet_key].unique_route_table_ids
to_cidr = each.value.to_cidr
Expand All @@ -43,7 +43,7 @@ module "security_vpc_routes" {
# Optinal S3 bucket for bootstrapping
module "bootstrap" {
count = var.use_s3_bucket_to_bootstrap ? 1 : 0
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/bootstrap"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/bootstrap"
prefix = local.bucket_name_prefix
global_tags = var.global_tags
plugin-op-commands = var.plugin_op_commands
Expand All @@ -52,7 +52,7 @@ module "bootstrap" {
# VM-Series deployed for tests
module "vmseries" {
for_each = var.vmseries
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vmseries"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vmseries"

name = "${var.name_prefix}${random_string.random_sufix.id}${var.name_sufix}"
ssh_key_name = aws_key_pair.generated_key.key_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package vmseries_module_check_terraform_output_and_vmseries_url
import (
"testing"

"github.com/PaloAltoNetworks/terraform-modules-vmseries-tests-skeleton/pkg/helpers"
"github.com/PaloAltoNetworks/terraform-modules-vmseries-tests-skeleton/pkg/testskeleton"
"github.com/PaloAltoNetworks/terraform-modules-swfw-tests-skeleton/pkg/helpers"
"github.com/PaloAltoNetworks/terraform-modules-swfw-tests-skeleton/pkg/testskeleton"
"github.com/gruntwork-io/terratest/modules/logger"
"github.com/gruntwork-io/terratest/modules/terraform"
)
Expand Down
10 changes: 5 additions & 5 deletions samples/vmseries_module_check_terraform_plan_errors/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resource "random_string" "random_sufix" {

# Test security VPC
module "security_vpc" {
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vpc"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vpc"

name = "${var.name_prefix}${random_string.random_sufix.id}"
cidr_block = var.security_vpc_cidr
Expand All @@ -19,7 +19,7 @@ module "security_vpc" {

# Subnets configured in test security VPC
module "security_subnet_sets" {
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/subnet_set"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/subnet_set"

for_each = toset(distinct([for _, v in var.security_vpc_subnets : v.set]))

Expand All @@ -33,7 +33,7 @@ module "security_subnet_sets" {
# Routes configured in test security VPC
module "security_vpc_routes" {
for_each = { for route in local.security_vpc_routes : "${route.subnet_key}_${route.to_cidr}" => route }
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vpc_route"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vpc_route"

route_table_ids = module.security_subnet_sets[each.value.subnet_key].unique_route_table_ids
to_cidr = each.value.to_cidr
Expand All @@ -43,7 +43,7 @@ module "security_vpc_routes" {
# Optinal S3 bucket for bootstrapping
module "bootstrap" {
count = var.use_s3_bucket_to_bootstrap ? 1 : 0
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/bootstrap"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/bootstrap"
prefix = local.bucket_name_prefix
global_tags = var.global_tags
plugin-op-commands = var.plugin_op_commands
Expand All @@ -52,7 +52,7 @@ module "bootstrap" {
# VM-Series deployed for tests
module "vmseries" {
for_each = var.vmseries
source = "github.com/PaloAltoNetworks/terraform-aws-vmseries-modules//modules/vmseries"
source = "github.com/PaloAltoNetworks/terraform-aws-swfw-modules//modules/vmseries"

name = "${var.name_prefix}${random_string.random_sufix.id}${var.name_sufix}"
ssh_key_name = aws_key_pair.generated_key.key_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package vmseries_module_check_terraform_plan_errors
import (
"testing"

"github.com/PaloAltoNetworks/terraform-modules-vmseries-tests-skeleton/pkg/testskeleton"
"github.com/PaloAltoNetworks/terraform-modules-swfw-tests-skeleton/pkg/testskeleton"
"github.com/gruntwork-io/terratest/modules/logger"
"github.com/gruntwork-io/terratest/modules/terraform"
)
Expand Down