initial commit

This commit is contained in:
2025-04-18 13:26:52 -07:00
commit b78296ab5b
134 changed files with 11623 additions and 0 deletions

17
sdk/go/xyz/config/config.go generated Normal file
View File

@@ -0,0 +1,17 @@
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package config
import (
"github.com/pulumi/pulumi-xyz/sdk/go/xyz/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
var _ = internal.GetEnvOrDefault
// A region which should be used.
func GetRegion(ctx *pulumi.Context) string {
return config.Get(ctx, "xyz:region")
}

2
sdk/go/xyz/doc.go generated Normal file
View File

@@ -0,0 +1,2 @@
// A Pulumi package for creating and managing xyz cloud resources.
package xyz

80
sdk/go/xyz/getDataSource.go generated Normal file
View File

@@ -0,0 +1,80 @@
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package xyz
import (
"context"
"reflect"
"github.com/pulumi/pulumi-xyz/sdk/go/xyz/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func GetDataSource(ctx *pulumi.Context, args *GetDataSourceArgs, opts ...pulumi.InvokeOption) (*GetDataSourceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetDataSourceResult
err := ctx.Invoke("xyz:index/getDataSource:getDataSource", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDataSource.
type GetDataSourceArgs struct {
SampleAttribute string `pulumi:"sampleAttribute"`
}
// A collection of values returned by getDataSource.
type GetDataSourceResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
SampleAttribute string `pulumi:"sampleAttribute"`
}
func GetDataSourceOutput(ctx *pulumi.Context, args GetDataSourceOutputArgs, opts ...pulumi.InvokeOption) GetDataSourceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetDataSourceResultOutput, error) {
args := v.(GetDataSourceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("xyz:index/getDataSource:getDataSource", args, GetDataSourceResultOutput{}, options).(GetDataSourceResultOutput), nil
}).(GetDataSourceResultOutput)
}
// A collection of arguments for invoking getDataSource.
type GetDataSourceOutputArgs struct {
SampleAttribute pulumi.StringInput `pulumi:"sampleAttribute"`
}
func (GetDataSourceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetDataSourceArgs)(nil)).Elem()
}
// A collection of values returned by getDataSource.
type GetDataSourceResultOutput struct{ *pulumi.OutputState }
func (GetDataSourceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetDataSourceResult)(nil)).Elem()
}
func (o GetDataSourceResultOutput) ToGetDataSourceResultOutput() GetDataSourceResultOutput {
return o
}
func (o GetDataSourceResultOutput) ToGetDataSourceResultOutputWithContext(ctx context.Context) GetDataSourceResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o GetDataSourceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetDataSourceResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetDataSourceResultOutput) SampleAttribute() pulumi.StringOutput {
return o.ApplyT(func(v GetDataSourceResult) string { return v.SampleAttribute }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetDataSourceResultOutput{})
}

66
sdk/go/xyz/init.go generated Normal file
View File

@@ -0,0 +1,66 @@
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package xyz
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-xyz/sdk/go/xyz/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "xyz:index/resource:Resource":
r = &Resource{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
type pkg struct {
version semver.Version
}
func (p *pkg) Version() semver.Version {
return p.version
}
func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pulumi.ProviderResource, error) {
if typ != "pulumi:providers:xyz" {
return nil, fmt.Errorf("unknown provider type: %s", typ)
}
r := &Provider{}
err := ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return r, err
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"xyz",
"index/resource",
&module{version},
)
pulumi.RegisterResourcePackage(
"xyz",
&pkg{version},
)
}

184
sdk/go/xyz/internal/pulumiUtilities.go generated Normal file
View File

