76 lines
2.9 KiB
Markdown
76 lines
2.9 KiB
Markdown
# Cloud Dataplex instance with lake, zone & assests
|
|
|
|
This module manages the creation of Cloud Dataplex instance along with lake, zone & assets in single regions.
|
|
|
|
|
|
## Simple example
|
|
|
|
This example shows how to setup a Cloud Dataplex instance, lake, zone & asset creation in GCP project.
|
|
|
|
```hcl
|
|
|
|
module "dataplex" {
|
|
source = "./fabric/modules/cloud-dataplex"
|
|
name = "terraform-lake"
|
|
prefix = "test"
|
|
project_id = "myproject"
|
|
region = "europe-west2"
|
|
zones = {
|
|
zone_1 = {
|
|
type = "RAW"
|
|
discovery = true
|
|
assets = {
|
|
asset_1 = {
|
|
bucket_name = "asset_1"
|
|
cron_schedule = "15 15 * * *"
|
|
discovery_spec_enabled = true
|
|
resource_spec_type = "STORAGE_BUCKET"
|
|
}
|
|
}
|
|
},
|
|
zone_2 = {
|
|
type = "CURATED"
|
|
discovery = true
|
|
assets = {
|
|
asset_2 = {
|
|
bucket_name = "asset_2"
|
|
cron_schedule = "15 15 * * *"
|
|
discovery_spec_enabled = true
|
|
resource_spec_type = "STORAGE_BUCKET"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
# tftest modules=1 resources=5
|
|
```
|
|
## TODO
|
|
|
|
- [ ] Add IAM support
|
|
- [ ] support different type of assets
|
|
- [ ] support multi-regions
|
|
<!-- BEGIN TFDOC -->
|
|
|
|
## Variables
|
|
|
|
| name | description | type | required | default |
|
|
|---|---|:---:|:---:|:---:|
|
|
| [name](variables.tf#L23) | Name of Dataplex Lake. | <code>string</code> | ✓ | |
|
|
| [prefix](variables.tf#L28) | Optional prefix used to generate Dataplex Lake. | <code>string</code> | ✓ | |
|
|
| [project_id](variables.tf#L33) | The ID of the project where this Dataplex Lake will be created. | <code>string</code> | ✓ | |
|
|
| [region](variables.tf#L38) | Region of the Dataplax Lake. | <code>string</code> | ✓ | |
|
|
| [zones](variables.tf#L43) | Dataplex lake zones, such as `RAW` and `CURATED`. | <code title="map(object({ type = string discovery = optional(bool, true) assets = map(object({ bucket_name = string cron_schedule = optional(string, "15 15 * * *") discovery_spec_enabled = optional(bool, true) resource_spec_type = optional(string, "STORAGE_BUCKET") })) }))">map(object({…}))</code> | ✓ | |
|
|
| [location_type](variables.tf#L17) | The location type of the Dataplax Lake. | <code>string</code> | | <code>"SINGLE_REGION"</code> |
|
|
|
|
## Outputs
|
|
|
|
| name | description | sensitive |
|
|
|---|---|:---:|
|
|
| [assets](outputs.tf#L17) | Assets attached to the lake of Dataplex Lake. | |
|
|
| [id](outputs.tf#L22) | Fully qualified Dataplex Lake id. | |
|
|
| [lake](outputs.tf#L27) | The lake name of Dataplex Lake. | |
|
|
| [zones](outputs.tf#L32) | The zone name of Dataplex Lake. | |
|
|
|
|
<!-- END TFDOC -->
|