Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/imperva/dsfkit into COUNT-24…
Browse files Browse the repository at this point in the history
…77-replay
  • Loading branch information
linda.nasredin committed Jan 30, 2024
2 parents a6bbde7 + 9caa79b commit f6ccfb6
Show file tree
Hide file tree
Showing 179 changed files with 3,286 additions and 515 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/deploy_module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
- source_module: "aws/poc-db-onboarder"
destination_repo: "terraform-aws-dsf-poc-db-onboarder"
public_submodule: "aws/rds-mysql-db aws/rds-mssql-db aws/rds-postgres-db"
hidden_submodules: "null/poc-db-onboarder"
begin_tag: 1.0.0

- source_module: "aws/sonar-upgrader"
Expand All @@ -59,7 +60,13 @@ jobs:
hidden_submodules: "azurerm/sonar-base-instance azurerm/statistics null/statistics"
begin_tag: 1.0.0

## null provider
- source_module: "azurerm/poc-db-onboarder"
destination_repo: "terraform-azurerm-dsf-poc-db-onboarder"
public_submodule: "azurerm/mssql-db"
hidden_submodules: "null/poc-db-onboarder"
begin_tag: 1.0.0

## null provider
- source_module: "null/hadr"
destination_repo: "terraform-null-dsf-hadr"
begin_tag: 1.0.0
Expand Down Expand Up @@ -110,6 +117,16 @@ jobs:
hidden_submodules: "aws/statistics null/statistics"
begin_tag: 1.0.0

## azurerm provider
- source_module: "azurerm/dra-admin"
destination_repo: "terraform-azurerm-dsf-dra-admin"
hidden_submodules: "azurerm/statistics null/statistics"
begin_tag: 1.7.6
- source_module: "azurerm/dra-analytics"
destination_repo: "terraform-azurerm-dsf-dra-analytics"
hidden_submodules: "azurerm/statistics null/statistics"
begin_tag: 1.7.6

# Globals
## aws provider
- source_module: "aws/core/globals"
Expand Down
29 changes: 27 additions & 2 deletions .github/workflows/dsf_poc_cli.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'DSF POC CLI'
name: 'DSF POC CLI - AWS'

on:
workflow_call:
Expand All @@ -25,6 +25,31 @@ on:
type: boolean
required: false

push:
branches:
- 'dev'
paths:
- 'modules/aws/**'
- '!modules/aws/sonar-upgrader/*'
- '!modules/aws/statistics/*'
- 'modules/null/**'
- '!modules/null/statistics/*'
- 'examples/aws/poc/dsf_deployment/*'

pull_request:
types:
- 'opened'
- 'reopened'
branches:
- 'dev'
paths:
- 'modules/aws/**'
- '!modules/aws/sonar-upgrader/*'
- '!modules/aws/statistics/*'
- 'modules/null/**'
- '!modules/null/statistics/*'
- 'examples/aws/poc/dsf_deployment/*'

env:
TF_CLI_ARGS: "-no-color"
TF_INPUT: 0
Expand Down Expand Up @@ -130,7 +155,7 @@ jobs:
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
terraform_version: ~1.6.0
terraform_version: ~1.7.0

- name: Setup jq
uses: sergeysova/jq-action@v2
Expand Down
52 changes: 51 additions & 1 deletion .github/workflows/dsf_poc_cli_azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,25 @@ on:
type: boolean
required: false

push:
branches:
- 'dev'
paths:
- 'modules/azurerm/**'
- 'modules/null/**'
- 'examples/azure/poc/dsf_deployment/*'

pull_request:
types:
- 'opened'
- 'reopened'
branches:
- 'dev'
paths:
- 'modules/azurerm/**'
- 'modules/null/**'
- 'examples/azure/poc/dsf_deployment/*'

env:
TF_CLI_ARGS: "-no-color"
TF_INPUT: 0
Expand All @@ -49,13 +68,30 @@ jobs:
workspace: azure_cli-all-
enable_sonar: true
enable_dam: true
enable_dra: true
- name: DSF POC - SONAR
workspace: azure_cli-sonar-
enable_sonar: true
enable_dam: false
enable_dra: false
- name: DSF POC - DAM
workspace: azure_cli-dam-
enable_sonar: false
enable_dam: true
enable_dra: false
- name: DSF POC - DRA
workspace: azure_cli-dra-
enable_sonar: false
enable_dam: false
enable_dra: true

