Documentation ¶
Index ¶
- Variables
- func AllowedValuesDescription(description string, allowedValues []string) string
- func CloneResourceSchemaForDatasource(r *schema.Resource, updates map[string]*schema.Schema) map[string]*schema.Schema
- func Int32SliceToIntList(list []int32) []interface{}
- func Int32SliceToSet(src []int32) *schema.Set
- func JSONBytesEqual(b1, b2 []byte) bool
- func ListOfSetsToStringSlice(listSet []interface{}) [][]string
- func ListToIntSlice(src []interface{}) []int
- func ListToStringSlice(src []interface{}) []string
- func SchemaDiffFloat32(k, old string, nw string, d *schema.ResourceData) bool
- func SetToIntSlice(src *schema.Set) []int
- func SetToStringSlice(src *schema.Set) []string
- func StringSliceToList(list []string) []interface{}
- func StringSliceToSet(src []string) *schema.Set
- func SuppressEquivalentJSONDiffs(k, old, new string, d *schema.ResourceData) bool
- func ValidateDuration(i interface{}, p cty.Path) diag.Diagnostics
- func ValidateDurationWithDays(i interface{}, p cty.Path) diag.Diagnostics
- type Client
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IDRegexp = regexp.MustCompile(`^\d+$`) UIDRegexp = regexp.MustCompile(`^[a-zA-Z0-9-_]+$`) EmailRegexp = regexp.MustCompile(`.+\@.+\..+`) SHA256Regexp = regexp.MustCompile(`^[A-Fa-f0-9]{64}$`) )
Functions ¶
func Int32SliceToIntList ¶
func Int32SliceToIntList(list []int32) []interface{}
func Int32SliceToSet ¶
func JSONBytesEqual ¶
func ListOfSetsToStringSlice ¶
func ListOfSetsToStringSlice(listSet []interface{}) [][]string
func ListToIntSlice ¶
func ListToIntSlice(src []interface{}) []int
func ListToStringSlice ¶
func ListToStringSlice(src []interface{}) []string
func SchemaDiffFloat32 ¶
func SchemaDiffFloat32(k, old string, nw string, d *schema.ResourceData) bool
SchemaDiffFloat32 is a SchemaDiffSuppressFunc for diffing float32 values. schema.TypeFloat uses float64, which is a problem for API types that use float32. Terraform automatically converts float32 to float64 which changes the precision and causes incorrect diffs.
For example, synthetic_monitoring.Probe.Latitude is float32. Attempting to set grafanacloud_synthetic_monitoring_probe.latitude to 27.98606 results in 27.986059188842773. The solution is to diff old and new values as float32.
func SetToIntSlice ¶
func SetToStringSlice ¶
func StringSliceToList ¶
func StringSliceToList(list []string) []interface{}
func StringSliceToSet ¶
func SuppressEquivalentJSONDiffs ¶
func SuppressEquivalentJSONDiffs(k, old, new string, d *schema.ResourceData) bool
func ValidateDuration ¶ added in v1.41.0
func ValidateDuration(i interface{}, p cty.Path) diag.Diagnostics
func ValidateDurationWithDays ¶ added in v1.43.0
func ValidateDurationWithDays(i interface{}, p cty.Path) diag.Diagnostics
Types ¶
Click to show internal directories.
Click to hide internal directories.