Documentation
¶
Index ¶
Constants ¶
View Source
const Field = "override_create"
Field is the Terraform field name which, if included in a schema, will enable override_create handling.
Variables ¶
View Source
var ( ErrExistsOutsideTerraform = errors.New("entity already exists on server and is not managed in " + "terraform state. set the override_create property to import it or this request will fail") ErrDoesNotExistOutsideTerraform = errors.New("override_create set to import_or_fail. no resource present " + "to import from server") )
Functions ¶
func CustomizeDiff ¶
func CustomizeDiff( resourceIDField string, existsOnServer existsOnServerFunc, additionalLogFields ...string, ) func(ctx context.Context, d *schema.ResourceDiff, meta interface{}) error
CustomizeDiff defines custom diffs for resources using the override_create property to encourage proper use of singleton resources in TF. `additionalLogFields` can optionally be supplied to output additional resource-specific fields in logs triggered by this operation - minimally, the values of `override_create` and the provided resourceIDField will always be included in logs, even if no additional fields are specified with this parameter.
Types ¶
Click to show internal directories.
Click to hide internal directories.