|
| 1 | +--- |
| 2 | +subcategory: "Deployment" |
| 3 | +--- |
| 4 | +# databricks_mws_ncc_private_endpoint_rule Resource |
| 5 | + |
| 6 | +-> **Note** Initialize provider with `alias = "account"`, `host = "https://accounts.azuredatabricks.net"` and use `provider = databricks.account` for all `databricks_mws_*` resources. |
| 7 | + |
| 8 | +-> **Note** This feature is only available in Azure. |
| 9 | + |
| 10 | +Allows you to create a private endpoint in a [Network Connectivity Config](mws_network_connectivity_config.md) that can be used to [configure private connectivity from serverless compute](https://learn.microsoft.com/en-us/azure/databricks/security/network/serverless-network-security/serverless-private-link). |
| 11 | + |
| 12 | +## Example Usage |
| 13 | + |
| 14 | +```hcl |
| 15 | +variable "region" {} |
| 16 | +variable "prefix" {} |
| 17 | +
|
| 18 | +resource "databricks_mws_network_connectivity_config" "ncc" { |
| 19 | + provider = databricks.account |
| 20 | + name = "Network Connectivity Config for ${var.prefix}" |
| 21 | + region = var.region |
| 22 | +} |
| 23 | +
|
| 24 | +resource "databricks_mws_ncc_private_endpoint_rule" "storage" { |
| 25 | + provider = databricks.account |
| 26 | + network_connectivity_config_id = databricks_mws_network_connectivity_config.ncc.network_connectivity_config_id |
| 27 | + resource_id = "/subscriptions/653bb673-1234-abcd-a90b-d064d5d53ca4/resourcegroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/examplesa" |
| 28 | + group_id = "blob" |
| 29 | +} |
| 30 | +``` |
| 31 | + |
| 32 | +## Argument Reference |
| 33 | + |
| 34 | +The following arguments are available: |
| 35 | + |
| 36 | +* `network_connectivity_config_id` - Canonical unique identifier of Network Connectivity Config in Databricks Account. Change forces creation of a new resource. |
| 37 | +* `resource_id` - The Azure resource ID of the target resource. Change forces creation of a new resource. |
| 38 | +* `group_id` - The sub-resource type (group ID) of the target resource. Must be one of `blob`, `dfs`, `sqlServer` or `mysqlServer`. 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. |
| 39 | + |
| 40 | +## Attribute Reference |
| 41 | + |
| 42 | +In addition to all arguments above, the following attributes are exported: |
| 43 | + |
| 44 | +* `rule_id`- the ID of a private endpoint rule. |
| 45 | +* `endpoint_name` - The name of the Azure private endpoint resource, e.g. "databricks-088781b3-77fa-4132-b429-1af0d91bc593-pe-3cb31234" |
| 46 | +* `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. |
| 47 | +The possible values are: |
| 48 | + * `PENDING`: The endpoint has been created and pending approval. |
| 49 | + * `ESTABLISHED`: The endpoint has been approved and is ready to be used in your serverless compute resources. |
| 50 | + * `REJECTED`: Connection was rejected by the private link resource owner. |
| 51 | + * `DISCONNECTED`: Connection was removed by the private link resource owner, the private endpoint becomes informative and should be deleted for clean-up. |
| 52 | +* `deactivated` - Whether this private endpoint is deactivated. |
| 53 | +* `deactivated_at` - Time in epoch milliseconds when this object was deactivated. |
| 54 | +* `creation_time` - Time in epoch milliseconds when this object was created. |
| 55 | +* `updated_time` - Time in epoch milliseconds when this object was updated. |
| 56 | + |
| 57 | +## Import |
| 58 | + |
| 59 | +This resource can be imported by Databricks account ID and Network Connectivity Config ID. |
| 60 | + |
| 61 | +```sh |
| 62 | +terraform import databricks_mws_ncc_private_endpoint_rule.rule <network_connectivity_config_id>/<rule_id> |
| 63 | +``` |
| 64 | + |
| 65 | +## Related Resources |
| 66 | + |
| 67 | +The following resources are used in the context: |
| 68 | + |
| 69 | +* [databricks_mws_network_connectivity_config](mws_network_connectivity_config.md) to create Network Connectivity Config objects. |
| 70 | +* [databricks_mws_ncc_binding](mws_ncc_binding.md) to attach an NCC to a workspace. |
0 commit comments