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
general
  • c

    chilly-hospital-92934

    02/03/2021, 2:32 PM
    Hello guys, I'm a newbie in Pulumi. I have a question. I'm creating my own provider and I would like to implement handling creating a resource: checking if a resource exists on cloud, if not - create the resource( even if previously was exist on the state) Could you give me some examples of how to do this? I use python. EDIT: I was trying to do it with read:
    def read(self, id, properties):
        my_logic()
    
        result = {}
        try:
            response = self.client.do_action_with_exception(request).decode("utf-8")
            result = json.loads(response)
        except:
                print("not found")
    
        return ReadResult(outs=result)
    But in that way it always wants to create resources šŸ™‚ basing on aboved code I would like to: Create resource if dict is empty
    šŸ‘€ 1
    a
    • 2
    • 1
  • f

    future-oyster-5387

    02/03/2021, 4:07 PM
    I see https://github.com/pulumi/pulumi/issues/2918 and https://github.com/pulumi/pulumi/issues/3683 am I correct assuming the best way to move all the stack resources from my individual account in to the organization I just made is to export from the individual and import to the organization?
    b
    • 2
    • 2
  • a

    ambitious-father-68746

    02/04/2021, 12:07 AM
    Hi, just to confirm, when does the stack files actually get updated in Pulumi? At the end of the Pulumi run or as soon as any change happens, meaning that the stack file can be updated multiple times in a single Pulumi run?
    b
    • 2
    • 2
  • s

    straight-librarian-43739

    02/04/2021, 1:44 AM
    In general, what is the recommended way to troubleshoot this error:
    Required attribute is not set
    • 1
    • 3
  • c

    colossal-rainbow-39841

    02/04/2021, 2:01 AM
    Is it possible to restrict which outputs a Stack reference is able to access ? example Stack B references Stack A which outputs x and y. I wanna restrict B to only be able to query for x. The use case is to delegate the work to other teams. example kubeconfig , such that team X and team Y would have no acccess to each other's kubeconfig.
  • b

    bored-alligator-28748

    02/04/2021, 5:32 AM
    Hey All, I am new to Pulumi. I am trying to set up Kubernetes configs thru Pulumi. These configuration use Kustomize. Here is the code
    const wazuhConfig = new k8s.kustomize.Directory("wazuhLocal", {
            directory : "./wazuh-kubernetes/envs/eks",
          },
          {parent: this}
        )
    The ts file which has this code has the directory
    wazuh-kubernetes/envs/eks
    in the same path. This is the error I am getting -->
    Diagnostics:
      pulumi:pulumi:Stack (central-ops-ossec-dev):
        error: Running program 'ossec' failed with an unhandled exception:
        Error: invocation of kubernetes:kustomize:directory returned an error: failed to retrieve specified kustomize directory: "./wazuh-kubernetes/envs/eks": invalid URL scheme
    Any help will be much appreciated
    g
    • 2
    • 1
  • d

    delightful-salesclerk-57224

    02/04/2021, 7:39 AM
    Hello everyone, I am getting this error in Codefresh and somehow its tied to pulumi, does anyone have any idea whats going on?
    ------------------------------                                                                                             
    Executing command: pulumi up -c bootstrapImageTag=v9.0.0 --skip-preview --non-interactive --yes                            
    error: saving config: yaml: line 33: mapping values are not allowed in this context                                        
    Reading environment variable exporting file contents.                                                                      
    Reading environment variable exporting file contents.                                                                      
    [SYSTEM]                                                                                                                   
     Message             Failed to run freestyle step: Deploy DB to DEV                                                        
     Caused by           Container for step title: Deploy DB to DEV, step type: freestyle, operation: Freestyle step.
    I've validated the yaml and its valid, there is nothing going on at line 33. Also, I have multiple deploys with identical commands and just this one fails šŸ˜„
    • 1
    • 4
  • b

    bumpy-laptop-30846

    02/04/2021, 1:19 PM
    Hello, I have a general question regarding my workflow on aws with k8s and gitOps. With gitflow and flux, when a change if merged into the gitOps repo, the change is reflected in the k8s cluster. But this will make changes only to this. What if I need infra outside of the k8s cluster to be changed? For example let say I need to create a new S3 bucket for my next version. From what I understand this change should appear in the ā€œgitOps repoā€ and something should ā€œseeā€ the change in the repo and apply it though pulumi. So my question is: are my assumptions correct and do you have an idea how to address this? This means that pulumi would be triggered on a git change in a gitOps way?
    b
    • 2
    • 4
  • c

    clever-crowd-18899

    02/04/2021, 2:18 PM
    Hello, Does latency impact the pulumi up overall time command ? If I run the command from a united states virtualmachine, will it be faster ? I am running the command from SĆ£o Paulo - Brazil. My script will create 3 hundred kubernetes manifests. And this is taking hours to complete or to destroy.
    b
    m
    • 3
    • 8
  • a

    average-ability-11166

    02/04/2021, 4:59 PM
    Hi all. šŸ‘‹ Any reason why šŸ‘‡ would hang on
    creating...
    ?
    _, err = docker.NewContainer(ctx, "mtx-create-container", &docker.ContainerArgs{
    				Name:  pulumi.String("mtx-container-pulumi"),
    				Image: mtzImage.Name,
    				NetworksAdvanced: docker.ContainerNetworksAdvancedArray{
    					docker.ContainerNetworksAdvancedArgs{Name: network.Name},
    				},
    				Restart: pulumi.String("on-failure"),
    				Ports: docker.ContainerPortArray{
    					docker.ContainerPortArgs{
    						Internal: <http://pulumi.Int|pulumi.Int>(6875),
    						External: <http://pulumi.Int|pulumi.Int>(6875),
    					},
    				},
    				Attach: pulumi.Bool(true),
    				Logs:   pulumi.Bool(true),
    				Start:  pulumi.Bool(true),
    				Command: pulumi.StringArray{
    					pulumi.String("w"), // workers
    					pulumi.String("1"),
    				},
    			})
    			if err != nil {
    				return err
    			}
    b
    • 2
    • 9
  • g

    great-evening-28439

    02/04/2021, 6:32 PM
    Hi all. I’m new to Pulumi, but giving it a try in a small AWS subaccount at work (the rest of my company has standardized on Terraform). I’m not using Pulumi SaaS, but rather storing my state in an AWS s3 bucket. I’d like to split my project into two separate projects: one project that sets up the core AWS stuff (e.g. VPC) and another project that manages AWS infrastructure and k8s stuff that will change more frequently. By scanning the docs, it seems I can communicate between the 2 projects using ā€œstack references,ā€ but I’m worried this won’t work with the state stored in s3 as opposed to the Pulumi SaaS solution. Is this true? If not, can anyone point me to some documentation that will help me accomplish what I want? My stacks are ā€œdev, test, and prodā€ and I’d like the two projects to share these stacks, but be able to run
    pulumi up
    on the 2 projects separately.
    b
    • 2
    • 13
  • a

    adamant-translator-31969

    02/04/2021, 7:26 PM
    Hi!! I am getting this error when I run pulumi preview
    Error: Cannot re-register module Previous registration was [object Object], new registration was [object Object].
    b
    • 2
    • 1
  • l

    lemon-machine-35564

    02/04/2021, 9:56 PM
    Does anyone have an example of creating an API Gateway and a Route 53 record to point at the endpoint? Crosswalk returns a URL that has
    https://
    etc in and, and operating on a
    Output<String>
    is painful.
    l
    • 2
    • 5
  • b

    billowy-nightfall-59212

    02/04/2021, 10:42 PM
    I am doing
    go mod tidy
    on the
    gcp
    and I am seeing this.
    go mod tidy                                                                                                                              20s
    go: finding module for package <http://github.com/pulumi/pulumi-gcp/sdk/go/gcp/projects|github.com/pulumi/pulumi-gcp/sdk/go/gcp/projects>
    go: finding module for package <http://github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/container|github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/container>
    go: downloading <http://google.golang.org/genproto|google.golang.org/genproto> v0.0.0-20200318110522-7735f76e9fa5
    go: downloading <http://golang.org/x/tools|golang.org/x/tools> v0.0.0-20191119224855-298f0cb1881e
    go: found <http://github.com/pulumi/pulumi-gcp/sdk/go/gcp/projects|github.com/pulumi/pulumi-gcp/sdk/go/gcp/projects> in <http://github.com/pulumi/pulumi-gcp|github.com/pulumi/pulumi-gcp> v1.9.0
    go: found <http://github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/container|github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/container> in <http://github.com/pulumi/pulumi-gcp/sdk/v4|github.com/pulumi/pulumi-gcp/sdk/v4> v4.10.0
    go: <http://github.com/pulumi/pulumi-gcp@v1.9.0|github.com/pulumi/pulumi-gcp@v1.9.0> requires
    	<http://github.com/terraform-providers/terraform-provider-google-beta@v0.0.0-00010101000000-000000000000|github.com/terraform-providers/terraform-provider-google-beta@v0.0.0-00010101000000-000000000000>: invalid version: unknown revision 000000000000
    b
    • 2
    • 6
  • a

    average-school-38756

    02/04/2021, 10:55 PM
    i'm moving a VPC (and subnets) from one stack to another, and using stack references to share those IDs with dependent resources in the original stack. But the original stack's resources show dependencies on the VPC from that state file as URNs, so
    pulumi state delete
    shows "error: This resource can't be safely deleted because the following resources depend on it:" Can i simply remove the dependency declarations from the state file to proceed? Is there some reason that would be a bad idea?
  • r

    red-football-97286

    02/05/2021, 9:54 AM
    Good morning, general question. Who is from the UK and there company uses Pulumi? I'm trying to get pulumi into my place of work and want to reach out to people who use pulumi to help with some concerns management have. Thanks.
    s
    b
    • 3
    • 8
  • p

    proud-pizza-80589

    02/05/2021, 3:51 PM
    The secret encryption in config files, are they per ā€œstackā€ or per ā€œprojectā€? I need to copy a complete env with a lot of secrets that are a pain to dig up. I would love to just copy the stack yml file
    b
    w
    • 3
    • 4
  • a

    adorable-musician-67025

    02/05/2021, 4:39 PM
    Hey, I am trying to understand how read() function works for dynamic providers (https://www.pulumi.com/docs/intro/concepts/resources/#dynamicproviders). 2nd point of the flow, described in docs, says that pulumi will call diff() method if resource exists. How does it happen? Without read()? If yes, then what is the read() method for? šŸ™‚
    w
    • 2
    • 5
  • l

    lemon-machine-35564

    02/05/2021, 8:07 PM
    Does anyone have a working example of getting an output via StackReference and converting it to a string in TypeScript?
    b
    b
    • 3
    • 12
  • l

    lemon-machine-35564

    02/05/2021, 11:30 PM
    Anyone ever run into phantom resources in a stack? I did a
    destroy
    that succeeded, and then the next
    up
    said
    Duplicate resource URN
    .
    stack
    doesn’t show the URN and my AWS account doesn’t have that resource created.
    f
    • 2
    • 1
  • l

    lemon-machine-35564

    02/05/2021, 11:31 PM
    stack delete <urn>
    says it doesn’t exist
  • s

    square-art-73366

    02/06/2021, 12:44 AM
    Is any Template file solution in Pulumi instead of TF template file?
  • b

    bored-oyster-3147

    02/07/2021, 6:09 PM
    Anyone had to deal with trying to destroy an AWS stack that has an ACM certificate attached to an ALB via an https listener? I think AWS wants you to delete the https listener first but since the dependency path is ALB -> Listener -> Certificate pulumi will try to delete the certificate first and fail with ā€œthe certificate is in use.ā€
    l
    • 2
    • 20
  • w

    wet-soccer-72485

    02/07/2021, 6:26 PM
    Just fyi, a new organization on app.pulumi.com shows this when you hover over ā€˜trial’
    b
    • 2
    • 1
  • c

    cold-motherboard-287

    02/08/2021, 8:50 AM
    hello! I'm currently trying to use Mozilla SOPS with Pulumi. The only way I've found now was to use environment variables generated by SOPS, but I would like to be able to use the "file version" of it. There problem is that he file generated by Mozilla SOPS has no extension, therefore Pulumi can't read it 'cause it doesn't know whether it is a
    json
    or a
    yaml
    file I suppose. Is there a workaround for it? Another option would be to implement another secrets/config provider altogether, but I also didn't find any information on how to do it.
    šŸ‘ 1
    b
    • 2
    • 7
  • w

    wide-crayon-4093

    02/08/2021, 10:16 AM
    hey. what's the best way to install istio operator? I'd usually do
    istioctl operator install
    and then install istio itself via manifest. here, I'm not sure where to start
    p
    • 2
    • 3
  • c

    colossal-rainbow-39841

    02/08/2021, 1:20 PM
    can we specify different secret outputs to be encrypted using multiple keys ? output A -> key A , output B -> key B , I'm trying to achieve child stacks to have access to only certain output.
    b
    • 2
    • 1
  • f

    freezing-quill-32178

    02/08/2021, 2:27 PM
    Hello everyone, fairly new to Pulumi here… Is there a way to execute shell script(s) with pulumi (or exec cli tools like gcloud) or you should build you own custom Dynamic Provisioner? I’m trying to figure out how to run MySQL DB preparation (create DB and import templated dump from GCS Bucket) in CloudSQL before the main App deployment to GKE k8s. For some reason
    @pulumi/gcp
    and the underlying
    terraform-provider
    don’t support yet the SQL import from GCP bucket. Currently i’ve created my own shell scripts utilising gcloud sql import cli but i want to make the whole deployment flow with Pulumi as well as put it in GitLab CI/CD. Any suggestion is welcomed! Thanks
    a
    p
    • 3
    • 5
  • b

    bored-oyster-3147

    02/08/2021, 4:21 PM
    I keep getting
    completing deletion from previous update
    on an ACM Certificate that can't be deleted due to "certificate is in use" error whenever I try to
    pulumi destroy
    . Any idea how to clear or reset this pending deletion?
    b
    • 2
    • 51
  • a

    average-school-38756

    02/08/2021, 6:02 PM
    Can state resource dependencies be URNs from another stack? i'm splitting a stack and need to know how to deal with leftover dependencies. If not, are there any other consequences of removing them manually?
Powered by Linen
Title
a

average-school-38756

02/08/2021, 6:02 PM
Can state resource dependencies be URNs from another stack? i'm splitting a stack and need to know how to deal with leftover dependencies. If not, are there any other consequences of removing them manually?
View count: 1