@@ -275,6 +275,52 @@ resource "google_sql_database_instance" "default" {
275275` , context )
276276}
277277
278+ func TestAccCGCSnippet_sqlMysqlInstanceAuthorizedNetworkExample (t * testing.T ) {
279+ t .Parallel ()
280+
281+ context := map [string ]interface {}{
282+ "deletion_protection" : false ,
283+ "random_suffix" : randString (t , 10 ),
284+ }
285+
286+ vcrTest (t , resource.TestCase {
287+ PreCheck : func () { testAccPreCheck (t ) },
288+ Providers : testAccProviders ,
289+ Steps : []resource.TestStep {
290+ {
291+ Config : testAccCGCSnippet_sqlMysqlInstanceAuthorizedNetworkExample (context ),
292+ },
293+ {
294+ ResourceName : "google_sql_database_instance.instance" ,
295+ ImportState : true ,
296+ ImportStateVerify : true ,
297+ ImportStateVerifyIgnore : []string {"deletion_protection" },
298+ },
299+ },
300+ })
301+ }
302+
303+ func testAccCGCSnippet_sqlMysqlInstanceAuthorizedNetworkExample (context map [string ]interface {}) string {
304+ return Nprintf (`
305+ resource "google_sql_database_instance" "instance" {
306+ name = "tf-test-mysql-instance-with-authorized-network%{random_suffix}"
307+ region = "us-central1"
308+ database_version = "MYSQL_5_7"
309+ settings {
310+ tier = "db-f1-micro"
311+ ip_configuration {
312+ authorized_networks {
313+ name = "Network Name"
314+ value = "192.0.2.0/24"
315+ expiration_time = "3021-11-15T16:19:00.094Z"
316+ }
317+ }
318+ }
319+ deletion_protection = "%{deletion_protection}"
320+ }
321+ ` , context )
322+ }
323+
278324func TestAccCGCSnippet_sqlSqlserverInstanceBackupLocationExample (t * testing.T ) {
279325 t .Parallel ()
280326
0 commit comments