forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Cloud SQL postgres + authorized network example (GoogleCloudPla…
…tform#5792) * Added Cloud SQL postgres with authorized network example for inclusion in CGC docs * Added missing primary_resource_type * Fixed deletion protection * Added Cloud SQL postgres + authorized network example
- Loading branch information
1 parent
4b92eb7
commit 88b79e5
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
mmv1/templates/terraform/examples/sql_postgres_instance_authorized_network.tf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# [START cloud_sql_postgres_instance_authorized_network] | ||
resource "google_sql_database_instance" "<%= ctx[:primary_resource_id] %>" { | ||
name = "<%= ctx[:vars]['postgres_instance_with_authorized_network'] %>" | ||
region = "us-central1" | ||
database_version = "POSTGRES_12" | ||
settings { | ||
tier = "db-custom-2-7680" | ||
ip_configuration { | ||
authorized_networks { | ||
name = "Network Name" | ||
value = "192.0.2.0/24" | ||
expiration_time = "3021-11-15T16:19:00.094Z" | ||
} | ||
} | ||
} | ||
deletion_protection = "<%= ctx[:vars]['deletion_protection'] %>" | ||
} | ||
# [END cloud_sql_postgres_instance_authorized_network] |