https://pulumi.com logo
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
  • s

    salmon-account-74572

    07/17/2020, 2:17 PM
    Does anyone have an example of using a StackReference in Go?
    i
    l
    • 3
    • 3
  • s

    salmon-account-74572

    07/17/2020, 4:46 PM
    Following up on my previous question regarding StackReferences in Go, I'm having an issue referencing an array in another stack. I have an array of AWS subnet IDs exported from an infrastructure stack like this:
    ctx.Export("privSubnetIds", pulumi.StringArray(privSubnetIds))
    In another stack that builds on top of that infrastructure stack, I reference the array like this:
    infra, err := pulumi.NewStackReference(ctx, "org/project/stack", nil)
    privSubnets := infra.GetOutput(pulumi.StringArray("privSubnetIds))
    I haven't tried to run this yet, because
    gopls
    inside VS Code is showing errors on the
    privSubnets
    assignment line & when I try to reference that value inside an
    ec2.NewInstance
    stanza. I think the error is in the assignment line, but I'm not quite sure how it needs to be changed to work. Any suggestions?
    l
    b
    • 3
    • 20
  • s

    silly-byte-26835

    07/18/2020, 5:38 AM
    Is there any sample Go code that shows how to setup and exec a GCP compute instance provisioner?
    w
    • 2
    • 2
  • s

    salmon-account-74572

    07/22/2020, 5:15 PM
    I'm continuing to struggle with stack references. Following up on this thread (https://pulumi-community.slack.com/archives/CCWP5TJ5U/p1595004364263000), I've adopted the recommended
    ApplyStringArray
    and
    ApplyString
    functions to the outputs from the stack reference, but trying to create an instance using a security group and subnet from the stack reference fails. I guess it's defaulting to the first subnet in the default VPC and not using my subnet at all. Code in thread below.
    l
    • 2
    • 9
  • b

    bright-ghost-66126

    07/27/2020, 8:49 PM
    the code that is generated from this using tf2pulummi
    resource "okta_policy_mfa" "blue-ocean" {
    				name            = "Blue Ocean"
    				status          = "ACTIVE"
    				description     = "Blue Ocean"
    				groups_included = ["abc"]
    				priority        = okta_policy_mfa.svc.priority + 1
    			  }
    			  resource "okta_policy_mfa" "svc" {
    				name            = "Service Accounts"
    				status          = "ACTIVE"
    				description     = ""
    				groups_included = ["abc"]
    				priority        = 1
    			  }
    looks like this
    import (
            	"<http://github.com/pulumi/pulumi-okta/sdk/v2/go/okta/policy|github.com/pulumi/pulumi-okta/sdk/v2/go/okta/policy>"
            	"<http://github.com/pulumi/pulumi/sdk/v2/go/pulumi|github.com/pulumi/pulumi/sdk/v2/go/pulumi>"
            )
            
            func main() {
            	pulumi.Run(func(ctx *pulumi.Context) error {
            		svc, err := policy.NewMfa(ctx, "svc", &policy.MfaArgs{
            			Name:        pulumi.String("Service Accounts"),
            			Status:      pulumi.String("ACTIVE"),
            			Description: pulumi.String(""),
            			GroupsIncludeds: pulumi.StringArray{
            				pulumi.String("abc"),
            			},
            			Priority: <http://pulumi.Int|pulumi.Int>(1),
            		})
            		if err != nil {
            			return err
            		}
            		_, err = policy.NewMfa(ctx, "blue_ocean", &policy.MfaArgs{
            			Name:        pulumi.String("Blue Ocean"),
            			Status:      pulumi.String("ACTIVE"),
            			Description: pulumi.String("Blue Ocean"),
            			GroupsIncludeds: pulumi.StringArray{
            				pulumi.String("abc"),
            			},
            			Priority: <http://pulumi.Int|pulumi.Int>(svc.Priority.ApplyT(func(priority int) (float64, error) {
            				return priority + 1, nil
            			}).(pulumi.Float64Output)),
            		})
            		if err != nil {
            			return err
            		}
            		return nil
            	})
            }
    running this code results in this
    pulumi_okta [pulumi_okta.test]
    /Users/jjayaweera/go/src/pulumi_okta/some_test.go:143:24: cannot convert svc.Priority.OutputState.ApplyT(func literal).(pulumi.Float64Output) (type pulumi.Float64Output) to type <http://pulumi.Int|pulumi.Int>
    /Users/jjayaweera/go/src/pulumi_okta/some_test.go:144:21: cannot use priority + 1 (type int) as type float64 in return argument
    FAIL	pulumi_okta [build failed]
    FAIL
    What is the correct syntax for this
    Priority: <http://pulumi.Int|pulumi.Int>(svc.Priority.ApplyT(func(priority int) (float64, error) {
            				return priority + 1, nil
            			}).(pulumi.Float64Output)),
    l
    • 2
    • 1
  • s

    salmon-account-74572

    07/28/2020, 2:31 AM
    If I have an array of AZ names created like this:
    azNames := make([]string, numOfAZs)
    for idx := 0; idx < numOfAZs; idx++ {
    	azNames[idx] = rawAzInfo.Names[idx]
    }
    where
    rawAzInfo
    is the result of the
    aws.GetAvailabilityZones
    resource, how can I use that array as an input to the AvailabilityZones argument of the
    elb.NewLoadBalancer
    resource? Alternately, if I have an array of instance IDs, how could I use that array of instance IDs as an input to the Instances argument of the
    elb.NewLoadBalancer
    resource?
    l
    • 2
    • 9
  • i

    important-appointment-55126

    07/28/2020, 6:49 PM
    bleh the AWS SDK changed Tags form a
    pulumi.MapInput
    to a
    pulumi.StringMapInput
    forcing me to refactor my code.. not huge, but an unexpected breaking change for a point release
    b
    • 2
    • 2
  • s

    salmon-account-74572

    07/29/2020, 2:42 PM
    Anyone have an example of creating an AWS classic ELB using Go? I haven't been able to find one yet.
    • 1
    • 1
  • i

    important-appointment-55126

    07/29/2020, 3:39 PM
    I’m translating some of this https://github.com/pulumi/examples/blob/master/aws-ts-static-website/index.ts to Go. Performing the ACM certificate domain validation seems problematic though. In typescript it’s just this:
    const certificateValidationDomain = new aws.route53.Record(`${config.targetDomain}-validation`, {
            name: certificate.domainValidationOptions[0].resourceRecordName,
            zoneId: hostedZoneId,
            type: certificate.domainValidationOptions[0].resourceRecordType,
            records: [certificate.domainValidationOptions[0].resourceRecordValue],
            ttl: tenMinutes,
        });
  • i

    important-appointment-55126

    07/29/2020, 3:39 PM
    Translating that directly to Go gives this
    certValidationDomain, err := route53.NewRecord(ctx, domain+"-validation", &route53.RecordArgs{                                                                                                                     
                Name:    cert.DomainValidationOptions.Index(<http://pulumi.Int|pulumi.Int>(0)).ResourceRecordName(),                                                                                                                               
                Type:    cert.DomainValidationOptions.Index(<http://pulumi.Int|pulumi.Int>(0)).ResourceRecordType(),                                                                                                                               
                Records: pulumi.StringArray{cert.DomainValidationOptions.Index(<http://pulumi.Int|pulumi.Int>(0)).ResourceRecordValue()},                                                                                                          
                ZoneId:  zone.ID(),                                                                                                                                                                                            
                Ttl:     <http://pulumi.Int|pulumi.Int>(600),                                                                                                                                                                                      
            })
  • i

    important-appointment-55126

    07/29/2020, 3:39 PM
    however, that gives this kind of error
    /main.go:87:4: cannot use cert.DomainValidationOptions.Index(<http://pulumi.Int|pulumi.Int>(0)).ResourceRecordName() (type pulumi.StringPtrOutput) as type pulumi.StringInput in field value:
            pulumi.StringPtrOutput does not implement pulumi.StringInput (missing ToStringOutput method)
  • i

    important-appointment-55126

    07/29/2020, 3:40 PM
    i guess i’ll work around using
    ApplyT
    but feels like it shouldn’t be necessary
    l
    • 2
    • 2
  • o

    orange-electrician-25669

    08/08/2020, 8:29 PM
    HI who can help to create "LoadBalancer" i have issue in params Cannot convert expression of type '[]string' to type 'String' Golang
    type (
    	S1LBConfig struct {
    		LoadBalancer struct {
    			Rules []struct {
    				Lb struct {
    					SecurityGroups           []string
    					Subnets                  []string
    				} 
    			} 
    		} 
    	}
    )
    
    SecurityGroups:           pulumi.StringArray{pulumi.String(s1LoadBalancerConfig.LoadBalancer.Rules[k].Lb.SecurityGroups)},
    
    Cannot convert expression of type '[]string' to type 'String'
    l
    • 2
    • 1
  • g

    green-intern-96475

    08/11/2020, 2:27 PM
    Hey, a few questions: 1. Is there AWS EKS managed node group support in go? https://github.com/pulumi/pulumi-eks is nice but only typescript. I only see classic node groups supported in https://github.com/pulumi/pulumi-aws in the go sdk 2. Similarly, https://github.com/pulumi/pulumi-awsx does not have go support. Is there a timeline for that? I am specifically looking at the vpc best practices creation function. It would be nice to have that single function call. 3. For getting values out of a created vpc resource, I see that direct value references do not seem to be supported in Go. It looks like I should be using the Apply() function as described here. Can you tell me how that would specifically work for getting a vpc id as a string? I am looking at this example
    url := vpc.DnsName.ApplyString(func(dnsName string) string {
        return "https://" + dnsName
    })
    Thank you
    l
    • 2
    • 1
  • m

    microscopic-flower-40914

    08/11/2020, 2:39 PM
    Hi, Is it possible in Go to execute a function at runtime? I would like to create a resource, write some information of a resource to a local file, then package it up and use that package in another to be created resource. I see something like that is possible in Javascript with callbacks, but can't find anything for Go. Thanks
    i
    • 2
    • 5
  • m

    microscopic-flower-40914

    08/12/2020, 6:14 AM
    Another question: After creating subnets my functions returns []*ec2.Subnet, but in ElasticBeanstalk I need to add them to EnvironmentSettingArray with EnvironmentSettingArgs {Name: pulumi.String("Subnets"), NampeSpace: pulumi.String("aws:ec2:vpc"), Value: pulumi.String("subnetid1,subnetid2,subnetid3")} However how can I create a comma seperated string from the array, as when I do fmt.Sprintf("%v,%v,%v",subnet[0].ID(),subnet[1].ID(),subnet[2].ID()) I only get the pointers, not the real value as this is filled at deployment time and not after creation.
    i
    • 2
    • 2
  • c

    chilly-rainbow-79265

    08/20/2020, 7:14 AM
    Hi guys, I'm playing around in pulumi. Was trying to have custom keyspace so that I can have a template for creating vms But getting following error Pulumi.dev.yaml
    config:
      vm:instance_spec:
      - count: 1
        data_disk_size: 50
        name: cassandra
        resource_group: pu_demo
        type: Standard_A8_v2
        user_name: deployer
    main.go
    // vm config struct
    type Data struct {
    	Data []struct {
    		Name              string `json:"name"`
    		Type              string `json:"type"`
    		Count             int    `json:"count"`
    		DataDiskSize      int    `json:"data_disk_size"`
    		UserName          string `json:"user_name"`
    		ResourceGroupName string `json:"resource_group"`
    	} `json:"instance_spec"`
    }
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		vmConfig := config.New(ctx, "vm")
    		var d Data
    		if err := vmConfig.GetObject("instance_spec", &d); err != nil {
    			return err
    		})
    		fmt.Printf("%v\n", d)
    return nil
    )}
    }
    and I'm getting this error
    Diagnostics:
      pulumi:pulumi:Stack (demo-dev):
        error: program failed: 1 error occurred:
            * json: cannot unmarshal array into Go value of type main.Data
        exit status 1
        error: an unhandled error occurred: program exited with non-zero exit code: 1
    i
    • 2
    • 10
  • g

    gifted-city-99717

    08/23/2020, 2:28 PM
    Hi, I’m trying to increase testing coverage and want to know how y’all recommend mocking out lookup functions like
    ec2.GetSubnetIds()
    ? Maybe testing these failure scenarios is only really possible using something like the integration testing utilities?
    👍 1
    l
    • 2
    • 1
  • h

    hallowed-beach-15050

    08/27/2020, 2:27 AM
    Anyone here using the datadog provider in golang? I am seeing it eat up 17GB of memory when it compiles
  • h

    hallowed-beach-15050

    08/27/2020, 2:28 AM
    my coworker tracked it down to what we believe is an issue with a 4MB source file… but has anyone else seen this?
  • h

    hallowed-beach-15050

    08/27/2020, 2:28 AM
    https://github.com/pulumi/pulumi-datadog/issues/68 is the issue he opened
    l
    • 2
    • 3
  • r

    red-area-47037

    08/27/2020, 9:24 PM
    I am looking for more complex Golang examples… Can anyone link examples for creating Secrets and (ok, that should be straight forward, but not covered by docs/examples) and for a more detailed GKE configuration?
    c
    • 2
    • 2
  • i

    important-appointment-55126

    08/27/2020, 9:38 PM
    creating secrets in secrets manager? or creating pulumi secrets?
  • r

    red-area-47037

    08/28/2020, 8:34 AM
    Secrets in K8S via Pulumi
  • i

    important-appointment-55126

    08/28/2020, 2:08 PM
    The basic structure for how to create a secret seems covered in the reference docs at least https://www.pulumi.com/docs/reference/pkg/kubernetes/core/v1/secret/
    r
    • 2
    • 8
  • w

    wet-egg-6347

    08/28/2020, 7:47 PM
    i want to create a postgres cluster, and then reuse that pg cluster across stacks this requires that the creator stack exports info on how to connect to the cluster when it comes to the provider, this is easy-- the consumer stack can just use
    pulumi.NewStackReference(...).GetProvider("pg-provider-id")
    however, the consumer stack also needs raw connection info (host, port, etc) in order to inject that info into kubernetes pods, so that the pods can connect to pg at runtime. this is where it gets tricky... • is there some way to get
    postgresql.ProviderArgs
    out of the provider, during pulumi runtime? • is there some easy way to marshal/unmarshal
    postgresql.ProviderArgs
    , so that i can use a string stack export? keep in mind there are no pulumi types (input/output) defined for
    postgresql.ProviderArgs
    -- that's just a struct containing a bunch of pulumi types tia 🙏
    l
    • 2
    • 4
  • r

    red-area-47037

    08/29/2020, 3:31 PM
    Can someone link me an Golang example of how to create a CRD instance using Pulumi? I want to create an instance of Argos Application CRD…
    l
    • 2
    • 5
  • r

    red-area-47037

    08/29/2020, 5:58 PM
    I am currently using Pulumi to spin up a GKE cluster and deploy ArgoCD onto the cluster using the Argo Helm chart. As part of the setup I need to add a private GitRepo. This information is stored in a configmap (argocd-cm) which gets created by the Helm-chart… In order to add the private repo I would have to get the existing configmap (corev1.GetConfigMap( ….) ) and add the values to the data of the configmap. 1. is this really a good idea? 2. can I just use the GetConfigMap func and change the values…
  • o

    orange-electrician-25669

    08/31/2020, 10:33 AM
    HI , i try to create target groups .... and its doing it , pulumi return and list of obj "[]*lb.TargetGroup" in the struct i can see pulumi.StringOutput so my qustion is how do i get this data as string so i can use it in my next ... i need to commper the name of the TG to a tag in the LB and mach the TG to LB ... i want to do it automatic as i have list of TG i create and List of TB i create second Q all my resources are add suffix i try to disable it but is not working any one know how ?
    g
    • 2
    • 2
  • e

    echoing-rain-5741

    08/31/2020, 11:43 AM
    Hi! I have a problem with pulumi cicd using github workflows and installing the google cloud provider. We use the google cloud and the kubernetes providers. The kubernetes provider automatically installs an appropriate version of the plugin, but the gcp provider is never installed. Can we make the gcp plugin version also install automatically? If not, what would be the recommended way of manually installing it? What we are doing is very close to what is described in this guide. This is the corresponding GitHub workflows yaml:
    name: Pulumi
    on:
    - pull_request
    jobs:
    preview:
    name: Preview
    runs-on: ubuntu-latest
    steps:
    - name: checkout
    uses: actions/checkout@v2
    with:
    fetch-depth: 1
    - name: preview
    uses: <docker://pulumi/actions>
    with:
    args: preview
    env:
    GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
    PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
    PULUMI_CI: pr
    PULUMI_ROOT: infra/cluster/processing
    This is the output from the preview step: 
    Run <docker://pulumi/actions>
    10 /usr/bin/docker run --name pulumiactions_99916e --label 3b3ac6 --workdir /github/workspace --rm -e GOOGLE_CREDENTIALS -e PULUMI_ACCESS_TOKEN -e PULUMI_CI -e PULUMI_ROOT -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/xxx/xxx":"/github/workspace" pulumi/actions preview
    11 Logging in using access token from PULUMI_ACCESS_TOKEN
    12 Logged in to <http://pulumi.com|pulumi.com> as xxx (<https://app.pulumi.com/> xxx)
    13 Activated service account credentials for: [<mailto:pulumi-github-workflows-cicd@xxx.iam.gserviceaccount.com|pulumi-github-workflows-cicd@xxx.iam.gserviceaccount.com>]
    14 Adding credentials for all GCR repositories.
    15 WARNING: A long list of credential helpers may cause delays running 'docker build'. We recommend passing the registry name to configure only the registry you are using.
    16 Docker configuration file updated.
    `17 #### 🍹 `pulumi --non-interactive preview``
    18 Previewing update (yyy/xxx):
    19 [resource plugin kubernetes-2.3.0] installing
    20
    21 Downloading plugin: 0 B / 21.46 MiB    0.00%
    22 Downloading plugin: 21.46 MiB / 21.46 MiB  100.00%
    23 Downloading plugin: 21.46 MiB / 21.46 MiB  100.00%
    24 Downloading plugin: 21.46 MiB / 21.46 MiB  100.00%
    25 Downloading plugin: 21.46 MiB / 21.46 MiB  100.00% 0s
    26 Moving plugin... done.
    27
    28 Permalink: <https://app.pulumi.com/xxx/previews/0472bcb1-a637-4708-96e9-21f0fe9862ff>
    29 error: could not load plugin for gcp provider 'urn:pulumi:xxx::cadence::pulumi:providers:gcp::gcp-provider': no resource plugin 'gcp' found in the workspace or on your $PATH
    Thanks in advance for any help.
    l
    • 2
    • 4
Powered by Linen
Title
e

echoing-rain-5741

08/31/2020, 11:43 AM
Hi! I have a problem with pulumi cicd using github workflows and installing the google cloud provider. We use the google cloud and the kubernetes providers. The kubernetes provider automatically installs an appropriate version of the plugin, but the gcp provider is never installed. Can we make the gcp plugin version also install automatically? If not, what would be the recommended way of manually installing it? What we are doing is very close to what is described in this guide. This is the corresponding GitHub workflows yaml:
name: Pulumi
on:
- pull_request
jobs:
preview:
name: Preview
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: preview
uses: <docker://pulumi/actions>
with:
args: preview
env:
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PULUMI_CI: pr
PULUMI_ROOT: infra/cluster/processing
This is the output from the preview step: 
Run <docker://pulumi/actions>
10 /usr/bin/docker run --name pulumiactions_99916e --label 3b3ac6 --workdir /github/workspace --rm -e GOOGLE_CREDENTIALS -e PULUMI_ACCESS_TOKEN -e PULUMI_CI -e PULUMI_ROOT -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/xxx/xxx":"/github/workspace" pulumi/actions preview
11 Logging in using access token from PULUMI_ACCESS_TOKEN
12 Logged in to <http://pulumi.com|pulumi.com> as xxx (<https://app.pulumi.com/> xxx)
13 Activated service account credentials for: [<mailto:pulumi-github-workflows-cicd@xxx.iam.gserviceaccount.com|pulumi-github-workflows-cicd@xxx.iam.gserviceaccount.com>]
14 Adding credentials for all GCR repositories.
15 WARNING: A long list of credential helpers may cause delays running 'docker build'. We recommend passing the registry name to configure only the registry you are using.
16 Docker configuration file updated.
`17 #### 🍹 `pulumi --non-interactive preview``
18 Previewing update (yyy/xxx):
19 [resource plugin kubernetes-2.3.0] installing
20
21 Downloading plugin: 0 B / 21.46 MiB    0.00%
22 Downloading plugin: 21.46 MiB / 21.46 MiB  100.00%
23 Downloading plugin: 21.46 MiB / 21.46 MiB  100.00%
24 Downloading plugin: 21.46 MiB / 21.46 MiB  100.00%
25 Downloading plugin: 21.46 MiB / 21.46 MiB  100.00% 0s
26 Moving plugin... done.
27
28 Permalink: <https://app.pulumi.com/xxx/previews/0472bcb1-a637-4708-96e9-21f0fe9862ff>
29 error: could not load plugin for gcp provider 'urn:pulumi:xxx::cadence::pulumi:providers:gcp::gcp-provider': no resource plugin 'gcp' found in the workspace or on your $PATH
Thanks in advance for any help.
l

lemon-agent-27707

08/31/2020, 3:17 PM
Yeah, the GCP plugin should be installed automatically. What version of it do you have referenced in your go.mod file? As a work around you can always install the plugin manually:
pulumi plugin install resource gcp vX.X.X
e

echoing-rain-5741

08/31/2020, 3:47 PM
I have v3.21.1 in my go mod. Any idea on what would be the best way to hook into the pulumi Github Actions docker?
l

lemon-agent-27707

08/31/2020, 4:20 PM
The command you run in this instance is
pulumi/actions preview
Can you first run a
pulumi/actions plugin install resource gcp v3.21.1
?
e

echoing-rain-5741

09/01/2020, 7:20 AM
I just tried adding a step
- name: install-gcp-plugin
uses: <docker://pulumi/actions>
with:
args: plugin install resource gcp v3.21.1
env:
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PULUMI_CI: pr
PULUMI_ROOT: infra/cluster/processing
before the preview step. It installs the plugin successfully, but the preview command still fails with the same error message.
View count: 4