hcpvalidator

package
v0.87.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

hcpvalidator package providers validators for common HCP request attributes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayName

func DisplayName() validator.String

DisplayName returns an AttributeValidator which ensures that any configured attribute value:

  • Is a string.
  • Consists of only characters that are valid for a display name

Null (unconfigured) and unknown (known after apply) values are skipped.

func HTTPSUrl added in v0.81.1

func HTTPSUrl() validator.String

HTTPSUrl returns an AttributeValidator which ensures that any configured attribute value satisfies requirements of a valid HTTPS URL. Null (unconfigured) and unknown (known after apply) values are skipped.

func ResourceNamePart

func ResourceNamePart() validator.String

ResourceNamePart returns an AttributeValidator which ensures that any configured attribute value:

  • Is a string.
  • Consists of only characters that are valid for a resource name part

Length is not enforced, and should be validated separately. Null (unconfigured) and unknown (known after apply) values are skipped.

func ResourceType added in v0.81.1

func ResourceType() validator.String

ResourceType returns an AttributeValidator which ensures that any configured attribute value satisfies requirements. Resource Type must have a format

<resource type> = hashicorp.<service>.<resource>

where <service> and <resource> may contain lower-case alphabetic characters as well as dashes (-).

For example:

  • hashicorp.vault.cluster
  • hashicorp.network.hvn

Null (unconfigured) and unknown (known after apply) values are skipped.

func URL added in v0.81.1

func URL() validator.String

URL returns an AttributeValidator which ensures that any configured attribute value satisfies requirements of a valid URL. Null (unconfigured) and unknown (known after apply) values are skipped.

Types

This section is empty.

Jump to

Keyboard shortcuts

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