-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CDPCP-13591 Cloudera Data Warehouse - Data Visualization Support (#192)
Running `terraform apply -auto-apply`: ``` Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # cdp_dw_data_visualization.viq-terraform-example will be created + resource "cdp_dw_data_visualization" "viq-terraform-example" { + admin_groups = [ + "dwx-viz", ] + cluster_id = "env-v5sxzr" + id = (known after apply) + image_version = (known after apply) + last_updated = (known after apply) + name = "viq-terraform-test" + resource_template = "viz-low" + status = (known after apply) + user_groups = [ + "dwx-viz", ] } Plan: 1 to add, 0 to change, 0 to destroy. cdp_dw_data_visualization.viq-terraform-example: Creating... cdp_dw_data_visualization.viq-terraform-example: Still creating... [10s elapsed] .... cdp_dw_data_visualization.viq-terraform-example: Still creating... [1m30s elapsed] cdp_dw_data_visualization.viq-terraform-example: Creation complete after 1m35s [id=viz-1734702099-rc6s] Apply complete! Resources: 1 added, 0 changed, 0 destroyed. ``` ---- Running `terraform apply -auto-apply -destroy`: ``` Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: - destroy Terraform will perform the following actions: # cdp_dw_data_visualization.viq-terraform-example will be destroyed - resource "cdp_dw_data_visualization" "viq-terraform-example" { - admin_groups = [ - "dwx-viz", ] -> null - cluster_id = "env-v5sxzr" -> null - id = "viz-1734702099-rc6s" -> null - image_version = "7.2.7-b48" -> null - last_updated = "Friday, 20-Dec-24 14:43:14 CET" -> null - name = "viq-terraform-test" -> null - resource_template = "viz-low" -> null - status = "Running" -> null - user_groups = [ - "dwx-viz", ] -> null } Plan: 0 to add, 0 to change, 1 to destroy. cdp_dw_data_visualization.viq-terraform-example: Destroying... [id=viz-1734702099-rc6s] cdp_dw_data_visualization.viq-terraform-example: Still destroying... [id=viz-1734702099-rc6s, 10s elapsed] cdp_dw_data_visualization.viq-terraform-example: Still destroying... [id=viz-1734702099-rc6s, 21s elapsed] cdp_dw_data_visualization.viq-terraform-example: Still destroying... [id=viz-1734702099-rc6s, 31s elapsed] cdp_dw_data_visualization.viq-terraform-example: Destruction complete after 33s Apply complete! Resources: 0 added, 0 changed, 1 destroyed. ```
- Loading branch information
Showing
18 changed files
with
1,367 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
page_title: "cdp_dw_data_visualization Resource - terraform-provider-cdp" | ||
subcategory: "Data Warehouse" | ||
description: |- | ||
Cloudera Data Warehouse (CDW) integrates Data Visualization https://docs.cloudera.com/data-warehouse/cloud/managing-warehouses/topics/dw-use-data-visualization.html for building graphic representations of data, dashboards, and visual applications based on CDW data. | ||
--- | ||
|
||
# cdp_dw_data_visualization (Resource) | ||
|
||
Cloudera Data Warehouse (CDW) integrates [Data Visualization](https://docs.cloudera.com/data-warehouse/cloud/managing-warehouses/topics/dw-use-data-visualization.html) for building graphic representations of data, dashboards, and visual applications based on CDW data. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
## Copyright 2025 Cloudera. All Rights Reserved. | ||
# | ||
# This file is licensed under the Apache License Version 2.0 (the "License"). | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS | ||
# OF ANY KIND, either express or implied. Refer to the License for the specific | ||
# permissions and limitations governing your use of the file. | ||
terraform { | ||
required_providers { | ||
cdp = { | ||
source = "cloudera/cdp" | ||
} | ||
} | ||
} | ||
resource "cdp_dw_data_visualization" "example" { | ||
cluster_id = "env-id" | ||
name = "data-visualization" | ||
image_version = "7.2.7-b48" | ||
resource_template = "viz-default" | ||
user_groups = ["ugrp0", "ugrp1"] | ||
admin_groups = ["admgrp0", "admgrp1"] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `admin_groups` (List of String) List of the LDAP groups which can administer this Data Visualization instance. At least one valid group is required. | ||
- `cluster_id` (String) The id of the CDW Cluster which the Data Visualization is attached to. | ||
- `name` (String) The name of the Data Visualization. | ||
- `user_groups` (List of String) List of the LDAP groups which have access to this Data Visualization instance. It might be an empty list. | ||
|
||
### Optional | ||
|
||
- `image_version` (String) The version of the Data Visualization. | ||
- `polling_options` (Attributes) Polling related configuration options that could specify various values that will be used during CDP resource creation. (see [below for nested schema](#nestedatt--polling_options)) | ||
- `resource_template` (String) The name of the resource template being used. Available options: viz-default, viz-low, viz-medium, viz-large. Empty means the default resources template will be assigned. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `last_updated` (String) Timestamp of the last Terraform update of the order. | ||
- `status` (String) The status of the Data Visualization. | ||
|
||
<a id="nestedatt--polling_options"></a> | ||
### Nested Schema for `polling_options` | ||
|
||
Optional: | ||
|
||
- `async` (Boolean) Boolean value that specifies if Terraform should wait for resource creation/deletion. | ||
- `call_failure_threshold` (Number) Threshold value that specifies how many times should a single call failure happen before giving up the polling. | ||
- `polling_timeout` (Number) Timeout value in minutes that specifies for how long should the polling go for resource creation/deletion. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
## Copyright 2025 Cloudera. All Rights Reserved. | ||
# | ||
# This file is licensed under the Apache License Version 2.0 (the "License"). | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS | ||
# OF ANY KIND, either express or implied. Refer to the License for the specific | ||
# permissions and limitations governing your use of the file. | ||
|
||
terraform { | ||
required_providers { | ||
cdp = { | ||
source = "cloudera/cdp" | ||
} | ||
} | ||
} | ||
|
||
resource "cdp_dw_data_visualization" "example" { | ||
cluster_id = "env-id" | ||
name = "data-visualization" | ||
image_version = "7.2.7-b48" | ||
|
||
resource_template = "viz-default" | ||
|
||
user_groups = ["ugrp0", "ugrp1"] | ||
admin_groups = ["admgrp0", "admgrp1"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2025 Cloudera. All Rights Reserved. | ||
// | ||
// This file is licensed under the Apache License Version 2.0 (the "License"). | ||
// You may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS | ||
// OF ANY KIND, either express or implied. Refer to the License for the specific | ||
// permissions and limitations governing your use of the file. | ||
|
||
package dataviz | ||
|
||
import ( | ||
"github.com/hashicorp/terraform-plugin-framework/types" | ||
|
||
"github.com/cloudera/terraform-provider-cdp/utils" | ||
) | ||
|
||
type resourceModel struct { | ||
ID types.String `tfsdk:"id"` | ||
ClusterID types.String `tfsdk:"cluster_id"` | ||
Name types.String `tfsdk:"name"` | ||
|
||
ImageVersion types.String `tfsdk:"image_version"` | ||
ResourceTemplate types.String `tfsdk:"resource_template"` | ||
|
||
UserGroups types.List `tfsdk:"user_groups"` | ||
AdminGroups types.List `tfsdk:"admin_groups"` | ||
|
||
LastUpdated types.String `tfsdk:"last_updated"` | ||
Status types.String `tfsdk:"status"` | ||
PollingOptions *utils.PollingOptions `tfsdk:"polling_options"` | ||
} | ||
|
||
func (m *resourceModel) GetPollingOptions() *utils.PollingOptions { | ||
return m.PollingOptions | ||
} |
Oops, something went wrong.