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

Function FormatInputProperties

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

FormatInputProperties serialises a Pulumi PropertyMap to indented JSON for display/debugging purposes.

(inputs resource.PropertyMap)

Source from the content-addressed store, hash-verified

75// FormatInputProperties serialises a Pulumi PropertyMap to indented JSON for
76// display/debugging purposes.
77func FormatInputProperties(inputs resource.PropertyMap) string {
78 if len(inputs) == 0 {
79 return ""
80 }
81
82 data, err := json.MarshalIndent(PropertyMapToAny(inputs), "", " ")
83 if err != nil {
84 return fmt.Sprintf("%v", inputs)
85 }
86 return string(data)
87}
88
89// PropertyMapToAny converts a Pulumi PropertyMap to a plain map[string]any.
90func PropertyMapToAny(pm resource.PropertyMap) map[string]any {

Callers 1

DecodeFreeResourceFunction · 0.85

Calls 1

PropertyMapToAnyFunction · 0.85

Tested by

no test coverage detected