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

del this #475

Closed
wants to merge 26 commits into from
Closed
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
31 changes: 16 additions & 15 deletions equinix/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,26 +157,27 @@ func Provider() *schema.Provider {
"equinix_network_acl_template": resourceNetworkACLTemplate(),
"equinix_network_device_link": resourceNetworkDeviceLink(),
"equinix_network_file": resourceNetworkFile(),

"equinix_metal_user_api_key": resourceMetalUserAPIKey(),
"equinix_metal_project_api_key": resourceMetalProjectAPIKey(),
"equinix_metal_connection": resourceMetalConnection(),
// "equinix_metal_connection": resourceMetalConnection(),
"equinix_metal_device": resourceMetalDevice(),
"equinix_metal_device_network_type": resourceMetalDeviceNetworkType(),
"equinix_metal_ssh_key": resourceMetalSSHKey(),
"equinix_metal_organization_member": resourceMetalOrganizationMember(),
"equinix_metal_port": resourceMetalPort(),
// "equinix_metal_device_network_type": resourceMetalDeviceNetworkType(),
// "equinix_metal_ssh_key": resourceMetalSSHKey(),
// "equinix_metal_organization_member": resourceMetalOrganizationMember(),
// "equinix_metal_port": resourceMetalPort(),
"equinix_metal_project_ssh_key": resourceMetalProjectSSHKey(),
"equinix_metal_project": resourceMetalProject(),
"equinix_metal_organization": resourceMetalOrganization(),
"equinix_metal_reserved_ip_block": resourceMetalReservedIPBlock(),
"equinix_metal_ip_attachment": resourceMetalIPAttachment(),
"equinix_metal_spot_market_request": resourceMetalSpotMarketRequest(),
"equinix_metal_vlan": resourceMetalVlan(),
"equinix_metal_virtual_circuit": resourceMetalVirtualCircuit(),
"equinix_metal_vrf": resourceMetalVRF(),
"equinix_metal_bgp_session": resourceMetalBGPSession(),
// "equinix_metal_project": resourceMetalProject(),
// "equinix_metal_organization": resourceMetalOrganization(),
// "equinix_metal_reserved_ip_block": resourceMetalReservedIPBlock(),
// "equinix_metal_ip_attachment": resourceMetalIPAttachment(),
// "equinix_metal_spot_market_request": resourceMetalSpotMarketRequest(),
// "equinix_metal_vlan": resourceMetalVlan(),
// "equinix_metal_virtual_circuit": resourceMetalVirtualCircuit(),
// "equinix_metal_vrf": resourceMetalVRF(),
// "equinix_metal_bgp_session": resourceMetalBGPSession(),
"equinix_metal_port_vlan_attachment": resourceMetalPortVlanAttachment(),
"equinix_metal_gateway": resourceMetalGateway(),
// "equinix_metal_gateway": resourceMetalGateway(),
},
ProviderMetaSchema: map[string]*schema.Schema{
"module_name": {
Expand Down
15 changes: 1 addition & 14 deletions equinix/resource_metal_virtual_circuit.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,8 @@ func resourceMetalVirtualCircuitCreate(ctx context.Context, d *schema.ResourceDa
portId := d.Get("port_id").(string)
projectId := d.Get("project_id").(string)

tags := d.Get("tags.#").(int)
if tags > 0 {
vncr.Tags = convertStringArr(d.Get("tags").([]interface{}))
}


if nniVlan, ok := d.GetOk("nni_vlan"); ok {
vncr.NniVLAN = nniVlan.(int)
}
conn, _, err := client.Connections.Get(connId, nil)
if err != nil {
return err
}
if conn.Status == string(packngo.VCStatusPending) {
return fmt.Errorf("Connection request with name %s and ID %s wasn't approved yet", conn.Name, conn.ID)
}

vc, _, err := client.VirtualCircuits.Create(projectId, connId, portId, &vncr, nil)
if err != nil {
Expand Down
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ require (
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-retryablehttp v0.7.5
github.com/hashicorp/terraform-plugin-docs v0.16.0
github.com/hashicorp/terraform-plugin-framework v1.4.1
github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1
github.com/hashicorp/terraform-plugin-go v0.19.0
github.com/hashicorp/terraform-plugin-mux v0.12.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0
github.com/packethost/packngo v0.30.0
github.com/pkg/errors v0.9.1
Expand Down Expand Up @@ -64,7 +68,7 @@ require (
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.19.0 // indirect
github.com/hashicorp/terraform-json v0.17.1 // indirect
github.com/hashicorp/terraform-plugin-go v0.19.0 // indirect
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.2 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
Expand Down
Loading
Loading