@@ -0,0 +1,184 @@
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package internal
import (
"fmt"
"os"
"reflect"
"regexp"
"strconv"
"strings"
"github.com/blang/semver"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/internals"
)
type envParser func(v string) interface{}
func ParseEnvBool(v string) interface{} {
b, err := strconv.ParseBool(v)
if err != nil {
return nil
}
return b
}
func ParseEnvInt(v string) interface{} {
i, err := strconv.ParseInt(v, 0, 0)
if err != nil {
return nil
}
return int(i)
}
func ParseEnvFloat(v string) interface{} {
f, err := strconv.ParseFloat(v, 64)
if err != nil {
return nil
}
return f
}
func ParseEnvStringArray(v string) interface{} {
var result pulumi.StringArray
for _, item := range strings.Split(v, ";") {
result = append(result, pulumi.String(item))
}
return result
}
func GetEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} {
for _, v := range vars {
if value, ok := os.LookupEnv(v); ok {
if parser != nil {
return parser(value)
}
return value
}
}
return def
}
// PkgVersion uses reflection to determine the version of the current package.
// If a version cannot be determined, v1 will be assumed. The second return
// value is always nil.
func PkgVersion() (semver.Version, error) {
// emptyVersion defaults to v0.0.0
if !SdkVersion.Equals(semver.Version{}) {
return SdkVersion, nil
}
type sentinal struct{}
pkgPath := reflect.TypeOf(sentinal{}).PkgPath()
re := regexp.MustCompile("^.*/pulumi-xyz/sdk(/v\\d+)?")
if match := re.FindStringSubmatch(pkgPath); match != nil {
vStr := match[1]
if len(vStr) == 0 { // If the version capture group was empty, default to v1.
return semver.Version{Major: 1}, nil
}
return semver.MustParse(fmt.Sprintf("%s.0.0", vStr[2:])), nil
}
return semver.Version{Major: 1}, nil
}
// isZero is a null safe check for if a value is it's types zero value.
func IsZero(v interface{}) bool {
if v == nil {
return true
}
return reflect.ValueOf(v).IsZero()
}
func CallPlain(
ctx *pulumi.Context,
tok string,
args pulumi.Input,
output pulumi.Output,
self pulumi.Resource,
property string,
resultPtr reflect.Value,
errorPtr *error,
opts ...pulumi.InvokeOption,
) {
res, err := callPlainInner(ctx, tok, args, output, self, opts...)
if err != nil {
*errorPtr = err
return
}
v := reflect.ValueOf(res)
// extract res.property field if asked to do so
if property != "" {
v = v.FieldByName("Res")
}
// return by setting the result pointer; this style of returns shortens the generated code without generics
resultPtr.Elem().Set(v)
}
func callPlainInner(
ctx *pulumi.Context,
tok string,
args pulumi.Input,
output pulumi.Output,
self pulumi.Resource,
opts ...pulumi.InvokeOption,
) (any, error) {
o, err := ctx.Call(tok, args, output, self, opts...)
if err != nil {
return nil, err
}
outputData, err := internals.UnsafeAwaitOutput(ctx.Context(), o)
if err != nil {
return nil, err
}
// Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
known := outputData.Known
value := outputData.Value
secret := outputData.Secret
problem := ""
if !known {
problem = "an unknown value"
} else if secret {
problem = "a secret value"
}
if problem != "" {
return nil, fmt.Errorf("Plain resource method %q incorrectly returned %s. "+
"This is an error in the provider, please report this to the provider developer.",
tok, problem)
}
return value, nil
}
// PkgResourceDefaultOpts provides package level defaults to pulumi.OptionResource.
func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption {
defaults := []pulumi.ResourceOption{}
version := semver.MustParse("1.0.0-alpha.0+dev")
if !version.Equals(semver.Version{}) {
defaults = append(defaults, pulumi.Version(version.String()))
}
return append(defaults, opts...)
}
// PkgInvokeDefaultOpts provides package level defaults to pulumi.OptionInvoke.
func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption {
defaults := []pulumi.InvokeOption{}
version := semver.MustParse("1.0.0-alpha.0+dev")
if !version.Equals(semver.Version{}) {
defaults = append(defaults, pulumi.Version(version.String()))
}
return append(defaults, opts...)
}

11
sdk/go/xyz/internal/pulumiVersion.go generated Normal file
View File

@@ -0,0 +1,11 @@
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package internal
import (
"github.com/blang/semver"
)
var SdkVersion semver.Version = semver.Version{}
var pluginDownloadURL string = ""

90
sdk/go/xyz/provider.go generated Normal file
View File

