Skip to content

Commit

Permalink
Feat/iopr 4336 Add resource virtual_access_node (#37)
Browse files Browse the repository at this point in the history
* resource virtual access node: wip

* resource virtual access node

---------

Co-authored-by: Pauline ESPALIEU <[email protected]>
  • Loading branch information
Pauline Espalieu and Pauline ESPALIEU authored Sep 18, 2024
1 parent ac184a3 commit 588f3ca
Show file tree
Hide file tree
Showing 8 changed files with 440 additions and 7 deletions.
5 changes: 2 additions & 3 deletions docs/resources/access_node.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ subcategory: ""
description: |-
Manages an access node resource.
Access node resource allows you to create, modify and delete Autonomi access nodes.
Autonomi access node allows you to easily connect to your datacenters assets via a physical connection (physical access node) or a virtual connection through Megaport / Equinix connections (virtual access nodes).
Autonomi access node allows you to easily connect to your datacenters assets via a physical connection (physical access node).
---

# autonomi_access_node (Resource)

Manages an access node resource.
Access node resource allows you to create, modify and delete Autonomi access nodes.
Autonomi access node allows you to easily connect to your datacenters assets via a physical connection
(physical access node) or a virtual connection through Megaport / Equinix connections (virtual access nodes).
Autonomi access node allows you to easily connect to your datacenters assets via a physical connection (physical access node).

## Example Usage

Expand Down
64 changes: 64 additions & 0 deletions docs/resources/virtual_access_node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "autonomi_virtual_access_node Resource - autonomi"
subcategory: ""
description: |-
Manages a virtual access node resource.
Virtual access node resource allows you to create, modify and delete Autonomi virtual access nodes.
Autonomi virtual access node allows you to easily connect to your datacenters assets via a virtual connection through Megaport / Equinix connections (virtual access nodes).
---

# autonomi_virtual_access_node (Resource)

Manages a virtual access node resource.
Virtual access node resource allows you to create, modify and delete Autonomi virtual access nodes.
Autonomi virtual access node allows you to easily connect to your datacenters assets via a virtual connection through Megaport / Equinix connections (virtual access nodes).

## Example Usage

```terraform
resource "autonomi_virtual_access_node" "virtual_access_node" {
name = "Virtual Access Node created with Terraform"
workspace_id = autonomi_workspace.workspace.id
product = {
sku = "valid_sku"
}
}
```

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

### Required

- `name` (String) Name of the access node
- `product` (Attributes) (see [below for nested schema](#nestedatt--product))
- `workspace_id` (String) ID of the workspace to which the access node belongs.

### Read-Only

- `administrative_state` (String) Administrative state of the access node [creation_pending, creation_proceed, creation_error,
deployed, delete_pending, delete_proceed, delete_error]
- `created_at` (String) Creation date of the access node
- `deployed_at` (String) Deployment date of the access node
- `id` (String) ID of the access node, set after creation
- `service_key` (Attributes) Access node's service key (see [below for nested schema](#nestedatt--service_key))
- `type` (String) Type of the node [access]
- `updated_at` (String) Update date of the access node
- `vlan` (Number) Vlan of the access node

<a id="nestedatt--product"></a>
### Nested Schema for `product`

Required:

- `sku` (String) ID of the product

<a id="nestedatt--service_key"></a>
### Nested Schema for `service_key`

Read-Only:

- `expiration_date` (String) expiration date of the service key
- `id` (String) ID of the service key
- `name` (String) name of the service key
7 changes: 7 additions & 0 deletions examples/resources/autonomi_virtual_access_node/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resource "autonomi_virtual_access_node" "virtual_access_node" {
name = "Virtual Access Node created with Terraform"
workspace_id = autonomi_workspace.workspace.id
product = {
sku = "valid_sku"
}
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/hashicorp/terraform-plugin-framework v1.10.0
github.com/hashicorp/terraform-plugin-go v0.23.0
github.com/hashicorp/terraform-plugin-testing v1.9.0
github.com/intercloud/autonomi-sdk v0.0.14
github.com/intercloud/autonomi-sdk v1.0.1
github.com/meilisearch/meilisearch-go v0.27.2
github.com/stretchr/testify v1.9.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S
github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc=
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
github.com/intercloud/autonomi-sdk v0.0.14 h1:xwCwN+4vHop7R5j4VVB0kLpezoo1uXoKeDJe5GdYrSo=
github.com/intercloud/autonomi-sdk v0.0.14/go.mod h1:O0r2AhNEPkT5bsDByewDbpc6rojBNJG5EpGJpfp+Kxw=
github.com/intercloud/autonomi-sdk v1.0.1 h1:Ryr/w+VEfLquO53TD5cy2o5PCkChdNQJ1uM4H2C4cjU=
github.com/intercloud/autonomi-sdk v1.0.1/go.mod h1:O0r2AhNEPkT5bsDByewDbpc6rojBNJG5EpGJpfp+Kxw=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
Expand Down
1 change: 1 addition & 0 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ func (p *autonomiProvider) Resources(_ context.Context) []func() resource.Resour
autonomiresource.NewWorkspaceResource,
autonomiresource.NewCloudNodeResource,
autonomiresource.NewAccessNodeResource,
autonomiresource.NewVirtualAccessNodeResource,
autonomiresource.NewTransportResource,
autonomiresource.NewAttachmentResource,
autonomiresource.NewPhysicalPortResource,
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/access_node_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (r *accessNodeResource) Schema(_ context.Context, _ resource.SchemaRequest,
resp.Schema = schema.Schema{
MarkdownDescription: `Manages an access node resource.
Access node resource allows you to create, modify and delete Autonomi access nodes.
Autonomi access node allows you to easily connect to your datacenters assets via a physical connection (physical access node) or a virtual connection through Megaport / Equinix connections (virtual access nodes).`,
Autonomi access node allows you to easily connect to your datacenters assets via a physical connection (physical access node).`,
Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
MarkdownDescription: "ID of the access node, set after creation",
Expand Down
Loading

0 comments on commit 588f3ca

Please sign in to comment.