Documentation ¶
Overview ¶
Package akamai allows to initialize and set up Akamai Provider
Index ¶
- Constants
- Variables
- func IsNotFoundError(e error) bool
- func Log(args ...interface{}) log.Interface
- func LogFromContext(ctx context.Context, args ...interface{}) log.Interface
- func LogFromHCLog(l hclog.Logger) log.Interface
- func Provider(provs ...Subprovider) plugin.ProviderFunc
- func TFTestSetup() error
- func TFTestTeardown() error
- type Error
- type OperationMeta
- type Subprovider
Constants ¶
const ( // ProviderRegistryPath is the path for the provider in the terraform registry ProviderRegistryPath = "registry.terraform.io/akamai/akamai" // ProviderName is the legacy name of the provider // Deprecated: terrform now uses registry paths, the shortest of which would be akamai/akamai" ProviderName = "terraform-provider-akamai" // ConfigurationIsNotSpecified is the message for when EdgeGrid configuration is not specified ConfigurationIsNotSpecified = "" /* 325-byte string literal not displayed */ )
const (
DefaultTimestampFormat = "2006/01/02 03:04:05"
)
2020/12/02 11:51:03
const TFTestTempDir = "./test_tmp"
TFTestTempDir specifies the location of tmp directory which will be used by provider SDK's testing framework
Variables ¶
var ( // ErrDuplicateSchemaKey is returned when a duplicate schema key is detected during merge ErrDuplicateSchemaKey = &Error{"duplicate schema key", false} // ErrCacheEntryNotFound returns a cache entry error ErrCacheEntryNotFound = &Error{"cache entry not found", true} // ErrCacheDisabled is returned when the cache is disabled ErrCacheDisabled = &Error{"cache is disabled", false} // ErrProviderNotLoaded returned and panic'd when a requested provider is not loaded // Users should never see this, unit tests and sanity checks should pick this up ErrProviderNotLoaded = &Error{"provider not loaded", false} // NoticeDeprecatedUseAlias is returned for schema configurations that are deprecated // Terraform now supports section aliases // TODO: Add alias example to the examples directory NoticeDeprecatedUseAlias = func(n string) string { return fmt.Sprintf(`The setting %q has been deprecated. See: https://www.terraform.io/docs/configuration/providers.html#alias-multiple-provider-configurations`, n) } )
Functions ¶
func IsNotFoundError ¶
IsNotFoundError is returned if the error has the notFound flag set
func LogFromContext ¶
LogFromContext returns the logger from the context
func LogFromHCLog ¶
LogFromHCLog returns a new log.Interface from an hclog.Logger
func Provider ¶
func Provider(provs ...Subprovider) plugin.ProviderFunc
Provider returns the provider function to terraform
func TFTestSetup ¶
func TFTestSetup() error
TFTestSetup contains common setup for tests in all subproviders
func TFTestTeardown ¶
func TFTestTeardown() error
TFTestTeardown contains common teardown for tests in all subproviders
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is the akamai error interface
func (Error) Diagnostic ¶
func (e Error) Diagnostic(detail ...string) diag.Diagnostic
Diagnostic converts the error a diagnostic
func (Error) Diagnostics ¶
func (e Error) Diagnostics(detail ...string) diag.Diagnostics
Diagnostics converts the error to a diag.DiaDiagnostics
type OperationMeta ¶
type OperationMeta interface { // Log constructs an hclog sublogger and returns the log.Interface Log(args ...interface{}) log.Interface // OperationID returns the operation id OperationID() string // Session returns the operation API session Session() session.Session // CacheGet returns an object from the cache CacheGet(prov Subprovider, key string, out interface{}) error // CacheSet sets a value in the cache CacheSet(prov Subprovider, key string, val interface{}) error }
OperationMeta is the akamai meta object interface
type Subprovider ¶
type Subprovider interface { // Name should return the name of the subprovider Name() string // Version returns the version of the subprovider Version() string // Schema returns the schemas for the subprovider Schema() map[string]*schema.Schema // Resources returns the resources for the subprovider Resources() map[string]*schema.Resource // DataSources returns the datasources for the subprovider DataSources() map[string]*schema.Resource // Configure returns the subprovider opaque state object Configure(log.Interface, *schema.ResourceData) diag.Diagnostics }
Subprovider is the interface implemented by the sub providers