Skip to content

Commit

Permalink
CDPCP-11322 - DL recipes should not be an attributeless SetNestedAttr…
Browse files Browse the repository at this point in the history
…ibute (#82)
gregito authored Feb 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 750c077 commit f70e2a6
Showing 9 changed files with 94 additions and 28 deletions.
37 changes: 26 additions & 11 deletions docs/resources/datalake_aws_datalake.md
Original file line number Diff line number Diff line change
@@ -31,10 +31,24 @@ terraform {
}
resource "cdp_datalake_aws_datalake" "example" {
datalake_name = "<value>"
environment_name = "<value>"
instance_profile = "<value>"
storage_bucket_location = "<value>"
datalake_name = "<value>"
environment_name = "<value>"
instance_profile = "<value>"
storage_location_base = "<value>"
recipes = [
{
instance_group_name = "master"
recipe_names = [
"<your-recipe>",
]
},
{
instance_group_name = "idbroker"
recipe_names = [
"<your-recipe>",
]
}
]
}
output "name" {
@@ -50,7 +64,11 @@ output "instance_profile" {
}
output "storage_bucket_location" {
value = cdp_datalake_aws_datalake.example.storage_bucket_location
value = cdp_datalake_aws_datalake.example.storage_location_base
}
output "recipes" {
value = cdp_datalake_aws_datalake.example.recipes
}
```

@@ -113,6 +131,7 @@ Required:
Optional:

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


<a id="nestedatt--polling_options"></a>
@@ -128,12 +147,8 @@ Optional:

Required:

- `instance_group_name` (String)
- `recipe_names` (Attributes Set) (see [below for nested schema](#nestedatt--recipes--recipe_names))

<a id="nestedatt--recipes--recipe_names"></a>
### Nested Schema for `recipes.recipe_names`

- `instance_group_name` (String) The name of the designated instance group.
- `recipe_names` (Set of String) The set of recipe names that are going to be applied on the given instance group.


<a id="nestedatt--cloudera_manager"></a>
9 changes: 3 additions & 6 deletions docs/resources/datalake_azure_datalake.md
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@ Required:
Optional:

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


<a id="nestedatt--polling_options"></a>
@@ -71,12 +72,8 @@ Optional:

Required:

- `instance_group_name` (String)
- `recipe_names` (Attributes Set) (see [below for nested schema](#nestedatt--recipes--recipe_names))

<a id="nestedatt--recipes--recipe_names"></a>
### Nested Schema for `recipes.recipe_names`

- `instance_group_name` (String) The name of the designated instance group.
- `recipe_names` (Set of String) The set of recipe names that are going to be applied on the given instance group.


<a id="nestedatt--cloudera_manager"></a>
1 change: 1 addition & 0 deletions docs/resources/datalake_gcp_datalake.md
Original file line number Diff line number Diff line change
@@ -111,6 +111,7 @@ Required:
Optional:

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


<a id="nestedatt--polling_options"></a>
1 change: 1 addition & 0 deletions docs/resources/environments_aws_environment.md
Original file line number Diff line number Diff line change
@@ -138,6 +138,7 @@ Optional:
- `instance_count_by_group` (Number)
- `instance_type` (String)
- `multi_az` (Boolean)
- `os` (String)
- `recipes` (Set of String)


2 changes: 2 additions & 0 deletions docs/resources/environments_azure_environment.md
Original file line number Diff line number Diff line change
@@ -141,6 +141,7 @@ Optional:

- `aks_private_dns_zone_id` (String)
- `database_private_dns_zone_id` (String)
- `flexible_server_subnet_ids` (Set of String)


<a id="nestedatt--freeipa"></a>
@@ -152,6 +153,7 @@ Optional:
- `image_id` (String)
- `instance_count_by_group` (Number)
- `instance_type` (String)
- `os` (String)
- `recipes` (Set of String)


26 changes: 26 additions & 0 deletions docs/resources/environments_azure_image_terms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cdp_environments_azure_image_terms Resource - terraform-provider-cdp"
subcategory: ""
description: |-
Updates account level Azure Marketplace image policy. CDP is capable to automatically accept Azure Marketplace image terms during cluster deployment. You can use this setting in your account to opt in or opt out this behaviour.
---

# cdp_environments_azure_image_terms (Resource)

Updates account level Azure Marketplace image policy. CDP is capable to automatically accept Azure Marketplace image terms during cluster deployment. You can use this setting in your account to opt in or opt out this behaviour.



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `accepted` (Boolean) Flag to enable or disable automatic acceptance of Azure Marketplace image terms.

### Read-Only

- `id` (String) The ID of this resource.


28 changes: 23 additions & 5 deletions examples/resources/cdp_datalake_aws_datalake/resource.tf
Original file line number Diff line number Diff line change
@@ -17,10 +17,24 @@ terraform {
}

resource "cdp_datalake_aws_datalake" "example" {
datalake_name = "<value>"
environment_name = "<value>"
instance_profile = "<value>"
storage_bucket_location = "<value>"
datalake_name = "<value>"
environment_name = "<value>"
instance_profile = "<value>"
storage_location_base = "<value>"
recipes = [
{
instance_group_name = "master"
recipe_names = [
"<your-recipe>",
]
},
{
instance_group_name = "idbroker"
recipe_names = [
"<your-recipe>",
]
}
]
}

output "name" {
@@ -36,5 +50,9 @@ output "instance_profile" {
}

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

output "recipes" {
value = cdp_datalake_aws_datalake.example.recipes
}
9 changes: 6 additions & 3 deletions resources/datalake/schema_aws_datalake.go
Original file line number Diff line number Diff line change
@@ -308,10 +308,13 @@ var awsDatalakeResourceSchema = schema.Schema{
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"instance_group_name": schema.StringAttribute{
Required: true,
MarkdownDescription: "The name of the designated instance group.",
Required: true,
},
"recipe_names": schema.SetNestedAttribute{
Required: true,
"recipe_names": schema.SetAttribute{
MarkdownDescription: "The set of recipe names that are going to be applied on the given instance group.",
ElementType: types.StringType,
Required: true,
},
},
},
9 changes: 6 additions & 3 deletions resources/datalake/schema_azure_datalake.go
Original file line number Diff line number Diff line change
@@ -288,10 +288,13 @@ var azureDatalakeResourceSchema = schema.Schema{
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"instance_group_name": schema.StringAttribute{
Required: true,
MarkdownDescription: "The name of the designated instance group.",
Required: true,
},
"recipe_names": schema.SetNestedAttribute{
Required: true,
"recipe_names": schema.SetAttribute{
MarkdownDescription: "The set of recipe names that are going to be applied on the given instance group.",
ElementType: types.StringType,
Required: true,
},
},
},

0 comments on commit f70e2a6

Please sign in to comment.