Skip to content

Commit aa98a59

Browse files
docs(gcp): add terraform plan in the readme
1 parent 2edcfec commit aa98a59

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

gcp/examples/cross_project/README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ Use this **advanced** deployment model when:
7878
terraform init
7979
```
8080

81+
1. **Review the deployment plan**:
82+
```sh
83+
terraform plan \
84+
-var="scanner_project_id=my-scanner-project" \
85+
-var="datadog_api_key=$DD_API_KEY" \
86+
-var="datadog_site=datadoghq.com"
87+
```
88+
8189
1. **Deploy the scanner infrastructure**. You will need to:
8290
- Set your scanner project ID
8391
- Set your Datadog [API key](https://docs.datadoghq.com/account_management/api-app-keys/)
@@ -100,14 +108,19 @@ Use this **advanced** deployment model when:
100108

101109
1. Go to the `other_project` folder.
102110
1. Run `terraform init`.
103-
1. Run `terraform apply`.
111+
1. Run `terraform plan` to review the changes.
112+
1. Run `terraform apply` to deploy.
104113
1. Set the project ID to be scanned.
105114
1. Set both scanner service account emails from Step 1.
106115

107116
Example:
108117
```sh
109118
cd ../other_project
110119
terraform init
120+
terraform plan \
121+
-var="scanned_project_id=my-other-project" \
122+
-var="scanner_service_account_email_us=$SCANNER_SA_US" \
123+
-var="scanner_service_account_email_eu=$SCANNER_SA_EU"
111124
terraform apply \
112125
-var="scanned_project_id=my-other-project" \
113126
-var="scanner_service_account_email_us=$SCANNER_SA_US" \
@@ -153,7 +166,7 @@ Repeat Step 2 for each additional project you want to scan.
153166

154167
You have two options for providing the Datadog API key:
155168

156-
1. **Pass the API key directly** (shown in examples below):
169+
1. **Pass the API key directly** (shown in examples above):
157170
```bash
158171
-var="datadog_api_key=$DD_API_KEY"
159172
```

gcp/examples/single_region/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ To deploy a Datadog agentless scanner:
3535
terraform init
3636
```
3737

38+
1. **Review the deployment plan**:
39+
```sh
40+
terraform plan \
41+
-var="project_id=my-gcp-project" \
42+
-var="datadog_api_key=$DD_API_KEY" \
43+
-var="datadog_site=datadoghq.com"
44+
```
45+
3846
1. **Deploy the scanner**. You will need to:
3947
- Set your GCP project ID
4048
- Set your Datadog [API key](https://docs.datadoghq.com/account_management/api-app-keys/)
@@ -60,7 +68,7 @@ To deploy a Datadog agentless scanner:
6068

6169
You have two options for providing the Datadog API key:
6270

63-
1. **Pass the API key directly** (shown in examples below):
71+
1. **Pass the API key directly** (shown in examples above):
6472
```bash
6573
-var="datadog_api_key=$DD_API_KEY"
6674
```

0 commit comments

Comments
 (0)