Documentation ¶
Index ¶
- Constants
- Variables
- func RetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error)
- type Config
- func (c *Config) AddFwModuleToMetalUserAgent(ctx context.Context, meta tfsdk.Config)
- func (c *Config) AddModuleToECXUserAgent(client *ecx.Client, d *schema.ResourceData)
- func (c *Config) AddModuleToMetalUserAgent(d *schema.ResourceData)
- func (c *Config) AddModuleToNEUserAgent(client *ne.Client, d *schema.ResourceData)
- func (c *Config) Load(ctx context.Context) error
- func (c *Config) NewFabricClientForSDK(d *schema.ResourceData) *fabricv4.APIClient
- func (c *Config) NewMetalClient() *packngo.Client
- func (c *Config) NewMetalClientForFramework(ctx context.Context, meta tfsdk.Config) *metalv1.APIClient
- func (c *Config) NewMetalClientForSDK(d *schema.ResourceData) *metalv1.APIClient
- func (c *Config) NewMetalClientForTesting() *metalv1.APIClient
- type DumpTransport
- type ProviderMeta
Constants ¶
const ( EndpointEnvVar = "EQUINIX_API_ENDPOINT" ClientIDEnvVar = "EQUINIX_API_CLIENTID" ClientSecretEnvVar = "EQUINIX_API_CLIENTSECRET" ClientTokenEnvVar = "EQUINIX_API_TOKEN" ClientTimeoutEnvVar = "EQUINIX_API_TIMEOUT" MetalAuthTokenEnvVar = "METAL_AUTH_TOKEN" )
Variables ¶
var ( DefaultBaseURL = "https://api.equinix.com" DefaultTimeout = 30 )
Functions ¶
Types ¶
type Config ¶
type Config struct { BaseURL string AuthToken string ClientID string ClientSecret string MaxRetries int MaxRetryWait time.Duration RequestTimeout time.Duration PageSize int Token string Ecx ecx.Client Ne ne.Client Metal *packngo.Client TerraformVersion string // contains filtered or unexported fields }
Config is the configuration structure used to instantiate the Equinix provider.
func (*Config) AddFwModuleToMetalUserAgent ¶ added in v1.27.0
TODO (ocobleseqx) - known issue, Metal services are initialized using the metal client pointer if two or more modules in same project interact with metal resources they will override the UserAgent resulting in swapped UserAgent. This can be fixed by letting the headers be overwritten on the initialized Packngo ServiceOp clients on a query-by-query basis.
func (*Config) AddModuleToECXUserAgent ¶
func (c *Config) AddModuleToECXUserAgent(client *ecx.Client, d *schema.ResourceData)
func (*Config) AddModuleToMetalUserAgent ¶
func (c *Config) AddModuleToMetalUserAgent(d *schema.ResourceData)
func (*Config) AddModuleToNEUserAgent ¶
func (c *Config) AddModuleToNEUserAgent(client *ne.Client, d *schema.ResourceData)
func (*Config) Load ¶
Load function validates configuration structure fields and configures all required API clients.
func (*Config) NewFabricClientForSDK ¶ added in v1.36.0
func (c *Config) NewFabricClientForSDK(d *schema.ResourceData) *fabricv4.APIClient
NewFabricClientForSDK returns a terraform sdkv2 plugin compatible equinix-sdk-go/fabricv4 client to be used to access Fabric's V4 APIs
func (*Config) NewMetalClient ¶
NewMetalClient returns a new packngo client for accessing Equinix Metal's API. Deprecated: migrate to NewMetalClientForSdk or NewMetalClientForFramework instead
func (*Config) NewMetalClientForFramework ¶ added in v1.29.0
func (*Config) NewMetalClientForSDK ¶ added in v1.29.0
func (c *Config) NewMetalClientForSDK(d *schema.ResourceData) *metalv1.APIClient
func (*Config) NewMetalClientForTesting ¶ added in v1.29.0
This is a short-term shim to allow tests to continue to have a client for cleanup and validation code that is outside of the resource or datasource under test Deprecated: when possible, API clients for test cleanup/validation should be moved to the acceptance package
type DumpTransport ¶
type DumpTransport struct {
// contains filtered or unexported fields
}
type ProviderMeta ¶
type ProviderMeta struct {
ModuleName string `cty:"module_name"`
}