name: '${{ matrix.name }}'
runs-on: ubuntu-latest
env:
EXAMPLE_DIR: ./examples/azure/poc/dsf_deployment
TF_VAR_enable_sonar: ${{ matrix.enable_sonar }}
TF_VAR_enable_dam: ${{ matrix.enable_dam }}
TF_VAR_enable_dra: ${{ matrix.enable_dra }}
environment: test

# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
Expand Down Expand Up @@ -127,14 +163,24 @@ jobs:
az_blob = "Imperva-ragent-UBN-px86_64-b14.6.0.60.0.636085.bsx"
}
simulation_db_types_for_agent=["PostgreSql", "MySql"]
dra_admin_vhd_details = {
storage_account_name = "dsfinstallation"
container_name = "dra"
path_to_vhd = "DRA-4.13.0.20.0.3_30207_x86_64-Admin.vhd"
}
dra_analytics_vhd_details = {
storage_account_name = "dsfinstallation"
container_name = "dra"
path_to_vhd = "DRA-4.13.0.20.0.3_30207_x86_64-Analytics.vhd"
}
EOF
# Install the latest version of Terraform CLI and configure the Terraform CLI configuration file with a Terraform Cloud user API token
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
terraform_version: ~1.6.0
terraform_version: ~1.7.0

- name: Setup jq
uses: sergeysova/jq-action@v2
Expand All @@ -159,15 +205,19 @@ jobs:
mv $EXAMPLE_DIR/outputs.tf{,_}
mv $EXAMPLE_DIR/sonar.tf{,_}
mv $EXAMPLE_DIR/dam.tf{,_}
mv $EXAMPLE_DIR/dra.tf{,_}
mv $EXAMPLE_DIR/agent_sources.tf{,_}
mv $EXAMPLE_DIR/agentless_sources.tf{,_}
mv $EXAMPLE_DIR/networking.tf{,_}
ls -la $EXAMPLE_DIR
terraform -chdir=$EXAMPLE_DIR destroy -var dam_license=license.mprv -auto-approve
mv $EXAMPLE_DIR/main.tf{_,}
mv $EXAMPLE_DIR/outputs.tf{_,}
mv $EXAMPLE_DIR/sonar.tf{_,}
mv $EXAMPLE_DIR/dam.tf{_,}
mv $EXAMPLE_DIR/dra.tf{_,}
mv $EXAMPLE_DIR/agent_sources.tf{_,}
mv $EXAMPLE_DIR/agentless_sources.tf{_,}
mv $EXAMPLE_DIR/networking.tf{_,}
fi
Expand Down
35 changes: 33 additions & 2 deletions .github/workflows/dsf_single_account_cli.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'DSF Single Account CLI'
name: 'DSF Single Account CLI - AWS'

concurrency:
group: dsf_single_account
Expand Down Expand Up @@ -31,6 +31,37 @@ on:
DAM_LICENSE:
required: true

push:
branches:
- 'dev'
paths:
- 'modules/aws/**'
- '!modules/aws/db-with-agent/*'
- '!modules/aws/poc-db-onboarder/*'
- '!modules/aws/rds-mssql-db/*'
- '!modules/aws/rds-mysql-db/*'
- '!modules/aws/rds-postgres-db/*'
- '!modules/aws/sonar-upgrader/*'
- 'modules/null/**'
- 'examples/aws/poc/dsf_single_account_deployment/*'

pull_request:
types:
- 'opened'
- 'reopened'
branches:
- 'dev'
paths:
- 'modules/aws/**'
- '!modules/aws/db-with-agent/*'
- '!modules/aws/poc-db-onboarder/*'
- '!modules/aws/rds-mssql-db/*'
- '!modules/aws/rds-mysql-db/*'
- '!modules/aws/rds-postgres-db/*'
- '!modules/aws/sonar-upgrader/*'
- 'modules/null/**'
- 'examples/aws/poc/dsf_single_account_deployment/*'

env:
TF_CLI_ARGS: "-no-color"
TF_INPUT: 0
Expand Down Expand Up @@ -147,7 +178,7 @@ jobs:
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
terraform_version: ~1.6.0
terraform_version: ~1.7.0

- name: Setup jq
uses: sergeysova/jq-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_sonar_poc_basic_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
terraform_version: ~1.6.0
terraform_version: ~1.7.0

