https://pulumi.com logo
Docs
Join the conversationJoin Slack
Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
plugin-framework
pulumi-cdk
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumi-service
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by Linen
golang
  • a

    ambitious-furniture-60362

    12/21/2018, 8:22 PM
    it says key value, but maybe an example could be interesting
  • w

    white-balloon-205

    12/21/2018, 8:32 PM
    siteBucket, err := s3.NewBucket(ctx, "s3-website-bucket", &s3.BucketArgs{
    			Website: map[string]interface{}{
    				"indexDocument": "index.html",
    			},
    			Tags: map[string]interface{}{
    				"name": "hello",
    			},
    		})
  • w

    white-balloon-205

    12/21/2018, 8:33 PM
    The loose typing of the Go library definitely makes this a little less obvious - https://github.com/pulumi/pulumi/issues/1614 and https://github.com/pulumi/pulumi-aws/issues/248 are tracking improvements we want to make here.
    👍 1
  • a

    ambitious-furniture-60362

    12/21/2018, 8:38 PM
    Hey luke thanks 🙂
  • a

    ambitious-furniture-60362

    12/21/2018, 8:40 PM
    This https://github.com/pulumi/pulumi-gcp/blob/v0.16.2/sdk/go/gcp/storage/bucket.go#L219 was confusing to me , so thanks 🙂
  • a

    ambitious-furniture-60362

    12/21/2018, 10:19 PM
    Another noisy question, should I make explicit dependences between
    ObjectACL
    and
    BucketObject
    in that case how I should proceed ? Thanks 🙂
    Previewing destroy (gcp-go-dev):
    
     -  gcp:storage:ObjectACL indexAllUsers delete
     -  gcp:storage:Bucket pulumibucket delete
     -  gcp:storage:BucketObject index.html delete
     -  pulumi:pulumi:Stack pulumi-poc-gcp-go-dev delete
    
    Resources:
        4 changes
        - 4 to delete
    
    Destroying (gcp-go-dev):
    
     -  gcp:storage:Bucket pulumibucket deleting
     -  gcp:storage:BucketObject index.html deleting
     -  gcp:storage:ObjectACL indexAllUsers deleting
     -  gcp:storage:BucketObject index.html deleted
     -  gcp:storage:ObjectACL indexAllUsers deleting error: Plan apply failed: deleting urn:pulumi:gcp-go-dev::pulumi-poc::gcp:storage/objectACL:ObjectACL::indexAllUsers: Error deleting entity allUsers ACL: googleapi: Error 404: No such object: my-bucket-pulumi-poc-olopez/index.html, notFound
     -  gcp:storage:ObjectACL indexAllUsers **deleting failed** error: Plan apply failed: deleting urn:pulumi:gcp-go-dev::pulumi-poc::gcp:storage/objectACL:ObjectACL::indexAllUsers: Error deleting entity allUsers ACL: googleapi: Error 404: No such object: my-bucket-pulumi-poc-olopez/index.html, notFound
     -  gcp:storage:Bucket pulumibucket deleting error: Plan apply failed: transport is closing
     -  gcp:storage:Bucket pulumibucket **deleting failed** error: Plan apply failed: transport is closing
        pulumi:pulumi:Stack pulumi-poc-gcp-go-dev
    w
    • 2
    • 4
  • c

    chilly-photographer-60932

    01/12/2019, 8:39 PM
    Everything being a interface is big blocker https://github.com/pulumi/pulumi-aws/blob/e717e1e931012c2d8f02b267797572bb40be88fe/sdk/go/aws/ec2/networkAcl.go#L123
    w
    • 2
    • 3
  • c

    chilly-photographer-60932

    01/12/2019, 11:54 PM
    type DefaultSecurityGroupArgs struct {
        // Can be specified multiple times for each
        // egress rule. Each egress block supports fields documented below.
        Egress interface{}
        // Can be specified multiple times for each
        // ingress rule. Each ingress block supports fields documented below.
        Ingress             interface{}
        RevokeRulesOnDelete interface{}
        // A mapping of tags to assign to the resource.
        Tags interface{}
        // The VPC ID. **Note that changing
        // the `vpc_id` will _not_ restore any default security group rules that were
        // modified, added, or removed.** It will be left in its current state
        VpcId interface{}
    }
    What type should I pass for
    Ingress
    ? I tried
    map[string]interface{})
    . It fails with
    ingress: should be a list
    • 1
    • 1
  • c

    chilly-photographer-60932

    01/13/2019, 4:49 AM
    pulumi.Run(func(ctx *pulumi.Context) error {
    		userArgs := &iam.UserArgs{Name:"test"}
    		user,e := iam.NewUser(ctx,"test",userArgs)
    		if e!= nil {
    			return e
    		}
    		accessKeyArgs := &iam.AccessKeyArgs{User:"test"}
    		key, i := iam.NewAccessKey(ctx, "test", accessKeyArgs)
    		fmt.Println(key)
    		if i != nil{
    			return i
    		}
    		profile, e := iam.	pulumi.Run(func(ctx *pulumi.Context) error {
    		userArgs := &iam.UserArgs{Name:"test"}
    		user,e := iam.NewUser(ctx,"test",userArgs)
    		if e!= nil {
    			return e
    		}
    		accessKeyArgs := &iam.AccessKeyArgs{User:"test"}
    		key, i := iam.NewAccessKey(ctx, "test", accessKeyArgs)
    		fmt.Println(key)
    		if i != nil{
    			return i
    		}
    		profile, e := iam.NewUserLoginProfile(ctx, "test",
    			&iam.UserLoginProfileArgs{PasswordLength: 10, PasswordResetRequired: true,
    				User:"test",PgpKey:key.PgpKey()})
    		if e != nil {
    			return e
    		}
    		ctx.Export("user", user.Name())
    		ctx.Export("userNam", profile.URN())
    		ctx.Export("key", accessKeyArgs.PgpKey)
    		return nil
    	})(ctx, "test",
    			&iam.UserLoginProfileArgs{PasswordLength: 10, PasswordResetRequired: true,
    				User:"test",PgpKey:key.PgpKey()})
    		if e != nil {
    			return e
    		}
    		ctx.Export("user", user.Name())
    		ctx.Export("userNam", profile.URN())
    		ctx.Export("key", accessKeyArgs.PgpKey)
    		return nil
    	})
    I am unable to create
    NewUserLoginProfile
    without a PGP key, how do I create one?
    g
    c
    +3
    • 6
    • 26
  • i

    incalculable-angle-91273

    01/16/2019, 12:37 AM
    hello all. I’m having trouble getting exports to work. I removed all my resource to the simplest example I could try and it isn’t working. Can someone explain why this code sample is broken please?
    package main
    
    import (
    	"<http://github.com/pulumi/pulumi/sdk/go/pulumi|github.com/pulumi/pulumi/sdk/go/pulumi>"
    )
    
    func main() {
    
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ctx.Export("x", "hello")
    		return nil
    
    	})
    }
    b
    • 2
    • 5
  • i

    incalculable-angle-91273

    01/16/2019, 12:37 AM
    By “broken” I mean I can
    pulumi up
    but when I get this for my stack output:
    â–¶ pulumi stack output
    Current stack outputs (0):
        No output values currently in this stack
  • a

    aloof-tailor-93191

    03/19/2019, 2:51 AM
    I've been away from Pulumi for a few months, how is the golang support looking these days?
    c
    • 2
    • 10
  • w

    worried-oxygen-59641

    05/23/2019, 4:46 PM
    Oh thats really disappointing. Saw a presentation on KubeCon about Pulumi and there was also Go on the list of supported languages.
  • c

    creamy-potato-29402

    05/23/2019, 4:57 PM
    I think if other people have great ideas about how to make this experience really great, we’re happy to steal them
  • c

    creamy-potato-29402

    05/23/2019, 5:43 PM
    So, to expand a bit, in JS you have some container member
    ports: []
    , but in Go you have to do something like
    ports: ContainerPortArray{}
    .
  • c

    creamy-potato-29402

    05/23/2019, 5:43 PM
    And,
    ports
    will have to be
    interface{}
  • c

    creamy-potato-29402

    05/23/2019, 5:43 PM
    So for all the deeply-nested properties, it’s going to get a bit strange.
  • c

    creamy-potato-29402

    05/23/2019, 5:44 PM
    If you have ideas, @worried-oxygen-59641, I’d love to hear them. 🙂
  • c

    creamy-potato-29402

    05/23/2019, 5:45 PM
    I do think it’s telling, btw, that people try to avoid using resource types in client-go directly. That should function as an existence proof that this experience can be elegant; that it’s not is perhaps a good indication that it can’t be?
  • w

    white-balloon-205

    05/23/2019, 6:07 PM
    @worried-oxygen-59641 Just adding a little more color on this. Pulumi does support Go today. There are a handful of features that are still missing (https://github.com/pulumi/pulumi/issues/1614), but there are many users using Pulumi with Go successfully today. Once we land a plan for https://github.com/pulumi/pulumi/issues/2430, it will be easier to keep a wide variety of languages supported to an equal level going forward. And in the meantime - PRs definitely welcome! 🙂.
  • h

    helpful-bear-175

    07/26/2019, 8:26 PM
    I'm using
    <https://github.com/pulumi/pulumi-tf-provider-boilerplate>`` to build a new pulumi provider. when I run ```make ensure
  • h

    helpful-bear-175

    07/26/2019, 8:26 PM
    /bin/bash: gomod-doccopy: command not found
  • h

    helpful-bear-175

    07/26/2019, 8:27 PM
    16:15 $ go get <http://github.com/pulumi/scripts/gomod-doccopy|github.com/pulumi/scripts/gomod-doccopy>
    go: finding <http://github.com/pulumi/scripts/gomod-doccopy|github.com/pulumi/scripts/gomod-doccopy> latest
    go: finding <http://github.com/pulumi/scripts|github.com/pulumi/scripts> latest
  • g

    gentle-diamond-70147

    07/26/2019, 8:50 PM
    did you do
    go get <http://github.com/pulumi/scripts/gomod-doccopy|github.com/pulumi/scripts/gomod-doccopy>
    ?
  • h

    helpful-bear-175

    07/26/2019, 8:55 PM
    Ran this
    In the root of the repository, run:
    
    go get <http://github.com/pulumi/scripts/gomod-doccopy|github.com/pulumi/scripts/gomod-doccopy>
  • h

    helpful-bear-175

    07/26/2019, 8:56 PM
    and (Note: do not set GO111MODULE=on here)
  • h

    helpful-bear-175

    07/26/2019, 9:00 PM
    Basically, following the instruction line-by-line
  • g

    gentle-diamond-70147

    07/26/2019, 9:00 PM
    you ran it and still got that error?
  • h

    helpful-bear-175

    07/26/2019, 9:00 PM
    Correct
  • h

    helpful-bear-175

    07/26/2019, 9:03 PM
    Maybe something with my go env Users/michaelroach/.go/src/github.com/pulumi/scripts
Powered by Linen
Title
h

helpful-bear-175

07/26/2019, 9:03 PM
Maybe something with my go env Users/michaelroach/.go/src/github.com/pulumi/scripts
View count: 3