@@ -24,8 +24,8 @@ resource "astra_private_link_endpoint" "example" {
24
24
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started#adding-credentials
25
25
provider "google" {
26
26
project = " my-project"
27
- region = " us-east1"
28
- zone = " us-east1-b"
27
+ region = " us-east1"
28
+ zone = " us-east1-b"
29
29
}
30
30
31
31
resource "astra_private_link" "example" {
@@ -35,32 +35,32 @@ resource "astra_private_link" "example" {
35
35
}
36
36
37
37
resource "google_compute_network" "example" {
38
- name = " example-network"
39
- auto_create_subnetworks = false
38
+ name = " example-network"
39
+ auto_create_subnetworks = false
40
40
}
41
41
42
42
resource "google_compute_subnetwork" "example" {
43
- name = " example-subnetwork"
44
- ip_cidr_range = " 10.142.0.0/20"
45
- region = " us-east1"
46
- network = google_compute_network. example . id
43
+ name = " example-subnetwork"
44
+ ip_cidr_range = " 10.142.0.0/20"
45
+ region = " us-east1"
46
+ network = google_compute_network. example . id
47
47
}
48
48
49
49
resource "google_compute_address" "example" {
50
- name = " endpoint-address"
51
- subnetwork = google_compute_subnetwork. example . id
52
- address_type = " INTERNAL"
53
- region = " us-east1"
50
+ name = " endpoint-address"
51
+ subnetwork = google_compute_subnetwork. example . id
52
+ address_type = " INTERNAL"
53
+ region = " us-east1"
54
54
}
55
55
56
56
resource "google_compute_forwarding_rule" "example" {
57
- name = " psc-endpoint"
58
- target = " https://www.googleapis.com/compute/v1/${ astra_private_link . example . service_name } "
59
- project = google_compute_network. example . project
60
- ip_address = google_compute_address. example . id
61
- network = google_compute_network. example . id
62
- region = " us-east1"
63
- load_balancing_scheme = " "
57
+ name = " psc-endpoint"
58
+ target = " https://www.googleapis.com/compute/v1/${ astra_private_link . example . service_name } "
59
+ project = google_compute_network. example . project
60
+ ip_address = google_compute_address. example . id
61
+ network = google_compute_network. example . id
62
+ region = " us-east1"
63
+ load_balancing_scheme = " "
64
64
}
65
65
66
66
# The endpoint ID (PSC Connection ID) is not currently accessible from the google_compute_forwarding_rule terraform object.
@@ -120,8 +120,8 @@ resource "azurerm_private_endpoint" "example" {
120
120
# you will have to destroy and recreate the azurerm_private_endpoint resource in order to
121
121
# reconnect and Astra private link endpoint.
122
122
resource "astra_private_link_endpoint" "az_private_link_endpoint" {
123
- database_id = " a6bc9c26-e7ce-424f-84c7-0a00afb12588"
124
- datacenter_id = " a6bc9c26-e7ce-424f-84c7-0a00afb12588-1"
123
+ database_id = " a6bc9c26-e7ce-424f-84c7-0a00afb12588"
124
+ datacenter_id = " a6bc9c26-e7ce-424f-84c7-0a00afb12588-1"
125
125
endpoint_id = " ${ data . azurerm_resource_group . example . id } /providers/Microsoft.Network/privateEndpoints/${ azurerm_private_endpoint . example . name } "
126
126
}
127
127
0 commit comments