-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from equinix/fix-shim-and-muxer
Fix: add missing changes required to bridge terraform plugin framework
- Loading branch information
Showing
5 changed files
with
93 additions
and
16 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 |
---|---|---|
|
@@ -7,30 +7,27 @@ Signed-off-by: ocobleseqx <[email protected]> | |
|
||
diff --git a/shim/shim.go b/shim/shim.go | ||
new file mode 100644 | ||
index 0000000..2c0816b | ||
index 0000000..fc924d4 | ||
--- /dev/null | ||
+++ b/shim/shim.go | ||
@@ -0,0 +1,26 @@ | ||
@@ -0,0 +1,23 @@ | ||
+package shim | ||
+ | ||
+import ( | ||
+ "context" | ||
+ | ||
+ pfprovider "github.com/hashicorp/terraform-plugin-framework/provider" | ||
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" | ||
+ "github.com/equinix/terraform-provider-equinix/equinix" | ||
+ "github.com/equinix/terraform-provider-equinix/internal/provider" | ||
+ "github.com/equinix/terraform-provider-equinix/version" | ||
+) | ||
+ | ||
+type UpstreamProvider struct { | ||
+ SDKV2Provider *schema.Provider | ||
+ PluginFrameworkProvider pfprovider.Provider | ||
+} | ||
+ | ||
+func NewUpstreamProvider(ctx context.Context) UpstreamProvider { | ||
+func NewUpstreamProvider(version string) UpstreamProvider { | ||
+ primary := equinix.Provider() | ||
+ pf := provider.CreateFrameworkProvider(version.ProviderVersion) | ||
+ pf := provider.CreateFrameworkProvider(version) | ||
+ | ||
+ return UpstreamProvider{ | ||
+ SDKV2Provider: primary, | ||
|
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,75 @@ | ||
{ | ||
"mux": { | ||
"resources": { | ||
"equinix:fabric/cloudRouter:CloudRouter": 0, | ||
"equinix:fabric/connection:Connection": 0, | ||
"equinix:fabric/network:Network": 0, | ||
"equinix:fabric/routingProtocol:RoutingProtocol": 0, | ||
"equinix:fabric/serviceProfile:ServiceProfile": 0, | ||
"equinix:metal/bgpSession:BgpSession": 0, | ||
"equinix:metal/device:Device": 0, | ||
"equinix:metal/deviceNetworkType:DeviceNetworkType": 0, | ||
"equinix:metal/gateway:Gateway": 1, | ||
"equinix:metal/interconnection:Interconnection": 1, | ||
"equinix:metal/ipAttachment:IpAttachment": 0, | ||
"equinix:metal/organization:Organization": 0, | ||
"equinix:metal/organizationMember:OrganizationMember": 0, | ||
"equinix:metal/port:Port": 0, | ||
"equinix:metal/portVlanAttachment:PortVlanAttachment": 0, | ||
"equinix:metal/project:Project": 0, | ||
"equinix:metal/projectApiKey:ProjectApiKey": 0, | ||
"equinix:metal/projectSshKey:ProjectSshKey": 1, | ||
"equinix:metal/reservedIpBlock:ReservedIpBlock": 0, | ||
"equinix:metal/spotMarketRequest:SpotMarketRequest": 0, | ||
"equinix:metal/sshKey:SshKey": 1, | ||
"equinix:metal/userApiKey:UserApiKey": 0, | ||
"equinix:metal/virtualCircuit:VirtualCircuit": 0, | ||
"equinix:metal/vlan:Vlan": 0, | ||
"equinix:metal/vrf:Vrf": 0, | ||
"equinix:networkedge/aclTemplate:AclTemplate": 0, | ||
"equinix:networkedge/bgp:Bgp": 0, | ||
"equinix:networkedge/device:Device": 0, | ||
"equinix:networkedge/deviceLink:DeviceLink": 0, | ||
"equinix:networkedge/networkFile:NetworkFile": 0, | ||
"equinix:networkedge/sshKey:SshKey": 0, | ||
"equinix:networkedge/sshUser:SshUser": 0 | ||
}, | ||
"functions": { | ||
"equinix:fabric/getCloudRouter:getCloudRouter": 0, | ||
"equinix:fabric/getConnection:getConnection": 0, | ||
"equinix:fabric/getNetwork:getNetwork": 0, | ||
"equinix:fabric/getPort:getPort": 0, | ||
"equinix:fabric/getPorts:getPorts": 0, | ||
"equinix:fabric/getRoutingProtocol:getRoutingProtocol": 0, | ||
"equinix:fabric/getServiceProfile:getServiceProfile": 0, | ||
"equinix:fabric/getServiceProfiles:getServiceProfiles": 0, | ||
"equinix:metal/getDevice:getDevice": 0, | ||
"equinix:metal/getDeviceBgpNeighbors:getDeviceBgpNeighbors": 0, | ||
"equinix:metal/getDevices:getDevices": 0, | ||
"equinix:metal/getFacility:getFacility": 0, | ||
"equinix:metal/getGateway:getGateway": 1, | ||
"equinix:metal/getHardwareReservation:getHardwareReservation": 0, | ||
"equinix:metal/getInterconnection:getInterconnection": 1, | ||
"equinix:metal/getIpBlockRanges:getIpBlockRanges": 0, | ||
"equinix:metal/getMetro:getMetro": 0, | ||
"equinix:metal/getOperatingSystem:getOperatingSystem": 0, | ||
"equinix:metal/getOrganization:getOrganization": 0, | ||
"equinix:metal/getPlans:getPlans": 0, | ||
"equinix:metal/getPort:getPort": 0, | ||
"equinix:metal/getPrecreatedIpBlock:getPrecreatedIpBlock": 0, | ||
"equinix:metal/getProject:getProject": 0, | ||
"equinix:metal/getProjectSshKey:getProjectSshKey": 1, | ||
"equinix:metal/getReservedIpBlock:getReservedIpBlock": 0, | ||
"equinix:metal/getSpotMarketPrice:getSpotMarketPrice": 0, | ||
"equinix:metal/getSpotMarketRequest:getSpotMarketRequest": 0, | ||
"equinix:metal/getVirtualCircuit:getVirtualCircuit": 0, | ||
"equinix:metal/getVlan:getVlan": 0, | ||
"equinix:metal/getVrf:getVrf": 0, | ||
"equinix:networkedge/getAccount:getAccount": 0, | ||
"equinix:networkedge/getDevice:getDevice": 0, | ||
"equinix:networkedge/getDevicePlatform:getDevicePlatform": 0, | ||
"equinix:networkedge/getDeviceSoftware:getDeviceSoftware": 0, | ||
"equinix:networkedge/getDeviceType:getDeviceType": 0 | ||
} | ||
} | ||
} |
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
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
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