2020-02-06 20:02:13 +00:00
|
|
|
// Copyright 2016-2020, Pulumi Corporation. All rights reserved.
|
2022-09-14 03:02:19 +00:00
|
|
|
//go:build !all
|
|
|
|
// +build !all
|
2020-02-06 20:02:13 +00:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2021-03-17 13:20:05 +00:00
|
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
2020-02-06 20:02:13 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// FooComponent is a component resource
|
|
|
|
type FooComponent struct {
|
|
|
|
pulumi.ResourceState
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
pulumi.Run(func(ctx *pulumi.Context) error {
|
|
|
|
fooComponent := &FooComponent{}
|
|
|
|
alias := &pulumi.Alias{
|
|
|
|
Name: pulumi.String("foo"),
|
|
|
|
}
|
|
|
|
opts := pulumi.Aliases([]pulumi.Alias{*alias})
|
|
|
|
return ctx.RegisterComponentResource("foo:component", "newfoo", fooComponent, opts)
|
|
|
|
})
|
|
|
|
}
|