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
  • f

    freezing-artist-51725

    09/26/2019, 12:57 AM
    is Golang functional complete? The official doc says it is still not stable yet.
    b
    • 2
    • 2
  • c

    cold-car-23440

    09/26/2019, 9:15 PM
    @stocky-spoon-28903 do you have a basic example of looping logic for availability zones?
    • 1
    • 1
  • c

    cold-car-23440

    09/28/2019, 4:32 PM
    where am i going wrong with the resource dependencies please
    resourceGroup, err := core.NewResourceGroup(ctx, resourcegroupName, &core.ResourceGroupArgs{
    	Location: location,
    })
    if err != nil {
    	return err
    }
    
    // Create vnet
    virtualNetwork, err := network.NewVirtualNetwork(ctx, vnetName, &network.VirtualNetworkArgs{
    	Name:              vnetName,
    	Location:          location,
    	ResourceGroupName: resourcegroupName,
    	AddressSpaces:     VnetAddressSpaces,
    }, pulumi.ResourceOpt{DependsOn: []Resource{resourceGroup.id}})
    if err != nil {
    	return err
    }
  • b

    broad-dog-22463

    09/28/2019, 5:11 PM
    You shouldn’t need to do that @cold-car-23440
  • b

    broad-dog-22463

    09/28/2019, 5:12 PM
    Your virtualNetwork ResourceGroupName can be, resoureGroup.Name
  • b

    broad-dog-22463

    09/28/2019, 5:12 PM
    And that creates the dependency graph between them both
  • c

    cold-car-23440

    09/28/2019, 5:15 PM
    ahhh yea didn’t notice i did that. in any instance where i do need to explicitly define the dependency , how would i do it?
  • g

    gentle-diamond-70147

    09/28/2019, 5:37 PM
    virtualNetwork, err := network.NewVirtualNetwork(ctx, vnetName, &network.VirtualNetworkArgs{
        Name:              vnetName,
        Location:          location,
        ResourceGroupName: resourcegroupName,
        AddressSpaces:     VnetAddressSpaces,
    }, pulumi.ResourceOpt{DependsOn: []pulumi.Resource{resourceGroup}})
  • g

    gentle-diamond-70147

    09/28/2019, 5:38 PM
    But like Paul said, you can just use the output from
    resourceGroup
    as the input to
    virtualNetwork
    to create the dependency.
    virtualNetwork, err := network.NewVirtualNetwork(ctx, vnetName, &network.VirtualNetworkArgs{
        Name:              vnetName,
        Location:          location,
        ResourceGroupName: resourceGroup.Name(),
        AddressSpaces:     VnetAddressSpaces,
    })
  • c

    cold-car-23440

    09/28/2019, 5:45 PM
    awesome - thanks
  • c

    cold-car-23440

    09/28/2019, 5:45 PM
    yea i’ve changed it to refer to the resource directly rather than the name
  • b

    broad-dog-22463

    09/28/2019, 6:03 PM
    👍
  • s

    some-carpenter-53382

    10/01/2019, 10:30 PM
    hello. where are all the docs for golang/pulumi?
  • c

    creamy-potato-29402

    10/01/2019, 10:54 PM
    @some-carpenter-53382 Our Go support is not fully complete, yet, and I think we do not quite have docs yet. @white-balloon-205?
  • w

    white-balloon-205

    10/01/2019, 11:21 PM
    API Docs are available at: * https://godoc.org/github.com/pulumi/pulumi/sdk/go/pulumi * https://godoc.org/github.com/pulumi/pulumi-aws/sdk/go/aws And an example is at: * https://github.com/pulumi/examples/tree/master/aws-go-s3-folder
    👍 1
  • d

    dazzling-rocket-15242

    10/02/2019, 2:02 PM
    Hey guys, what does this error mean?
    error: Duplicate resource URN
    w
    • 2
    • 2
  • p

    prehistoric-magician-36745

    10/12/2019, 6:42 PM
    Hi, is Eks plugin support Golang ?
    w
    • 2
    • 2
  • c

    cold-car-23440

    10/17/2019, 8:19 AM
    When do we think golang will move from preview status to officially supported?
  • s

    stocky-spoon-28903

    10/17/2019, 9:31 AM
    @cold-car-23440 I don’t have a date on that but cross language support is being actively worked on I think
    👍 1
  • c

    cold-car-23440

    10/17/2019, 9:54 AM
    nice!
  • g

    glamorous-television-20475

    10/25/2019, 2:27 PM
    Hello all, just starting out with Pulumi. After some wrestling with it a little, I was able to get the aws-go-s3-folder example to work. Looking at the code, it appears all the
    *Args
    classes use
    interface{}
    instead of building out real types, is there a reason for that approach? I assume it’s to check for
    nil
    but it kind of feels like you lose the benefits of using a strongly typed language when you set everything to be an
    interface{}
    .
    b
    • 2
    • 6
  • l

    loud-kitchen-81458

    10/29/2019, 1:15 PM
    Hi all...Heard about Pulumi from Duffy's kubernetes podcast...looks very interesting. In the web (pulumi.com)
    go
    support is still under preview. When it's going come out from preview?
    w
    • 2
    • 1
  • d

    dazzling-rocket-15242

    11/11/2019, 2:35 PM
    Hey guys ... using the Go framework for Pulumi and so far enjoying it very much. I've run into an issue though trying to create a logMetric in GCP. The error is
    unrecognized resource type (Check): gcp:logging/metric:Metric
    . From what I can tell this is an error coming back from a grpc call against what I assume is the pulumi server. Any ideas? I haven't tried other languages and won't; will just go back to terraform 😞.
    g
    • 2
    • 21
  • w

    white-balloon-205

    11/13/2019, 12:05 AM
    Heads up to folks tracking the Go support for Pulumi that we are going to be doing some active work on improving and expanding the Go support in Pulumi over the coming weeks. You can track the progress on that work in https://github.com/pulumi/pulumi/issues/1614 (and the linked issues). This includes some significant API changes, including more strongly-typed support for Input and Output types, as well as catching up the Go support with the majority of the features of the core Pulumi programming model. We do expect this work to involve breaking changes to the current preview Go support, so we encourage existing users to ensure they are pinning to an existing released version of their Go dependencies (using Go Modules or some other Go dependency management solution) until they are ready to update to new versions which support the full set of improvements.
    🎉 1
    ❤️ 5
    😛artypus: 2
    g
    • 2
    • 3
  • t

    tall-carpet-41250

    11/20/2019, 4:07 AM
    Is go mod supported for dep management?
  • t

    tall-carpet-41250

    11/20/2019, 4:16 AM
    Looks like everything is fine. Just the azure package is on an earlier version of pulumi than was pulled down.
  • a

    astonishing-spoon-27005

    12/02/2019, 5:05 PM
    can someone help me understand how to get a string value out of an Output or StringOutput? i’m trying to just get the arn of a dynamo table that i’ve created, and i have this:
  • a

    astonishing-spoon-27005

    12/02/2019, 5:06 PM
    roverTable, err := makeRoverTable(ctx)
    if err != nil {return err}
    
    tableArn := roverTable.Arn().Apply(func(arn string) (interface{}, error) {
    	return arn, nil
    })
  • a

    astonishing-spoon-27005

    12/02/2019, 5:06 PM
    but that just converts from a
    StringOutput
    to an
    Output
  • a

    astonishing-spoon-27005

    12/02/2019, 5:06 PM
    how do i get the arn as a string that i can pass to a policy document?
    w
    • 2
    • 2
Powered by Linen
Title
a

astonishing-spoon-27005

12/02/2019, 5:06 PM
how do i get the arn as a string that i can pass to a policy document?
w

white-balloon-205

12/02/2019, 5:16 PM
You cannot turn an output into string. You can transform the output into a new value by writing code inside the callback to apply. For a policy document, you will want your apply callback to construct the document and then lass the resulting output (now representing the document) as an input to a resource. See https://www.pulumi.com/docs/intro/concepts/programming-model/#outputs for more details.
a

astonishing-spoon-27005

12/02/2019, 5:25 PM
ah, ok. i think that makes sense. thanks @white-balloon-205
View count: 3