Initial commit

This commit is contained in:
Bryce Lampe
2024-03-07 11:17:15 -08:00
committed by GitHub
commit 0d9ce7c53c
70 changed files with 4168 additions and 0 deletions

6
examples/go/Pulumi.yaml Normal file
View File

@@ -0,0 +1,6 @@
name: provider-xyz-native
runtime: go
plugins:
providers:
- name: xyz
path: ../../bin

7
examples/go/go.mod Normal file
View File

@@ -0,0 +1,7 @@
module provider-xyz-native
go 1.20
require (
github.com/pulumi/pulumi/sdk/v3 v3.30.0
)

21
examples/go/main.go Normal file
View File

@@ -0,0 +1,21 @@
package main
import (
"github.com/pulumi/pulumi-xyz/sdk/go/xyz"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myRandomResource, err := xyz.NewRandom(ctx, "myRandomResource", &xyz.RandomArgs{
Length: pulumi.Int(24),
})
if err != nil {
return err
}
ctx.Export("output", map[string]interface{}{
"value": myRandomResource.Result,
})
return nil
})
}