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
Copy file name to clipboardExpand all lines: README.md
+64-20Lines changed: 64 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,63 @@
1
-
# Terraform Module Template
2
-
3
-
**Next steps**
4
-
1. Update the top section of this file to tell people about this module.
5
-
2. Update `versions.tf` to include the required providers for the module.
6
-
3. Add resources and variables to solve the problem.
7
-
4. Add outputs for relevant details the consumer may want
8
-
5. Add example uses to the bottom of this file
9
-
6. Update the generated portion of this file using `terraform-docs .`
10
-
1
+
# gcp-terraform-drata-setup
2
+
3
+
GCP terraform module to create the Drata Read Only service account.
4
+
5
+
## Example Usage
6
+
7
+
The example below uses `ref=main` (which is appended in the URL), but it is recommended to use a specific tag version (i.e. `ref=1.0.0`) to avoid breaking changes. Go to the release page for a list of published versions. [releases page](https://github.com/drata/gcp-terraform-drata-setup/releases) for a list of published versions.
8
+
9
+
Replace `YOUR_ORGANIZATION_DOMAIN` with the organization domain. i.e. `your_org.com`.
The following steps demonstrate how to connect GCP in Drata when using this terraform module.
33
+
34
+
1. Add the code above to your terraform project.
35
+
2. Make sure the service account to authenticate this script has the roles `Organization Administrator`, `Service Account Admin`, `Service Account Key Admin` and ` Service Usage Admin`.
36
+
3. Replace `main` in `ref=main` with the latest version from the [releases page](https://github.com/drata/gcp-terraform-drata-setup/releases).
37
+
4. Replace `YOUR_ORGANIZATION_DOMAIN` with the GCP organization domain.
38
+
5. Replace `YOUR_PROJECT_ID` if the desired project is not the default project in your organization.
39
+
6. Replace the given `drata_role_name` if you don't want the role added to be the default: `DrataReadOnly`.
40
+
7. Back in your terminal, run `terraform init` to download/update the module.
41
+
8. Run `terraform apply` and **IMPORTANT** review the plan output before typing `yes`.
42
+
9. If successful, run the command to generate the json key file
| <aname="input_gcp_project_id"></a> [gcp\_project\_id](#input\_gcp\_project\_id)| Project identifier of the gcp organization. If it is not provided, the provider project is used. |`string`|`null`| no |
88
+
| <aname="input_gcp_services"></a> [gcp\_services](#input\_gcp\_services)| List of services to enable. |`list(string)`| <pre>[<br> "cloudresourcemanager.googleapis.com",<br> "compute.googleapis.com",<br> "admin.googleapis.com",<br> "sqladmin.googleapis.com",<br> "monitoring.googleapis.com"<br>]</pre> | no |
40
89
41
90
## Outputs
42
91
43
92
| Name | Description |
44
93
|------|-------------|
45
-
| <aname="output_nope"></a> [nope](#output\_nope)| TODO: Remove this and add your own outputs |
0 commit comments