|
| 1 | +--- |
| 2 | +subcategory: "AWS" |
| 3 | +--- |
| 4 | +# databricks_mws_vpc_endpoint Resource |
| 5 | + |
| 6 | +-> **Public Preview** This feature is in [Public Preview](https://docs.databricks.com/release-notes/release-types.html). Contact your Databricks representative to request access. |
| 7 | + |
| 8 | +Connects [aws_vpc_endpoint](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_endpoint) with [databricks_mws_networks](mws_networks.md) through PrivateLink. |
| 9 | + |
| 10 | +## Example Usage |
| 11 | + |
| 12 | +-> **Note** This resource has an evolving API, which will change in the upcoming versions of the provider in order to simplify user experience. |
| 13 | + |
| 14 | +```hcl |
| 15 | +resource "aws_vpc_endpoint" "relay" { |
| 16 | + service_name = local.private_link.relay_endpoint |
| 17 | + vpc_id = aws_vpc.main.id |
| 18 | + vpc_endpoint_type = "Interface" |
| 19 | + security_group_ids = [aws_security_group.this.id] |
| 20 | + subnet_ids = [aws_subnet.databricks_endpoints.id] |
| 21 | + tags = { |
| 22 | + "Name" = "${var.workspace_name}-databricks-relay" |
| 23 | + } |
| 24 | +} |
| 25 | +
|
| 26 | +resource "databricks_mws_vpc_endpoint" "relay" { |
| 27 | + account_id = var.databricks_account_id |
| 28 | + aws_vpc_endpoint_id = aws_vpc_endpoint.relay.id |
| 29 | + vpc_endpoint_name = "VPC Relay for ${aws_vpc.main.id}" |
| 30 | + region = local.region |
| 31 | +} |
| 32 | +
|
| 33 | +resource "databricks_mws_networks" "this" { |
| 34 | + # ... |
| 35 | +
|
| 36 | + vpc_endpoints { |
| 37 | + dataplane_relay = [databricks_mws_vpc_endpoint.relay.vpc_endpoint_id] |
| 38 | +
|
| 39 | + # rest_api VPC endpoint is created in a similar way |
| 40 | + rest_api = [databricks_mws_vpc_endpoint.rest.vpc_endpoint_id] |
| 41 | + } |
| 42 | +} |
| 43 | +``` |
| 44 | + |
| 45 | +## Argument Reference |
| 46 | + |
| 47 | +The following arguments are required: |
| 48 | + |
| 49 | +* `account_id` - Account Id that could be found in the bottom left corner of [Accounts Console](https://accounts.cloud.databricks.com/) |
| 50 | +* `aws_vpc_endpoint_id` - ID of configured [aws_vpc_endpoint](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_endpoint) |
| 51 | +* `vpc_endpoint_name` - Name of VPC Endpoint in Databricks Account |
| 52 | +* `aws_endpoint_service_id` - ID of Databricks VPC endpoint service to connect to. Please contact your Databricks representative to request mapping |
| 53 | +* `region` - Region of AWS VPC |
| 54 | + |
| 55 | +## Attribute Reference |
| 56 | + |
| 57 | +In addition to all arguments above, the following attributes are exported: |
| 58 | + |
| 59 | +* `vpc_endpoint_id` - Canonical unique identifier of VPC Endpoint in Databricks Account |
| 60 | +* `state` - State of VPC Endpoint |
0 commit comments