@@ -0,0 +1,90 @@
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package xyz
import (
"context"
"reflect"
"github.com/pulumi/pulumi-xyz/sdk/go/xyz/internal"
"github.com/pulumi/pulumi-xyz/sdk/go/xyz/region"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The provider type for the xyz package. By default, resources use package-wide configuration
// settings, however an explicit `Provider` instance may be created and passed during resource
// construction to achieve fine-grained programmatic control over provider settings. See the
// [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
type Provider struct {
pulumi.ProviderResourceState
}
// NewProvider registers a new resource with the given unique name, arguments, and options.
func NewProvider(ctx *pulumi.Context,
name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) {
if args == nil {
args = &ProviderArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Provider
err := ctx.RegisterResource("pulumi:providers:xyz", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
type providerArgs struct {
// A region which should be used.
Region *region.Region `pulumi:"region"`
}
// The set of arguments for constructing a Provider resource.
type ProviderArgs struct {
// A region which should be used.
Region region.RegionPtrInput
}
func (ProviderArgs) ElementType() reflect.Type {
return reflect.TypeOf((*providerArgs)(nil)).Elem()
}
type ProviderInput interface {
pulumi.Input
ToProviderOutput() ProviderOutput
ToProviderOutputWithContext(ctx context.Context) ProviderOutput
}
func (*Provider) ElementType() reflect.Type {
return reflect.TypeOf((**Provider)(nil)).Elem()
}
func (i *Provider) ToProviderOutput() ProviderOutput {
return i.ToProviderOutputWithContext(context.Background())
}
func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProviderOutput)
}
type ProviderOutput struct{ *pulumi.OutputState }
func (ProviderOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Provider)(nil)).Elem()
}
func (o ProviderOutput) ToProviderOutput() ProviderOutput {
return o
}
func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput {
return o
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ProviderInput)(nil)).Elem(), &Provider{})
pulumi.RegisterOutputType(ProviderOutput{})
}

5
sdk/go/xyz/pulumi-plugin.json generated Normal file
View File

@@ -0,0 +1,5 @@
{
"resource": true,
"name": "xyz",
"version": "1.0.0-alpha.0+dev"
}

183
sdk/go/xyz/region/pulumiEnums.go generated Normal file
View File

@@ -0,0 +1,183 @@
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package region
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type Region string
const (
RegionHere = Region("HERE")
RegionOverThere = Region("OVER_THERE")
)
func (Region) ElementType() reflect.Type {
return reflect.TypeOf((*Region)(nil)).Elem()
}
func (e Region) ToRegionOutput() RegionOutput {
return pulumi.ToOutput(e).(RegionOutput)
}
func (e Region) ToRegionOutputWithContext(ctx context.Context) RegionOutput {
return pulumi.ToOutputWithContext(ctx, e).(RegionOutput)
}
func (e Region) ToRegionPtrOutput() RegionPtrOutput {
return e.ToRegionPtrOutputWithContext(context.Background())
}
func (e Region) ToRegionPtrOutputWithContext(ctx context.Context) RegionPtrOutput {
return Region(e).ToRegionOutputWithContext(ctx).ToRegionPtrOutputWithContext(ctx)
}
func (e Region) ToStringOutput() pulumi.StringOutput {
return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput)
}
func (e Region) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput)
}
func (e Region) ToStringPtrOutput() pulumi.StringPtrOutput {
return pulumi.String(e).ToStringPtrOutputWithContext(context.Background())
}
func (e Region) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx)
}
type RegionOutput struct{ *pulumi.OutputState }
func (RegionOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Region)(nil)).Elem()
}
func (o RegionOutput) ToRegionOutput() RegionOutput {
return o
}
func (o RegionOutput) ToRegionOutputWithContext(ctx context.Context) RegionOutput {
return o
}
func (o RegionOutput) ToRegionPtrOutput() RegionPtrOutput {
return o.ToRegionPtrOutputWithContext(context.Background())
}
func (o RegionOutput) ToRegionPtrOutputWithContext(ctx context.Context) RegionPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v Region) *Region {
return &v
}).(RegionPtrOutput)
}
func (o RegionOutput) ToStringOutput() pulumi.StringOutput {
return o.ToStringOutputWithContext(context.Background())
}
func (o RegionOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e Region) string {
return string(e)
}).(pulumi.StringOutput)
}
func (o RegionOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
return o.ToStringPtrOutputWithContext(context.Background())
}
func (o RegionOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e Region) *string {
v := string(e)
return &v
}).(pulumi.StringPtrOutput)
}
type RegionPtrOutput struct{ *pulumi.OutputState }
func (RegionPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Region)(nil)).Elem()
}
func (o RegionPtrOutput) ToRegionPtrOutput() RegionPtrOutput {
return o
}
func (o RegionPtrOutput) ToRegionPtrOutputWithContext(ctx context.Context) RegionPtrOutput {
return o
}
func (o RegionPtrOutput) Elem() RegionOutput {
return o.ApplyT(func(v *Region) Region {
if v != nil {
return *v
}
var ret Region
return ret
}).(RegionOutput)
}
func (o RegionPtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
return o.ToStringPtrOutputWithContext(context.Background())
}
func (o RegionPtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e *Region) *string {
if e == nil {
return nil
}
v := string(*e)
return &v
}).(pulumi.StringPtrOutput)
}
// RegionInput is an input type that accepts values of the Region enum
// A concrete instance of `RegionInput` can be one of the following:
//
// RegionHere
// RegionOverThere
type RegionInput interface {
pulumi.Input
ToRegionOutput() RegionOutput
ToRegionOutputWithContext(context.Context) RegionOutput
}
var regionPtrType = reflect.TypeOf((**Region)(nil)).Elem()
type RegionPtrInput interface {
pulumi.Input
ToRegionPtrOutput() RegionPtrOutput
ToRegionPtrOutputWithContext(context.Context) RegionPtrOutput
}
type regionPtr string
func RegionPtr(v string) RegionPtrInput {
return (*regionPtr)(&v)
}
func (*regionPtr) ElementType() reflect.Type {
return regionPtrType
}
func (in *regionPtr) ToRegionPtrOutput() RegionPtrOutput {
return pulumi.ToOutput(in).(RegionPtrOutput)
}
func (in *regionPtr) ToRegionPtrOutputWithContext(ctx context.Context) RegionPtrOutput {
return pulumi.ToOutputWithContext(ctx, in).(RegionPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RegionInput)(nil)).Elem(), Region("HERE"))
pulumi.RegisterInputType(reflect.TypeOf((*RegionPtrInput)(nil)).Elem(), Region("HERE"))
pulumi.RegisterOutputType(RegionOutput{})
pulumi.RegisterOutputType(RegionPtrOutput{})
}

214
sdk/go/xyz/resource.go generated Normal file
View File

@@ -0,0 +1,214 @@
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package xyz
import (
"context"
"reflect"
"github.com/pulumi/pulumi-xyz/sdk/go/xyz/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type Resource struct {
pulumi.CustomResourceState
// Sample attribute.
SampleAttribute pulumi.StringPtrOutput `pulumi:"sampleAttribute"`
}
// NewResource registers a new resource with the given unique name, arguments, and options.
func NewResource(ctx *pulumi.Context,
name string, args *ResourceArgs, opts ...pulumi.ResourceOption) (*Resource, error) {
if args == nil {
args = &ResourceArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Resource
err := ctx.RegisterResource("xyz:index/resource:Resource", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetResource gets an existing Resource resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetResource(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ResourceState, opts ...pulumi.ResourceOption) (*Resource, error) {
var resource Resource
err := ctx.ReadResource("xyz:index/resource:Resource", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Resource resources.
type resourceState struct {
// Sample attribute.
SampleAttribute *string `pulumi:"sampleAttribute"`
}
type ResourceState struct {
// Sample attribute.
SampleAttribute pulumi.StringPtrInput
}
func (ResourceState) ElementType() reflect.Type {
return reflect.TypeOf((*resourceState)(nil)).Elem()
}
type resourceArgs struct {
// Sample attribute.
SampleAttribute *string `pulumi:"sampleAttribute"`
}
// The set of arguments for constructing a Resource resource.
type ResourceArgs struct {
// Sample attribute.
SampleAttribute pulumi.StringPtrInput
}
func (ResourceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*resourceArgs)(nil)).Elem()
}
type ResourceInput interface {
pulumi.Input
ToResourceOutput() ResourceOutput
ToResourceOutputWithContext(ctx context.Context) ResourceOutput
}
func (*Resource) ElementType() reflect.Type {
return reflect.TypeOf((**Resource)(nil)).Elem()
}
func (i *Resource) ToResourceOutput() ResourceOutput {
return i.ToResourceOutputWithContext(context.Background())
}
func (i *Resource) ToResourceOutputWithContext(ctx context.Context) ResourceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResourceOutput)
}
// ResourceArrayInput is an input type that accepts ResourceArray and ResourceArrayOutput values.
// You can construct a concrete instance of `ResourceArrayInput` via:
//
// ResourceArray{ ResourceArgs{...} }
type ResourceArrayInput interface {
pulumi.Input
ToResourceArrayOutput() ResourceArrayOutput
ToResourceArrayOutputWithContext(context.Context) ResourceArrayOutput
}
type ResourceArray []ResourceInput
func (ResourceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Resource)(nil)).Elem()
}
func (i ResourceArray) ToResourceArrayOutput() ResourceArrayOutput {
return i.ToResourceArrayOutputWithContext(context.Background())
}
func (i ResourceArray) ToResourceArrayOutputWithContext(ctx context.Context) ResourceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResourceArrayOutput)
}
// ResourceMapInput is an input type that accepts ResourceMap and ResourceMapOutput values.
// You can construct a concrete instance of `ResourceMapInput` via:
//
// ResourceMap{ "key": ResourceArgs{...} }
type ResourceMapInput interface {
pulumi.Input
ToResourceMapOutput() ResourceMapOutput
ToResourceMapOutputWithContext(context.Context) ResourceMapOutput
}
type ResourceMap map[string]ResourceInput
func (ResourceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Resource)(nil)).Elem()
}
func (i ResourceMap) ToResourceMapOutput() ResourceMapOutput {
return i.ToResourceMapOutputWithContext(context.Background())
}
func (i ResourceMap) ToResourceMapOutputWithContext(ctx context.Context) ResourceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResourceMapOutput)
}
type ResourceOutput struct{ *pulumi.OutputState }
func (ResourceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Resource)(nil)).Elem()
}
func (o ResourceOutput) ToResourceOutput() ResourceOutput {
return o
}
func (o ResourceOutput) ToResourceOutputWithContext(ctx context.Context) ResourceOutput {
return o
}
// Sample attribute.
func (o ResourceOutput) SampleAttribute() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Resource) pulumi.StringPtrOutput { return v.SampleAttribute }).(pulumi.StringPtrOutput)
}
type ResourceArrayOutput struct{ *pulumi.OutputState }
func (ResourceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Resource)(nil)).Elem()
}
func (o ResourceArrayOutput) ToResourceArrayOutput() ResourceArrayOutput {
return o
}
func (o ResourceArrayOutput) ToResourceArrayOutputWithContext(ctx context.Context) ResourceArrayOutput {
return o
}
func (o ResourceArrayOutput) Index(i pulumi.IntInput) ResourceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Resource {
return vs[0].([]*Resource)[vs[1].(int)]
}).(ResourceOutput)
}
type ResourceMapOutput struct{ *pulumi.OutputState }
func (ResourceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Resource)(nil)).Elem()
}
func (o ResourceMapOutput) ToResourceMapOutput() ResourceMapOutput {
return o
}
func (o ResourceMapOutput) ToResourceMapOutputWithContext(ctx context.Context) ResourceMapOutput {
return o
}
func (o ResourceMapOutput) MapIndex(k pulumi.StringInput) ResourceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Resource {
return vs[0].(map[string]*Resource)[vs[1].(string)]
}).(ResourceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ResourceInput)(nil)).Elem(), &Resource{})
pulumi.RegisterInputType(reflect.TypeOf((*ResourceArrayInput)(nil)).Elem(), ResourceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ResourceMapInput)(nil)).Elem(), ResourceMap{})
pulumi.RegisterOutputType(ResourceOutput{})
pulumi.RegisterOutputType(ResourceArrayOutput{})
pulumi.RegisterOutputType(ResourceMapOutput{})
}