Skip to content

Commit 11707cd

Browse files
authored
docs: interaction between instances and reserved ip (#371)
1 parent 3510775 commit 11707cd

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

Diff for: docs/resources/instance_reserved_ip_assignment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |-
88

99
# civo_instance_reserved_ip_assignment (Resource)
1010

11-
The instance reserved ip assignment resource schema definition
11+
The instance reserved ip assignment resource schema definition. If you are using this resource to assign a reserved IP to an instance, instances `public_ip` attribute won't be updated until the next state refresh. If subsequent resources are relying instances public IP consider assigning the reserved ip address to the instance.
1212

1313
## Example Usage
1414

Diff for: docs/resources/reserved_ip.md

+22
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,32 @@ Provides a Civo reserved IP to represent a publicly-accessible static IP address
1212

1313
## Example Usage
1414

15+
A `civo_reserved_ip` can be assigned to an `civo-instance` either by setting `reserved_ipv4` field for `civo-instance` or using `civo_instance_reserved_ip_assignment` resource.
16+
1517
```terraform
1618
resource "civo_reserved_ip" "www" {
1719
name = "nginx-www"
1820
}
21+
22+
resource "civo_instance" "webserver" {
23+
# ... removed for brevity
24+
reserved_ipv4 = civo_reserved_ip.www.ip
25+
}
26+
```
27+
28+
```terraform
29+
resource "civo_reserved_ip" "www" {
30+
name = "nginx-www"
31+
}
32+
33+
resource "civo_instance" "webserver" {
34+
# ... removed for brevity
35+
}
36+
37+
resource "civo_instance_reserved_ip_assignment" "webserver-www" {
38+
instance_id = civo_instance.webserver.id
39+
reserved_ip_id = civo_reserved_ip.www.id
40+
}
1941
```
2042

2143
<!-- schema generated by tfplugindocs -->

0 commit comments

Comments
 (0)