- name: Setup jq
uses: sergeysova/jq-action@v2
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/plan_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ jobs:
az_blob = "dummy-blob"
}
dam_license="license.mprv"
dra_admin_image_details = {
resource_group_name = "dummy-resource-group"
image_id = "dummy-admin-image-id"
}
dra_analytics_image_details = {
resource_group_name = "dummy-resource-group"
image_id = "dummy-analytics-image-id"
}
- name: AWS - POC - DSF
example: ./examples/aws/poc/dsf_deployment
terraformvars: |
Expand Down Expand Up @@ -128,7 +136,7 @@ jobs:
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ~1.6.0
terraform_version: ~1.7.0

- name: Create License File
env:
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
terraform_version: ~1.6.0
terraform_version: ~1.7.0

- name: Format version for zip file name
run: |
Expand Down Expand Up @@ -176,6 +176,20 @@ jobs:
secrets:
PUSH_TO_OTHER_REPOS_TOKEN_ADMIN: ${{ secrets.PUSH_TO_OTHER_REPOS_TOKEN_ADMIN }}

test_plan:
needs: deploy_modules
uses: ./.github/workflows/plan_cli.yml
with:
use_modules_from_terraform_registry: true
explicit_ref: master
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID_STAGE: ${{ secrets.AWS_ACCESS_KEY_ID_STAGE }}
AWS_SECRET_ACCESS_KEY_STAGE: ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGE }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
DAM_LICENSE: ${{ secrets.DAM_LICENSE }}

release:
needs: deploy_modules
runs-on: ubuntu-latest
Expand All @@ -191,22 +205,8 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}

test_plan:
needs: release
uses: ./.github/workflows/plan_cli.yml
with:
use_modules_from_terraform_registry: true
explicit_ref: master
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID_STAGE: ${{ secrets.AWS_ACCESS_KEY_ID_STAGE }}
AWS_SECRET_ACCESS_KEY_STAGE: ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGE }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
DAM_LICENSE: ${{ secrets.DAM_LICENSE }}

test_apply:
needs: test_plan
needs: release
uses: ./.github/workflows/sonar_poc_cli.yml
with:
use_modules_from_terraform_registry: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar_multi_account_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
terraform_version: ~1.6.0
terraform_version: ~1.7.0

- name: Setup jq
uses: sergeysova/jq-action@v2
Expand Down
26 changes: 4 additions & 22 deletions .github/workflows/sonar_poc_cli.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Sonar POC CLI'
name: 'Sonar POC CLI - AWS'

on:
workflow_call:
Expand All @@ -25,18 +25,9 @@ on:

push:
branches:
- 'master'
- 'dev'
paths:
- 'modules/aws/core/*'
- 'modules/aws/sonar-base-instance/*'
- 'modules/aws/hub/*'
- 'modules/aws/agentless-gw/*'
- 'modules/aws/poc-db-onboarder/*'
- 'modules/aws/rds-mssql-db/*'
- 'modules/aws/rds-mysql-db/*'
- 'modules/null/federation/*'
- 'modules/null/hadr/*'
- 'examples/aws/poc/dsf_deployment/*'
- 'examples/aws/poc/sonar_basic_deployment/*'
- 'examples/aws/poc/sonar_hadr_deployment/*'

Expand All @@ -45,18 +36,9 @@ on:
- 'opened'
- 'reopened'
branches:
- 'master'
- 'dev'
paths:
- 'modules/aws/core/*'
- 'modules/aws/sonar-base-instance/*'
- 'modules/aws/hub/*'
- 'modules/aws/agentless-gw/*'
- 'modules/aws/poc-db-onboarder/*'
- 'modules/aws/rds-mssql-db/*'
- 'modules/aws/rds-mysql-db/*'
- 'modules/null/federation/*'
- 'modules/null/hadr/*'
- 'examples/aws/poc/dsf_deployment/*'
- 'examples/aws/poc/sonar_basic_deployment/*'
- 'examples/aws/poc/sonar_hadr_deployment/*'

Expand Down Expand Up @@ -145,7 +127,7 @@ jobs:
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
terraform_version: ~1.6.0
terraform_version: ~1.7.0

- name: Setup jq
uses: sergeysova/jq-action@v2
Expand Down
Loading

0 comments on commit f6ccfb6

Please sign in to comment.