Skip to content

Commit 9c6c7d4

Browse files
Remove edgecontainer vpnconnection import rule (#9764) (#6834)
* Add self link to edgecontainer vpnconnection * Add self link to edgecontainer vpnconnection [upstream:5ebba224ba354f799fefc143f72c8ec7f4c22f6d] Signed-off-by: Modular Magician <[email protected]>
1 parent 4228df6 commit 9c6c7d4

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.changelog/9764.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
edgecontainer: fixed resource import on `google_edgecontainer_vpn_connection`
3+
```

google-beta/services/edgecontainer/resource_edgecontainer_vpn_connection.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,9 @@ func resourceEdgecontainerVpnConnectionDelete(d *schema.ResourceData, meta inter
543543
func resourceEdgecontainerVpnConnectionImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
544544
config := meta.(*transport_tpg.Config)
545545
if err := tpgresource.ParseImportId([]string{
546-
"^projects/(?P<project>[^/]+)/locations/(?P<location>[^/]+)/vpnConnections$",
547-
"^(?P<project>[^/]+)/(?P<location>[^/]+)$",
548-
"^(?P<location>[^/]+)$",
546+
"^projects/(?P<project>[^/]+)/locations/(?P<location>[^/]+)/vpnConnections/(?P<name>[^/]+)$",
547+
"^(?P<project>[^/]+)/(?P<location>[^/]+)/(?P<name>[^/]+)$",
548+
"^(?P<location>[^/]+)/(?P<name>[^/]+)$",
549549
}, d, config); err != nil {
550550
return nil, err
551551
}

website/docs/r/edgecontainer_vpn_connection.html.markdown

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,26 +211,26 @@ This resource provides the following
211211

212212
VpnConnection can be imported using any of these accepted formats:
213213

214-
* `projects/{{project}}/locations/{{location}}/vpnConnections`
215-
* `{{project}}/{{location}}`
216-
* `{{location}}`
214+
* `projects/{{project}}/locations/{{location}}/vpnConnections/{{name}}`
215+
* `{{project}}/{{location}}/{{name}}`
216+
* `{{location}}/{{name}}`
217217

218218

219219
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import VpnConnection using one of the formats above. For example:
220220

221221
```tf
222222
import {
223-
id = "projects/{{project}}/locations/{{location}}/vpnConnections"
223+
id = "projects/{{project}}/locations/{{location}}/vpnConnections/{{name}}"
224224
to = google_edgecontainer_vpn_connection.default
225225
}
226226
```
227227

228228
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), VpnConnection can be imported using one of the formats above. For example:
229229

230230
```
231-
$ terraform import google_edgecontainer_vpn_connection.default projects/{{project}}/locations/{{location}}/vpnConnections
232-
$ terraform import google_edgecontainer_vpn_connection.default {{project}}/{{location}}
233-
$ terraform import google_edgecontainer_vpn_connection.default {{location}}
231+
$ terraform import google_edgecontainer_vpn_connection.default projects/{{project}}/locations/{{location}}/vpnConnections/{{name}}
232+
$ terraform import google_edgecontainer_vpn_connection.default {{project}}/{{location}}/{{name}}
233+
$ terraform import google_edgecontainer_vpn_connection.default {{location}}/{{name}}
234234
```
235235

236236
## User Project Overrides

0 commit comments

Comments
 (0)