2022-07-10 00:27:18 -07:00
# Data Playground
2022-09-09 07:40:37 -07:00
This blueprint creates a minimum viable architecture for a data experimentation project with the needed APIs enabled, VPC and Firewall set in place, BigQuesy dataset, GCS bucket and an AI notebook to get started.
2022-07-10 00:27:18 -07:00
This is the high level diagram:
![High-level diagram ](diagram.png "High-level diagram" )
## Managed resources and services
This sample creates several distinct groups of resources:
2022-08-09 06:56:39 -07:00
- project
2022-07-10 00:27:18 -07:00
- networking
2022-08-09 06:56:39 -07:00
- VPC network with a default subnet and CloudNat
2022-07-10 00:27:18 -07:00
- Firewall rules for [SSH access via IAP ](https://cloud.google.com/iap/docs/using-tcp-forwarding ) and open communication within the VPC
2022-08-09 06:56:39 -07:00
- Vertex AI Workbench notebook configured with a private IP and using a dedicated Service Account
- One GCS bucket
- One BigQuery dataset
2022-07-10 00:27:18 -07:00
2022-08-09 06:56:39 -07:00
## Deploy your enviroment
We assume the identiy running the following steps has the following role:
2022-07-10 00:27:18 -07:00
2022-08-09 06:56:39 -07:00
- resourcemanager.projectCreator in case a new project will be created.
- owner on the project in case you use an existing project.
Run Terraform init:
```
$ terraform init
```
Configure the Terraform variable in your terraform.tfvars file. You need to spefify at least the following variables:
```
prefix = "prefix"
project_id = "data-001"
```
You can run now:
```
$ terraform apply
```
You can now connect to the Vertex AI notbook to perform your data analysy.
<!-- BEGIN TFDOC -->
2022-07-10 00:27:18 -07:00
## Variables
2022-08-09 06:56:39 -07:00
| name | description | type | required | default |
|---|---|:---:|:---:|:---:|
| [prefix ](variables.tf#L36 ) | Unique prefix used for resource names. Not used for project if 'project_create' is null. | < code > string</ code > | ✓ | |
| [project_id ](variables.tf#L22 ) | Project id, references existing project if `project_create` is null. | < code > string</ code > | ✓ | |
| [location ](variables.tf#L16 ) | The location where resources will be deployed. | < code > string</ code > | | < code > " EU" </ code > |
| [project_create ](variables.tf#L27 ) | Provide values if project creation is needed, uses existing project if null. Parent format: folders/folder_id or organizations/org_id | < code title = "object({ billing_account_id = string parent = string })" > object({…}) </ code > | | < code > null</ code > |
| [region ](variables.tf#L41 ) | The region where resources will be deployed. | < code > string</ code > | | < code > " europe-west1" </ code > |
| [vpc_config ](variables.tf#L57 ) | Parameters to create a VPC. | < code title = "object({ ip_cidr_range = string })" > object({…}) </ code > | | < code title = "{ ip_cidr_range = "10.0.0.0/20" }" > {…} </ code > |
2022-07-10 00:27:18 -07:00
## Outputs
2022-08-09 06:56:39 -07:00
| name | description | sensitive |
|---|---|:---:|
| [bucket ](outputs.tf#L15 ) | GCS Bucket URL. | |
| [dataset ](outputs.tf#L20 ) | GCS Bucket URL. | |
| [notebook ](outputs.tf#L25 ) | Vertex AI notebook details. | |
| [project ](outputs.tf#L33 ) | Project id | |
| [vpc ](outputs.tf#L38 ) | VPC Network | |
<!-- END TFDOC -->