From a4cbd029b6e0ec7a32119dbf66f4437bcbbc325e Mon Sep 17 00:00:00 2001 From: Dmitry Gurevich <99176494+gurevichdmitry@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:26:15 +0200 Subject: [PATCH 1/2] update action logic [skip actions] --- .github/actions/cis-agent-based/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/cis-agent-based/action.yml b/.github/actions/cis-agent-based/action.yml index 1e39352755..0669476464 100644 --- a/.github/actions/cis-agent-based/action.yml +++ b/.github/actions/cis-agent-based/action.yml @@ -190,7 +190,7 @@ runs: - name: Install D4C integration id: kspm-d4c - if: ${{ !cancelled() && startsWith(env.STACK_VERSION, '8') && inputs.serverless_mode == 'false' && steps.deploy-cis-infra.outcome == 'success' }} + if: ${{ !cancelled() && startsWith(env.STACK_VERSION, '8') && inputs.serverless-mode == 'false' && steps.deploy-cis-infra.outcome == 'success' }} working-directory: tests/integrations_setup shell: bash env: From 5c851702b4b8c27dc41747e37bcaa4cf871629cd Mon Sep 17 00:00:00 2001 From: Dmitry Gurevich <99176494+gurevichdmitry@users.noreply.github.com> Date: Mon, 10 Feb 2025 10:22:58 +0200 Subject: [PATCH 2/2] update action --- .github/actions/cdr/action.yml | 2 +- .github/actions/cis-agent-based/action.yml | 2 +- deploy/test-environments/cis/output.tf | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/cdr/action.yml b/.github/actions/cdr/action.yml index 8adf8ab930..4e5d270e01 100644 --- a/.github/actions/cdr/action.yml +++ b/.github/actions/cdr/action.yml @@ -308,7 +308,7 @@ runs: env: AZURE_TAGS: ${{ inputs.azure-tags }} DEPLOYMENT_NAME: "${{ inputs.deployment-name }}-inventory" - run: ./install_agent_az_cli.sh + run: DEPLOYMENT_NAME="$DEPLOYMENT_NAME-$(openssl rand -hex 3)" ./install_agent_az_cli.sh - name: Install AWS Asset Inventory integration id: aws-asset-inventory diff --git a/.github/actions/cis-agent-based/action.yml b/.github/actions/cis-agent-based/action.yml index 0669476464..145038c246 100644 --- a/.github/actions/cis-agent-based/action.yml +++ b/.github/actions/cis-agent-based/action.yml @@ -186,7 +186,7 @@ runs: shell: bash env: AZURE_TAGS: "${{ inputs.cspm-azure-tags }}" - run: ./install_agent_az_cli.sh + run: DEPLOYMENT_NAME="$DEPLOYMENT_NAME-$(openssl rand -hex 3)" ./install_agent_az_cli.sh - name: Install D4C integration id: kspm-d4c diff --git a/deploy/test-environments/cis/output.tf b/deploy/test-environments/cis/output.tf index cee27acdd3..4ae473f9aa 100644 --- a/deploy/test-environments/cis/output.tf +++ b/deploy/test-environments/cis/output.tf @@ -8,32 +8,32 @@ output "deployment_name" { # EC2 output # ============================================================ output "ec2_kspm_ssh_cmd" { - value = module.aws_ec2_for_kspm[0].cloudbeat_ssh_cmd + value = var.deploy_aws_kspm ? module.aws_ec2_for_kspm[0].cloudbeat_ssh_cmd : null sensitive = true } output "ec2_kspm_public_ip" { - value = module.aws_ec2_for_kspm[0].aws_instance_cloudbeat_public_ip + value = var.deploy_aws_kspm ? module.aws_ec2_for_kspm[0].aws_instance_cloudbeat_public_ip : null sensitive = true } output "ec2_kspm_key" { - value = module.aws_ec2_for_kspm[0].ec2_ssh_key + value = var.deploy_aws_kspm ? module.aws_ec2_for_kspm[0].ec2_ssh_key : null sensitive = true } output "ec2_cspm_ssh_cmd" { - value = module.aws_ec2_for_cspm[0].cloudbeat_ssh_cmd + value = var.deploy_aws_cspm ? module.aws_ec2_for_cspm[0].cloudbeat_ssh_cmd : null sensitive = true } output "ec2_cspm_public_ip" { - value = module.aws_ec2_for_cspm[0].aws_instance_cloudbeat_public_ip + value = var.deploy_aws_cspm ? module.aws_ec2_for_cspm[0].aws_instance_cloudbeat_public_ip : null sensitive = true } output "ec2_cspm_key" { - value = module.aws_ec2_for_cspm[0].ec2_ssh_key + value = var.deploy_aws_cspm ? module.aws_ec2_for_cspm[0].ec2_ssh_key : null sensitive = true }