MCPcopy Create free account
hub / github.com/OverloadBlitz/cloudcent-cli / PropertyToString

Function PropertyToString

internal/pulumi/resources/aws/util.go:42–56  ·  view source on GitHub ↗

PropertyToString converts a Pulumi PropertyValue to a string.

(v resource.PropertyValue)

Source from the content-addressed store, hash-verified

40
41// PropertyToString converts a Pulumi PropertyValue to a string.
42func PropertyToString(v resource.PropertyValue) string {
43 if v.IsString() {
44 return v.StringValue()
45 }
46 if v.IsNumber() {
47 return fmt.Sprintf("%g", v.NumberValue())
48 }
49 if v.IsBool() {
50 if v.BoolValue() {
51 return "true"
52 }
53 return "false"
54 }
55 return ""
56}
57
58// ApplyValueMap translates a raw value using the provided map.
59// Lookup is case-insensitive; if no mapping matches the original value is returned.

Callers 2

extractMIPInstanceTypeFunction · 0.85
ExtractInputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected