Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: force recreation of VRF if metro or project ID changes #790

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions docs/resources/metal_vrf.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,24 @@ resource "equinix_metal_virtual_circuit" "example" {
}
```

## Argument Reference
<!-- schema generated by tfplugindocs -->
## Schema

The following arguments are supported:
### Required

* `name` - (Required) User-supplied name of the VRF, unique to the project
* `metro` - (Required) Metro ID or Code where the VRF will be deployed.
* `project_id` - (Required) Project ID where the VRF will be deployed.
* `description` - (Optional) Description of the VRF.
* `local_asn` - (Optional) The 4-byte ASN set on the VRF.
* `ip_ranges` - (Optional) All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
- `metro` (String) Metro ID or Code where the VRF will be deployed
- `name` (String) User-supplied name of the VRF, unique to the project
- `project_id` (String) Project ID where the VRF will be deployed

## Attributes Reference
### Optional

No additional attributes are exported.
- `description` (String) Description of the VRF
- `ip_ranges` (Set of String) All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
- `local_asn` (Number) The 4-byte ASN set on the VRF.

### Read-Only

- `id` (String) The ID of this resource.

## Import

Expand Down
6 changes: 4 additions & 2 deletions internal/resources/metal/vrf/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ func Resource() *schema.Resource {
"metro": {
Type: schema.TypeString,
Required: true,
Description: "Metro Code",
Description: "Metro ID or Code where the VRF will be deployed",
ForceNew: true,
},
"local_asn": {
Type: schema.TypeInt,
Expand All @@ -56,7 +57,8 @@ func Resource() *schema.Resource {
"project_id": {
Type: schema.TypeString,
Required: true,
Description: "Project ID",
Description: "Project ID where the VRF will be deployed",
ForceNew: true,
},
// TODO: created_by, created_at, updated_at, href
},
Expand Down
15 changes: 1 addition & 14 deletions templates/resources/metal_vrf.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,7 @@ Attach a Virtual Circuit from a Dedicated Metal Connection to the Metal Gateway.

{{tffile "examples/resources/equinix_metal_vrf/example_3.tf"}}

## Argument Reference

The following arguments are supported:

* `name` - (Required) User-supplied name of the VRF, unique to the project
* `metro` - (Required) Metro ID or Code where the VRF will be deployed.
* `project_id` - (Required) Project ID where the VRF will be deployed.
* `description` - (Optional) Description of the VRF.
* `local_asn` - (Optional) The 4-byte ASN set on the VRF.
* `ip_ranges` - (Optional) All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.

## Attributes Reference

No additional attributes are exported.
{{ .SchemaMarkdown | trimspace }}

## Import

Expand Down
Loading