Skip to content

Commit 22d8bab

Browse files
authored
Merge pull request #864 from ovh/dev/aamstutz/fix-ip-move-import
fix: ovh_ip_move: Fix import and add doc
2 parents b693c46 + ac3ecf9 commit 22d8bab

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

ovh/resource_ip_move.go

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ func resourceIpServiceMove() *schema.Resource {
3535

3636
Importer: &schema.ResourceImporter{
3737
State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
38+
d.Set("ip", d.Id())
3839
return []*schema.ResourceData{d}, nil
3940
},
4041
},

website/docs/r/ip_move.html.markdown

+8
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,11 @@ Attributes are mostly the same as for [ovh_ip_service](https://registry.terrafor
5454
* `type` - Possible values for ip type
5555
* `task_status` - Status field of the current IP task that is in charge of changing the service the IP is attached to
5656
* `task_start_date` - Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
57+
58+
## Import
59+
60+
The resource can be imported using the `ip` field, e.g.,
61+
62+
```bash
63+
$ terraform import ovh_ip_move.mv '1.2.3.4/32'
64+
```

0 commit comments

Comments
 (0)