cloud-foundation-fabric/data-solutions/data-platform-foundations/01-environment/README.md

54 lines
2.6 KiB
Markdown
Raw Normal View History

2021-06-05 07:05:39 -07:00
# Data Platform Foundations - Environment (Step 1)
2021-05-18 09:30:21 -07:00
2021-06-05 07:05:39 -07:00
This is the first step needed to deploy Data Platform Foundations, which creates projects and service accounts. Please refer to the [top-level Data Platform README](../README.md) for prerequisites.
2021-05-18 09:30:21 -07:00
2021-06-05 07:05:39 -07:00
The projects that will be created are:
2021-05-18 09:30:21 -07:00
- Common services
- Landing
- Orchestration & Transformation
- DWH
- Datamart
2021-06-10 08:04:27 -07:00
A main service account named `projects-editor-sa` will be created under the common services project, and it will be granted editor permissions on all the projects in scope.
This is a high level diagram of the created resources:
![Environment - Phase 1](./diagram.png "High-level Environment diagram")
2021-05-18 09:30:21 -07:00
## Running the example
To create the infrastructure:
2021-06-05 07:05:39 -07:00
- specify your variables in a `terraform.tvars`
2021-05-18 09:30:21 -07:00
```tfm
2021-06-05 07:05:39 -07:00
billing_account = "1234-1234-1234"
parent = "folders/12345678"
2021-05-18 09:30:21 -07:00
```
2021-06-05 07:05:39 -07:00
- make sure you have the right authentication setup (application default credentials, or a service account key)
2021-06-15 08:13:40 -07:00
- **The output of this stage contains the values for the resources stage**
2021-06-05 07:05:39 -07:00
- run `terraform init` and `terraform apply`
2021-05-18 09:30:21 -07:00
2021-06-10 08:04:27 -07:00
Once done testing, you can clean up resources by running `terraform destroy`.
2021-05-18 09:30:21 -07:00
<!-- BEGIN TFDOC -->
2021-06-05 07:05:39 -07:00
## Variables
2021-05-23 03:46:47 -07:00
2021-06-05 07:05:39 -07:00
| name | description | type | required | default |
|---|---|:---: |:---:|:---:|
| billing_account_id | Billing account id. | <code title="">string</code> | ✓ | |
| root_node | Parent folder or organization in 'folders/folder_id' or 'organizations/org_id' format. | <code title="">string</code> | ✓ | |
| *prefix* | Prefix used to generate project id and name. | <code title="">string</code> | | <code title="">null</code> |
| *project_names* | Override this variable if you need non-standard names. | <code title="object&#40;&#123;&#10;datamart &#61; string&#10;dwh &#61; string&#10;landing &#61; string&#10;services &#61; string&#10;transformation &#61; string&#10;&#125;&#41;">object({...})</code> | | <code title="&#123;&#10;datamart &#61; &#34;datamart&#34;&#10;dwh &#61; &#34;datawh&#34;&#10;landing &#61; &#34;landing&#34;&#10;services &#61; &#34;services&#34;&#10;transformation &#61; &#34;transformation&#34;&#10;&#125;">...</code> |
| *service_account_names* | Override this variable if you need non-standard names. | <code title="object&#40;&#123;&#10;main &#61; string&#10;&#125;&#41;">object({...})</code> | | <code title="&#123;&#10;main &#61; &#34;data-platform-main&#34;&#10;&#125;">...</code> |
2021-05-18 09:30:21 -07:00
## Outputs
2021-06-05 07:05:39 -07:00
| name | description | sensitive |
|---|---|:---:|
| project_ids | Project ids for created projects. | |
2021-06-10 08:04:27 -07:00
| service_account | Main service account. | |
2021-05-18 09:30:21 -07:00
<!-- END TFDOC -->