Skip to content

Commit

Permalink
CDPCP-11561_2 - unifying image name field names over the object and s…
Browse files Browse the repository at this point in the history
…chema
  • Loading branch information
gregito committed Aug 26, 2024
1 parent 7b13c3a commit ba271a4
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/resources/datalake_aws_datalake.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Required:

Optional:

- `catalog` (String)
- `catalog_name` (String)
- `os` (String)


Expand Down
51 changes: 49 additions & 2 deletions docs/resources/datalake_azure_datalake.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,54 @@ description: |-

A Data Lake is a service which provides a protective ring around the data stored in a cloud object store, including authentication, authorization, and governance support.


## Example Usage

```terraform
// Copyright 2024 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_datalake_azure_datalake" "example" {
datalake_name = "<value>"
environment_name = "<value>"
managed_identity = "<value>"
storage_location_base = "<value>"
}
output "name" {
value = cdp_datalake_azure_datalake.example.datalake_name
}
output "environment" {
value = cdp_datalake_azure_datalake.example.environment_name
}
output "instance_profile" {
value = cdp_datalake_azure_datalake.example.managed_identity
}
output "storage_bucket_location" {
value = cdp_datalake_azure_datalake.example.storage_location_base
}
output "recipes" {
value = cdp_datalake_azure_datalake.example.recipes
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -55,7 +102,7 @@ Required:

Optional:

- `catalog` (String)
- `catalog_name` (String)
- `os` (String)


Expand Down
44 changes: 44 additions & 0 deletions examples/resources/cdp_datalake_azure_datalake/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2024 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_datalake_azure_datalake" "example" {
datalake_name = "<value>"
environment_name = "<value>"
managed_identity = "<value>"
storage_location_base = "<value>"
}

output "name" {
value = cdp_datalake_azure_datalake.example.datalake_name
}

output "environment" {
value = cdp_datalake_azure_datalake.example.environment_name
}

output "instance_profile" {
value = cdp_datalake_azure_datalake.example.managed_identity
}

output "storage_bucket_location" {
value = cdp_datalake_azure_datalake.example.storage_location_base
}

output "recipes" {
value = cdp_datalake_azure_datalake.example.recipes
}
2 changes: 1 addition & 1 deletion resources/datalake/schema_aws_datalake.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ var awsDatalakeResourceSchema = schema.Schema{
"image": schema.SingleNestedAttribute{
Optional: true,
Attributes: map[string]schema.Attribute{
"catalog": schema.StringAttribute{
"catalog_name": schema.StringAttribute{
Optional: true,
},
"id": schema.StringAttribute{
Expand Down
2 changes: 1 addition & 1 deletion resources/datalake/schema_azure_datalake.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ var azureDatalakeResourceSchema = schema.Schema{
"image": schema.SingleNestedAttribute{
Optional: true,
Attributes: map[string]schema.Attribute{
"catalog": schema.StringAttribute{
"catalog_name": schema.StringAttribute{
Optional: true,
},
"id": schema.StringAttribute{
Expand Down

0 comments on commit ba271a4

Please sign in to comment.