config

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommonDataSourceSchema added in v0.10.0

func AddCommonDataSourceSchema(s *datasourceschema.Schema, addNameAttribute bool)

Get schema elements common to all resources

func AddCommonResourceSchema added in v0.10.0

func AddCommonResourceSchema(s *schema.Schema, addNameAttribute bool)

Get schema elements common to all resources

func BasicAuthContext

func BasicAuthContext(ctx context.Context, username, password string) context.Context

Get BasicAuth context with a username and password

func CheckMismatchedPDFormattedAttributes added in v0.2.0

func CheckMismatchedPDFormattedAttributes(attrName string, expected, result types.String, diagnostics *diag.Diagnostics)

Certain types of string attributes (durations, file paths, and sizes) can be modifed by PD when applying to a config object. For example a duration of "5ms" will be accepted by PD but will be modified to "5 ms" when actually stored in the configuration. This can lead to a Terraform error due to mismatched plan and result. The error reported by Terraform is a little misleading, so this method adds a custom error in that case to indicate that the plan value just needs to be modified.

func GetRequiredActionsObjectType

func GetRequiredActionsObjectType() types.ObjectType

Get the requiredActions ObjectType definition

func GetRequiredActionsSet

Get the set of required actions from the configuration messages returned by the config API

func ProviderBasicAuthContext

func ProviderBasicAuthContext(ctx context.Context, providerConfig internaltypes.ProviderConfiguration) context.Context

Get a BasicAuth context from a ProviderConfiguration

func ReadMessages

Read messages from the Configuration API response

func ReportHttpError

func ReportHttpError(ctx context.Context, diagnostics *diag.Diagnostics, errorSummary string, err error, httpResp *http.Response)

Report an HTTP error

func ReportHttpErrorAsWarning added in v0.11.0

func ReportHttpErrorAsWarning(ctx context.Context, diagnostics *diag.Diagnostics, errorSummary string, err error, httpResp *http.Response)

Report an HTTP error as a warning

func SetAttributesToOptionalAndComputedAndRemoveDefaults added in v0.11.0

func SetAttributesToOptionalAndComputedAndRemoveDefaults(s *schema.Schema, exemptAttributes []string)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL