@@ -144,6 +144,52 @@ resource "google_sql_database_instance" "instance" {
144
144
` , context )
145
145
}
146
146
147
+ func TestAccCGCSnippet_sqlSqlserverInstanceAuthorizedNetworkExample (t * testing.T ) {
148
+ t .Parallel ()
149
+
150
+ context := map [string ]interface {}{
151
+ "random_suffix" : randString (t , 10 ),
152
+ }
153
+
154
+ vcrTest (t , resource.TestCase {
155
+ PreCheck : func () { testAccPreCheck (t ) },
156
+ Providers : testAccProviders ,
157
+ Steps : []resource.TestStep {
158
+ {
159
+ Config : testAccCGCSnippet_sqlSqlserverInstanceAuthorizedNetworkExample (context ),
160
+ },
161
+ {
162
+ ResourceName : "google_sql_database_instance.default" ,
163
+ ImportState : true ,
164
+ ImportStateVerify : true ,
165
+ ImportStateVerifyIgnore : []string {"deletion_protection" , "root_password" },
166
+ },
167
+ },
168
+ })
169
+ }
170
+
171
+ func testAccCGCSnippet_sqlSqlserverInstanceAuthorizedNetworkExample (context map [string ]interface {}) string {
172
+ return Nprintf (`
173
+ resource "google_sql_database_instance" "default" {
174
+ name = "myinstance%{random_suffix}"
175
+ region = "us-central1"
176
+ database_version = "SQLSERVER_2017_STANDARD"
177
+ root_password = "INSERT-PASSWORD-HERE"
178
+ settings {
179
+ tier = "db-custom-2-7680"
180
+ ip_configuration {
181
+ authorized_networks {
182
+ name = "Network Name"
183
+ value = "192.0.2.0/24"
184
+ expiration_time = "3021-11-15T16:19:00.094Z"
185
+ }
186
+ }
187
+ }
188
+ deletion_protection = false
189
+ }
190
+ ` , context )
191
+ }
192
+
147
193
func TestAccCGCSnippet_storageNewBucketExample (t * testing.T ) {
148
194
t .Parallel ()
149
195
0 commit comments