-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:digitalocean/terraform-provider-dig…
…italocean
- Loading branch information
Showing
3 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
page_title: "DigitalOcean: digitalocean_reserved_ipv6" | ||
subcategory: "Networking" | ||
--- | ||
|
||
# digitalocean_reserved_ipv6 | ||
|
||
Get information on a reserved IPv6. This data source provides the region_slug and droplet id as configured on your DigitalOcean account. This is useful if the reserved IPv6 in question is not managed by Terraform or you need to find the Droplet the IP is | ||
attached to. | ||
|
||
An error is triggered if the provided reserved IPv6 does not exist. | ||
|
||
## Example Usage | ||
|
||
Get the reserved IPv6: | ||
|
||
```hcl | ||
resource "digitalocean_reserved_ipv6" "foo" { | ||
region_slug = "nyc3" | ||
} | ||
data "digitalocean_reserved_ipv6" "foobar" { | ||
ip = digitalocean_reserved_ipv6.foo.ip | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `ip` - (Required) The allocated IPv6 address of the specific reserved IPv6 to retrieve. | ||
|
||
## Attributes Reference | ||
|
||
The following attributes are exported: | ||
|
||
* `region_slug`: The region that the reserved IPv6 is reserved to. | ||
* `urn`: The uniform resource name of the reserved IPv6. | ||
* `droplet_id`: The Droplet id that the reserved IP has been assigned to. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
page_title: "DigitalOcean: digitalocean_reserved_ipv6" | ||
subcategory: "Networking" | ||
--- | ||
|
||
# digitalocean\_reserved_ipv6 | ||
|
||
Provides a DigitalOcean reserved IPv6 to represent a publicly-accessible static IPv6 addresses that can be mapped to one of your Droplets. | ||
|
||
~> **NOTE:** Reserved IPv6s can be assigned to a Droplet using | ||
`digitalocean_reserved_ipv6_assignment` resource only. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
resource "digitalocean_reserved_ipv6" "foobar" { | ||
region_slug = "nyc3" | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `region_slug` - (Required) The region that the reserved IPv6 needs to be reserved to. | ||
|
||
|
||
## Import | ||
|
||
Reserved IPv6s can be imported using the `ip`, e.g. | ||
|
||
``` | ||
terraform import digitalocean_reserved_ipv6.myip | ||
2409:40d0:fa:27dd:9b24:7074:7b85:eee6 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
page_title: "DigitalOcean: digitalocean_reserved_ipv6_assignment" | ||
subcategory: "Networking" | ||
--- | ||
|
||
# digitalocean\_reserved_ipv6_assignment | ||
|
||
Provides a resource for assigning an existing DigitalOcean reserved IPv6 to a Droplet. This | ||
makes it easy to provision reserved IPv6 addresses that are not tied to the lifecycle of your Droplet. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
resource "digitalocean_reserved_ipv6" "foobar" { | ||
region_slug = "nyc3" | ||
} | ||
resource "digitalocean_droplet" "foobar" { | ||
image = "ubuntu-22-04-x64" | ||
name = "tf-acc-test-01" | ||
region = "nyc3" | ||
size = "s-1vcpu-1gb" | ||
ipv6 = true | ||
} | ||
resource "digitalocean_reserved_ipv6_assignment" "foobar" { | ||
ip = digitalocean_reserved_ipv6.foobar.ip | ||
droplet_id = digitalocean_droplet.foobar.id | ||
lifecycle { | ||
create_before_destroy = true | ||
} | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `ip` - (Required) The reserved IPv6 to assign to the Droplet. | ||
* `droplet_id` - (Required) The ID of Droplet that the reserved IPv6 will be assigned to. | ||
|
||
## Import | ||
|
||
Reserved IPv6 assignments can be imported using the reserved IPv6 itself and the `id` of | ||
the Droplet joined with a comma. For example: | ||
|
||
``` | ||
terraform import digitalocean_reserved_ipv6_assignment.foobar 2409:40d0:fa:27dd:9b24:7074:7b85:eee6,123456 | ||
``` |