Skip to content

Commit e768c8a

Browse files
authored
[Doc] Clarify and add more examples to databricks_mws_network_connectivity_config and databricks_mws_ncc_private_endpoint_rule documentation (#4847)
## Changes Clarify and add more examples to `databricks_mws_network_connectivity_config` and `databricks_mws_ncc_private_endpoint_rule` documentation ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [x] relevant change in `docs/` folder - [x] has entry in `NEXT_CHANGELOG.md` file
1 parent 171d7ca commit e768c8a

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* Update Databricks SQL objects documentation ([#4840](https://github.com/databricks/terraform-provider-databricks/pull/4840))
2828
* Improve documentation for `databricks_git_credential` resource ([#4837](https://github.com/databricks/terraform-provider-databricks/pull/4837))
2929
* Rename DLT references to Lakeflow Declarative pipelines ([#4842](https://github.com/databricks/terraform-provider-databricks/pull/4842))
30+
* Clarify and add more examples to `databricks_mws_network_connectivity_config` and `databricks_mws_ncc_private_endpoint_rule` documentation ([#4847](https://github.com/databricks/terraform-provider-databricks/pull/4847))
3031

3132
### Exporter
3233

docs/resources/mws_ncc_private_endpoint_rule.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Allows you to create a private endpoint in a [Network Connectivity Config](mws_n
1111

1212
## Example Usage
1313

14-
Create a private endpoint to an Azure storage account
14+
Create private endpoints to an Azure storage account and an Azure standard load balancer.
1515

1616
```hcl
1717
variable "region" {}
@@ -29,9 +29,17 @@ resource "databricks_mws_ncc_private_endpoint_rule" "storage" {
2929
resource_id = "/subscriptions/653bb673-1234-abcd-a90b-d064d5d53ca4/resourcegroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/examplesa"
3030
group_id = "blob"
3131
}
32+
33+
resource "databricks_mws_ncc_private_endpoint_rule" "slb" {
34+
provider = databricks.account
35+
network_connectivity_config_id = databricks_mws_network_connectivity_config.ncc.network_connectivity_config_id
36+
resource_id = "/subscriptions/653bb673-1234-abcd-a90b-d064d5d53ca4/resourcegroups/example-resource-group/providers/Microsoft.Network/privatelinkServices/example-private-link-service"
37+
domain_names = ["my-example.exampledomain.com"]
38+
}
39+
3240
```
3341

34-
Create a private endpoint rule to an AWS VPC endpoint and to an S3 bucket
42+
Create a private endpoint rule to an AWS VPC endpoint and to an S3 bucket.
3543

3644
```hcl
3745
variable "region" {}
@@ -46,6 +54,7 @@ resource "databricks_mws_network_connectivity_config" "ncc" {
4654
resource "databricks_mws_ncc_private_endpoint_rule" "storage" {
4755
provider = databricks.account
4856
network_connectivity_config_id = databricks_mws_network_connectivity_config.ncc.network_connectivity_config_id
57+
endpoint_service = "com.amazonaws.us-east-1.s3"
4958
resource_names = ["bucket"]
5059
}
5160
@@ -63,23 +72,27 @@ The following arguments are available:
6372

6473
* `network_connectivity_config_id` - Canonical unique identifier of Network Connectivity Config in Databricks Account. Change forces creation of a new resource.
6574
* `resource_id` - (Azure only) The Azure resource ID of the target resource. Change forces creation of a new resource.
66-
* `group_id` - (Azure only) The sub-resource type (group ID) of the target resource. Must be one of supported resource types (i.e., `blob`, `dfs`, `sqlServer` , etc. Consult the [Azure documentation](https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview#private-link-resource) for full list of supported resources). Note that to connect to workspace root storage (root DBFS), you need two endpoints, one for `blob` and one for `dfs`. Change forces creation of a new resource.
67-
* `domain_names` - (AWS only) Only used by private endpoints towards a VPC endpoint service behind a customer-managed VPC endpoint service. List of target AWS resource FQDNs accessible via the VPC endpoint service. Conflicts with `resource_names`.
75+
* `group_id` - (Azure only) Not used by customer-managed private endpoint services. The sub-resource type (group ID) of the target resource. Must be one of supported resource types (i.e., `blob`, `dfs`, `sqlServer` , etc. Consult the [Azure documentation](https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview#private-link-resource) for full list of supported resources). Note that to connect to workspace root storage (root DBFS), you need two endpoints, one for `blob` and one for `dfs`. Change forces creation of a new resource. Conflicts with `domain_names`.
76+
* `domain_names`
77+
* On Azure: List of domain names of target private link service. Only used by private endpoints to customer-managed private endpoint services. Conflicts with `group_id`.
78+
* On AWS: List of target resource FQDNs accessible via the VPC endpoint service. Only used by private endpoints towards a VPC endpoint service behind a customer-managed VPC endpoint service. Conflicts with `resource_names`.
6879
* `endpoint_service` - (AWS only) Example `com.amazonaws.vpce.us-east-1.vpce-svc-123abcc1298abc123`. The full target AWS endpoint service name that connects to the destination resources of the private endpoint.
6980
* `resource_names` - (AWS only) Only used by private endpoints towards AWS S3 service. List of globally unique S3 bucket names that will be accessed via the VPC endpoint. The bucket names must be in the same region as the NCC/endpoint service. Conflict with `domain_names`.
81+
* `enabled` - (AWS only) Activation status. Only used by private endpoints towards an AWS S3 service. Update this field to activate/deactivate this private endpoint to allow egress access from serverless compute resources. Can only be updated after a private endpoint rule towards an AWS S3 service is successfully created.
7082

7183
## Attribute Reference
7284

7385
In addition to all arguments above, the following attributes are exported:
7486

7587
* `rule_id`- the ID of a private endpoint rule.
7688
* `endpoint_name` - The name of the Azure private endpoint resource, e.g. "databricks-088781b3-77fa-4132-b429-1af0d91bc593-pe-3cb31234"
77-
* `connection_state` - The current status of this private endpoint. The private endpoint rules are effective only if the connection state is ESTABLISHED. Remember that you must approve new endpoints on your resources in the Azure portal before they take effect.
89+
* `connection_state` - The current status of this private endpoint. The private endpoint rules are effective only if the connection state is `ESTABLISHED`. Remember that you must approve new endpoints on your resources in the Azure portal before they take effect.
7890
The possible values are:
7991
* `PENDING`: The endpoint has been created and pending approval.
8092
* `ESTABLISHED`: The endpoint has been approved and is ready to be used in your serverless compute resources.
8193
* `REJECTED`: Connection was rejected by the private link resource owner.
8294
* `DISCONNECTED`: Connection was removed by the private link resource owner, the private endpoint becomes informative and should be deleted for clean-up.
95+
* `EXPIRED`: If the endpoint was created but not approved in 14 days, it will be EXPIRED.
8396
* `deactivated` - Whether this private endpoint is deactivated.
8497
* `deactivated_at` - Time in epoch milliseconds when this object was deactivated.
8598
* `creation_time` - Time in epoch milliseconds when this object was created.

docs/resources/mws_network_connectivity_config.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ resource "databricks_mws_ncc_binding" "ncc_binding" {
3030

3131
The following arguments are available:
3232

33-
* `name` - Name of Network Connectivity Config in Databricks Account. Change forces creation of a new resource.
33+
* `name` - Name of the network connectivity configuration. The name can contain alphanumeric characters, hyphens, and underscores. The length must be between 3 and 30 characters. The name must match the regular expression `^[0-9a-zA-Z-_]{3,30}$`. Change forces creation of a new resource.
3434
* `region` - Region of the Network Connectivity Config. NCCs can only be referenced by your workspaces in the same region. Change forces creation of a new resource.
3535

3636
## Attribute Reference
@@ -39,7 +39,7 @@ In addition to all arguments above, the following attributes are exported:
3939

4040
* `id` - combination of `account_id` and `network_connectivity_config_id` separated by `/` character
4141
* `network_connectivity_config_id` - Canonical unique identifier of Network Connectivity Config in Databricks Account
42-
* `egress_conf` - block containing information about network connectivity rules that apply to network traffic from your serverless compute resources. Consists of the following fields:
42+
* `egress_config` - block containing information about network connectivity rules that apply to network traffic from your serverless compute resources. Consists of the following fields:
4343
* `default_rules` - block describing network connectivity rules that are applied by default without resource specific configurations. Consists of the following fields:
4444
* `aws_stable_ip_rule` (AWS only) - block with information about stable AWS IP CIDR blocks. You can use these to configure the firewall of your resources to allow traffic from your Databricks workspace. Consists of the following fields:
4545
* `cidr_blocks` - list of IP CIDR blocks.
@@ -49,7 +49,9 @@ In addition to all arguments above, the following attributes are exported:
4949
* `target_services` - the Azure services to which this service endpoint rule applies to.
5050
* `target_rules` - block describing network connectivity rules that configured for each destinations. These rules override default rules. Consists of the following fields:
5151
* `azure_private_endpoint_rules` (Azure only) - list containing information about configure Azure Private Endpoints.
52-
52+
* `aws_private_endpoint_rules` (AWS only) - list containing information about configure AWS Private Endpoints.
53+
* `creation_time` - time in epoch milliseconds when this object was created.
54+
* `updated_time` - time in epoch milliseconds when this object was updated.
5355

5456
## Import
5557

0 commit comments

Comments
 (0)