Documentation ¶
Index ¶
- func ConfirmResourceCreationAWSApp(rtf ResourceTestFixtureAWS) resource.TestCheckFunc
- func ConfirmResourceCreationDefaultApp(rtf ResourceTestFixtureDefault) resource.TestCheckFunc
- func ConfirmResourceDestructionAWSApp(rtf ResourceTestFixtureAWS) resource.TestCheckFunc
- func ConfirmResourceDestructionDefaultApp(rtf ResourceTestFixtureDefault) resource.TestCheckFunc
- func IsValidSematextRegion(region string) bool
- func IsValidUUID(u string) bool
- func PrettyPrintJSON(b []byte) ([]byte, error)
- func ResourceOperationCreateApp(ctx context.Context, d *schema.ResourceData, meta interface{}, appType string) diag.Diagnostics
- func ResourceOperationDeleteApp(ctx context.Context, d *schema.ResourceData, meta interface{}, appType string) diag.Diagnostics
- func ResourceOperationImportApp(appType string) *schema.ResourceImporter
- func ResourceOperationReadApp(ctx context.Context, d *schema.ResourceData, meta interface{}, appType string) diag.Diagnostics
- func ResourceOperationUpdateApp(ctx context.Context, d *schema.ResourceData, meta interface{}, appType string) diag.Diagnostics
- func ResourceSchemaApp(appType string) map[string]*schema.Schema
- func ResourceTestLifecycleApp(t *testing.T, resourceType string, appType string)
- func ResourceTestUpdateApp(t *testing.T, resourceType string, appType string)
- type AppTokenType
- type ResourceTestFixture
- type ResourceTestFixtureAWS
- type ResourceTestFixtureDefault
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfirmResourceCreationAWSApp ¶
func ConfirmResourceCreationAWSApp(rtf ResourceTestFixtureAWS) resource.TestCheckFunc
ConfirmResourceCreationAWSApp checks the App ID exists in both state and stcloud.
func ConfirmResourceCreationDefaultApp ¶
func ConfirmResourceCreationDefaultApp(rtf ResourceTestFixtureDefault) resource.TestCheckFunc
ConfirmResourceCreationDefaultApp checks the App ID exists in both state and stcloud.
func ConfirmResourceDestructionAWSApp ¶
func ConfirmResourceDestructionAWSApp(rtf ResourceTestFixtureAWS) resource.TestCheckFunc
ConfirmResourceDestructionAWSApp checks the App ID exists in both state and API and is marked as DELETED.
func ConfirmResourceDestructionDefaultApp ¶
func ConfirmResourceDestructionDefaultApp(rtf ResourceTestFixtureDefault) resource.TestCheckFunc
ConfirmResourceDestructionDefaultApp checks the App ID has been removed from state and the API has marked the app as DELETED.
func IsValidSematextRegion ¶
IsValidSematextRegion checks sematext api region is valid.
func PrettyPrintJSON ¶
PrettyPrintJSON is a utility function to format a JSON byte array.
func ResourceOperationCreateApp ¶
func ResourceOperationCreateApp(ctx context.Context, d *schema.ResourceData, meta interface{}, appType string) diag.Diagnostics
ResourceOperationCreateApp is a common creation handler used by most resources.
func ResourceOperationDeleteApp ¶
func ResourceOperationDeleteApp(ctx context.Context, d *schema.ResourceData, meta interface{}, appType string) diag.Diagnostics
ResourceOperationDeleteApp is a common retire handler used by most resources.
func ResourceOperationImportApp ¶
func ResourceOperationImportApp(appType string) *schema.ResourceImporter
ResourceOperationImportApp is a common import handler used by most resources.
func ResourceOperationReadApp ¶
func ResourceOperationReadApp(ctx context.Context, d *schema.ResourceData, meta interface{}, appType string) diag.Diagnostics
ResourceOperationReadApp is a common read handler used by most resources.
func ResourceOperationUpdateApp ¶
func ResourceOperationUpdateApp(ctx context.Context, d *schema.ResourceData, meta interface{}, appType string) diag.Diagnostics
ResourceOperationUpdateApp is a common update handler used by most resources.
func ResourceSchemaApp ¶
ResourceSchemaApp contains common resource fields
func ResourceTestLifecycleApp ¶
ResourceTestLifecycleApp is a common test of resource creation.
Types ¶
type AppTokenType ¶
type AppTokenType struct {
Names []string
}
type ResourceTestFixture ¶
type ResourceTestFixture interface {
// contains filtered or unexported methods
}
type ResourceTestFixtureAWS ¶
type ResourceTestFixtureAWS struct { ResourceType string ResourceName string AppType string Name string StatePath string PlanID int DiscountCode string AppToken AppTokenType AwsRegion string AwsSecretKey string AwsAccessKey string AwsFetchFrequency string }
ResourceTestFixtureAWS a test fixture representing a resource - AWS EBS, AWS EC2, AWS ELB
type ResourceTestFixtureDefault ¶
type ResourceTestFixtureDefault struct { ResourceType string ResourceName string AppType string Name string StatePath string PlanID int DiscountCode string AppToken AppTokenType }
ResourceTestFixture a common test fixture representing most resources