Skip to content

Commit

Permalink
CDPCP-11698 Added mssing fields to Azure Datalake resource
Browse files Browse the repository at this point in the history
  • Loading branch information
daszabo committed Mar 26, 2024
1 parent ec007b4 commit 9244c8b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/resources/datalake_azure_datalake.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ A Data Lake is a service which provides a protective ring around the data stored

- `database_type` (String) The type of the azure database. FLEXIBLE_SERVER is the next generation managed PostgreSQL service in Azure that provides maximum flexibility over your database, built-in cost-optimizations. SINGLE_SERVER is a fully managed database service with minimal requirements for customizations of the database.
- `enable_ranger_raz` (Boolean)
- `flexible_server_delegated_subnet_id` (String) This argument allows you to specify the subnet ID for the subnet within which you want to configure your Azure Flexible Server.
- `image` (Attributes) (see [below for nested schema](#nestedatt--image))
- `java_version` (Number)
- `load_balancer_sku` (String) Represents the Azure load balancer SKU type. The current default is BASIC. To disable the load balancer, use type NONE. Possible values: BASIC, STANDARD, NONE
- `multi_az` (Boolean) Creates CDP datalake distributed across multiple availability zones in an Azure region.
- `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))
- `recipes` (Attributes Set) (see [below for nested schema](#nestedatt--recipes))
- `runtime` (String)
Expand Down
6 changes: 6 additions & 0 deletions resources/datalake/model_azure_datalake.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ type azureDatalakeResourceModel struct {
Tags types.Map `tfsdk:"tags"`

DatabaseType types.String `tfsdk:"database_type"`

LoadBalancerSku types.String `tfsdk:"load_balancer_sku"`

FlexibleServerDelegatedSubnetId types.String `tfsdk:"flexible_server_delegated_subnet_id"`

MultiAz types.Bool `tfsdk:"multi_az"`
}

type azureDatalakeImage struct {
Expand Down
3 changes: 3 additions & 0 deletions resources/datalake/resource_azure_datalake.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ func toAzureDatalakeRequest(ctx context.Context, model *azureDatalakeResourceMod
i++
}
}
req.LoadBalancerSku = datalakemodels.DatalakeLoadBalancerSkuType(model.LoadBalancerSku.ValueString())
req.FlexibleServerDelegatedSubnetID = model.FlexibleServerDelegatedSubnetId.ValueString()
req.MultiAz = model.MultiAz.ValueBoolPointer()
return req
}

Expand Down
12 changes: 12 additions & 0 deletions resources/datalake/schema_azure_datalake.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,5 +335,17 @@ var azureDatalakeResourceSchema = schema.Schema{
Optional: true,
ElementType: types.StringType,
},
"load_balancer_sku": schema.StringAttribute{
MarkdownDescription: "Represents the Azure load balancer SKU type. The current default is BASIC. To disable the load balancer, use type NONE. Possible values: BASIC, STANDARD, NONE",
Optional: true,
},
"flexible_server_delegated_subnet_id": schema.StringAttribute{
MarkdownDescription: "This argument allows you to specify the subnet ID for the subnet within which you want to configure your Azure Flexible Server.",
Optional: true,
},
"multi_az": schema.BoolAttribute{
MarkdownDescription: "Creates CDP datalake distributed across multiple availability zones in an Azure region.",
Optional: true,
},
},
}

0 comments on commit 9244c8b

Please sign in to comment.