Skip to content

Commit

Permalink
update gcp package input
Browse files Browse the repository at this point in the history
  • Loading branch information
gurevichdmitry committed Dec 9, 2024
1 parent e91ee0f commit 17df5da
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/integrations_setup/configuration_fleet.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
gcp_dm_config.allow_ssh = os.getenv("ALLOW_SSH", "false") == "true"
gcp_dm_config.credentials_file = os.getenv("GOOGLE_APPLICATION_CREDENTIALS", "")
gcp_dm_config.service_account_json_path = os.getenv("SERVICE_ACCOUNT_JSON_PATH", "")
gcp_dm_config.project_id = os.getenv("GOOGLE_CLOUD_PROJECT", "")

gcp_audit_config = Munch()
gcp_audit_config.credentials_file = os.getenv("GOOGLE_APPLICATION_CREDENTIALS", "")
Expand Down
13 changes: 13 additions & 0 deletions tests/integrations_setup/install_agentless_integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from fleet_api.package_policy_api import create_cspm_integration
from loguru import logger
from package_policy import generate_policy_template, generate_random_name, load_data
from state_file_manager import HostType, PolicyState, state_manager


def generate_aws_integration_data():
Expand Down Expand Up @@ -66,6 +67,7 @@ def generate_gcp_integration_data():
"posture": "cspm",
"deployment": "gcp",
"vars": {
"gcp.project_id": cnfg.gcp_dm_config.project_id,
"gcp.account_type": "single-account",
"gcp.credentials.type": "credentials-json",
"gcp.credentials.json": credentials_json,
Expand Down Expand Up @@ -109,4 +111,15 @@ def generate_gcp_integration_data():
cspm_data={},
)

state_manager.add_policy(
PolicyState(
agent_policy_id,
package_policy_id,
1,
[],
HostType.KUBERNETES.value,
integration_data["name"],
),
)

logger.info(f"Installation of {INTEGRATION_NAME} integration is done")

0 comments on commit 17df5da

Please sign in to comment.