mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-09 03:28:29 +00:00
Add google-beta to SQL private docs (#3368)
<!-- This change is generated by MagicModules. --> Original Author: @rileykarson
This commit is contained in:
parent
d544f6434d
commit
28be0e968d
|
@ -113,38 +113,51 @@ resource "google_sql_database_instance" "postgres" {
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
resource "google_compute_network" "private_network" {
|
resource "google_compute_network" "private_network" {
|
||||||
name = "private-network"
|
provider = "google-beta"
|
||||||
|
|
||||||
|
name = "private-network"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "google_compute_global_address" "private_ip_address" {
|
resource "google_compute_global_address" "private_ip_address" {
|
||||||
name = "private-ip-address"
|
provider = "google-beta"
|
||||||
purpose = "VPC_PEERING"
|
|
||||||
address_type = "INTERNAL"
|
name = "private-ip-address"
|
||||||
prefix_length = 16
|
purpose = "VPC_PEERING"
|
||||||
network = "${google_compute_network.private_network.self_link}"
|
address_type = "INTERNAL"
|
||||||
|
prefix_length = 16
|
||||||
|
network = "${google_compute_network.private_network.self_link}"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "google_service_networking_connection" "private_vpc_connection" {
|
resource "google_service_networking_connection" "private_vpc_connection" {
|
||||||
network = "${google_compute_network.private_network.self_link}"
|
provider = "google-beta"
|
||||||
service = "servicenetworking.googleapis.com"
|
|
||||||
reserved_peering_ranges = ["${google_compute_global_address.private_ip_address.name}"]
|
network = "${google_compute_network.private_network.self_link}"
|
||||||
|
service = "servicenetworking.googleapis.com"
|
||||||
|
reserved_peering_ranges = ["${google_compute_global_address.private_ip_address.name}"]
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "google_sql_database_instance" "instance" {
|
resource "google_sql_database_instance" "instance" {
|
||||||
|
provider = "google-beta"
|
||||||
|
|
||||||
name = "private-instance"
|
name = "private-instance"
|
||||||
region = "us-central1"
|
region = "us-central1"
|
||||||
|
|
||||||
depends_on = [
|
depends_on = [
|
||||||
"google_service_networking_connection.private_vpc_connection"
|
"google_service_networking_connection.private_vpc_connection"
|
||||||
]
|
]
|
||||||
|
|
||||||
settings {
|
settings {
|
||||||
tier = "db-f1-micro"
|
tier = "db-f1-micro"
|
||||||
ip_configuration {
|
ip_configuration {
|
||||||
ipv4_enabled = "false"
|
ipv4_enabled = "false"
|
||||||
private_network = "${google_compute_network.private_network.self_link}"
|
private_network = "${google_compute_network.private_network.self_link}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "google-beta"{
|
||||||
|
region = "us-central1"
|
||||||
|
zone = "us-central1-a"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user