You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example demonstrates how to onboard a GCP project by creating a dedicated project to provision all of Aqua’s resources into and apply the required labels for Aqua Security integration.
8
+
9
+
## Pre-requisites
10
+
11
+
Before running this example, ensure that you have the following:
12
+
13
+
1. Terraform installed (version 1.6.4 or later).
14
+
2.`Gcloud` CLI installed and configured.
15
+
3. Aqua Security account API credentials.
16
+
17
+
## Usage
18
+
19
+
1. Obtain the Terraform configuration file generated by the Aqua Security UI.
20
+
2. Important: Replace `<aqua_api_key>` and `<aqua_api_secret>` with your generated API credentials.
21
+
3. Run `terraform init` to initialize the Terraform working directory.
22
+
4. Run `terraform apply` to create the dedicated project.
23
+
24
+
## What's Happening
25
+
26
+
1. The `aqua_gcp_dedicated_project` module is called to create a dedicated GCP project with the name `aqua-agentless-<tenant_id>-<org_hash>`, where `org_hash` is the first six characters of the SHA1 hash of your organization name.
27
+
2. The `aqua_gcp_onboarding` module is called to provision the necessary resources (service accounts, roles, networking, etc.) in the dedicated GCP project.
28
+
3. The `aqua_gcp_project_attachment` module is called to create the required IAM resources in the existing project and trigger the Aqua API to onboard the project.
29
+
30
+
31
+
## Outputs
32
+
33
+
-`onboarding_status`: The output from the `aqua_gcp_project_attachment` module, displaying the result of the onboarding process.
34
+
35
+
## Cleanup
36
+
37
+
To remove the dedicated project created by this example, run `terraform destroy`.
This example demonstrates how to onboard an existing Google Cloud Platform (GCP) project to Aqua Security by provisioning all the necessary resources directly into the existing project, without creating a dedicated project.
8
+
9
+
## Prerequisites
10
+
11
+
Before running this example, ensure that you have the following:
12
+
13
+
1. Terraform installed (version 1.6.4 or later).
14
+
2.`gcloud` CLI installed and configured.
15
+
3. Aqua Security account and API credentials.
16
+
17
+
## Usage
18
+
19
+
1. Obtain the Terraform configuration file generated by the Aqua Security UI.
20
+
2. Replace the placeholders `<aqua_api_key>` and `<aqua_api_secret>` with your actual Aqua Security API key and secret.
21
+
3. Run `terraform init` to initialize the Terraform working directory.
22
+
4. Run `terraform apply` to create the resources.
23
+
24
+
## What's Happening
25
+
26
+
1. The `aqua_gcp_onboarding` module is called to provision the necessary resources (service accounts, roles, networking, etc.) directly in the existing GCP project.
27
+
2. The `aqua_gcp_project_attachment` module is called to create the required IAM resources in the existing project and trigger the Aqua API to onboard the project.
28
+
29
+
## Outputs
30
+
31
+
-`onboarding_status`: The output from the `aqua_gcp_project_attachment` module, displaying the result of the onboarding process.
32
+
33
+
## Cleanup
34
+
35
+
To remove the resources created by this example, run `terraform destroy`.
## Attaching the existing project to the onboarding resources
57
+
module"aqua_gcp_project_attachment" {
58
+
source="../../modules/project_attachment"
59
+
providers={
60
+
google = google # Using the root project provider
61
+
}
62
+
aqua_api_key=local.aqua_api_key
63
+
aqua_api_secret=local.aqua_api_secret
64
+
aqua_autoconnect_url=local.aqua_autoconnect_url
65
+
aqua_bucket_name=local.aqua_bucket_name
66
+
aqua_configuration_id=local.aqua_configuration_id
67
+
aqua_cspm_group_id=local.aqua_cspm_group_id
68
+
org_name=local.org_name
69
+
project_id=local.project_id
70
+
dedicated_project=local.dedicated
71
+
labels=local.aqua_custom_labels
72
+
create_role_id=module.aqua_gcp_onboarding.create_role_id# Referencing outputs from the onboarding module
73
+
onboarding_service_account_email=module.aqua_gcp_onboarding.service_account_email# Referencing outputs from the onboarding module
74
+
onboarding_workload_identity_pool_id=module.aqua_gcp_onboarding.workload_identity_pool_id# Referencing outputs from the onboarding module
75
+
onboarding_workload_identity_pool_provider_id=module.aqua_gcp_onboarding.workload_identity_pool_provider_id# Referencing outputs from the onboarding module
76
+
onboarding_project_number=module.aqua_gcp_onboarding.project_number# Referencing outputs from the onboarding module
0 commit comments