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

    freezing-winter-55007

    10/17/2020, 5:33 AM
    Do we have a clever way to use
    pulumi state delete <urn>
    and say “screw it” and delete the resources’ children as well? This particular resource has lots of children to remove.
    f
    • 2
    • 1
  • g

    gifted-city-99717

    10/17/2020, 3:21 PM
    Hi. I’m trying to use
    tf2pulumi
    (v0.9.0) on an existing terraform project but get the following error:
    error: no resource plugin 'template' found in the workspace or on your $PATH
    I think that’s referencing this plugin in the terraform registry but I haven’t been able to
    pulumi plugin install
    it no matter the combination of [kind name version] that I’ve tried. Has anyone run into this?
    l
    • 2
    • 3
  • w

    wet-noon-14291

    10/17/2020, 10:49 PM
    Am I using cloud storage wrong if I can’t have the same name on the stacks for different projects when using azure to store the state? As I have it now I basically need to login for every single project instead of just using the same container for all projects https://github.com/pulumi/pulumi/issues/5585
    b
    • 2
    • 4
  • b

    brief-spoon-92183

    10/18/2020, 6:52 PM
    Hey guys, anyone knows if this is a bug or is it me doing something wrong? So, I'm creating an AWS VPC Subnet, but the name is getting lost. Any idea how I can get the actual name to be assigned to the resource? Thanks.
    g
    • 2
    • 2
  • t

    thankful-horse-53271

    10/18/2020, 10:17 PM
    Hello everyone, is there a way to use pulumi without going for a cloud provider but instead with qemu or xen ?
    k
    • 2
    • 1
  • k

    kind-mechanic-53546

    10/18/2020, 11:37 PM
    If I accidentally run pulumi up with the wrong local environment setup (azure subscription A), resulting in pulumi not being able to verify my state with the provider (azure), pulumi is marking all my resources as gone and then wants to recreate them Then when I switch back to the correct environment setup (azure subscription B), pulumi still wants to recreate all my resources How can I recover from this without individually importing all my resources?
    b
    • 2
    • 4
  • e

    elegant-island-39916

    10/19/2020, 10:25 AM
    Hi, I am attempting to create a
    FargateProfile
    for EKS in Pulumi Python. An
    AccessDeniedException
    occurs even though the AWS profile executing this has the
    AdministratorAccess
    policy and is able to create many other resources on AWS via Pulumi. Is there anything I can do to diagnose this issue?
    • 1
    • 1
  • b

    brainy-policeman-17905

    10/19/2020, 10:32 AM
    Good morning everyone, I am evaluating Pulumi and so far I really like it. My objective is to mimic prod with dev, in dev I'll be using minikube to run the app and all the services locally, anyone has any suggestions or any articles or workflow that can recommend? This is a new app so I don't have anything in place yet so I'm open to any suggestions.
  • b

    brainy-policeman-17905

    10/19/2020, 10:56 AM
    after further research this seems to be the best way to go https://www.pulumi.com/docs/intro/concepts/organizing-stacks-projects/ (use stacks to accomplish separation of dev, staging and prod)
  • k

    kind-school-28825

    10/19/2020, 4:34 PM
    What's the best way to go in order to pass environment variables to Pulumi in the CI (github actions for instance). I want to populate the
    environment
    property for a fargate service. Locally that is possible of course by reading the
    env
    file in development, but when trying to update the infrastructure I want these environment variables to be populated instead. I thought in each stack it is possible to add the variables on the pulumi stack page, at least that's my experience when using terraform. What is the way to go?
    g
    • 2
    • 3
  • b

    bored-intern-60856

    10/19/2020, 5:27 PM
    Hey guys, I'm struggling with a minor issue: I have a helm chart which uses a secret. Both the helm chart and the secret are deployed using Pulumi. For some reason when I change the secret, the deployment won't update as it should.
    b
    g
    • 3
    • 13
  • s

    salmon-australia-89174

    10/19/2020, 8:03 PM
    Hi all I am new with Pulumi and I tried to setup an simple website with Traefik as ingress controller and cert-manager for the certificates. This setup is running on a managed Kubernetes and I wrote the code with Typescript. I got everything up and running, so far so good. But the traefik part to add a new ingress route is ugly and I think there must be a better way to do that. Do you have any tips for improvements? Or did I missed an example on Github? Currently I did this:
    // ### index.ts
    ...
    const ingress = new k8s.networking.v1.Ingress(appName, {
        metadata: appLabels,
        spec: {
            rules: [...]
        }
    });
    const ingressRoute = new k8s.yaml.ConfigFile(appName, {  // <--- here must be a more easy way to configure
        file: 'traefik-ingress-route.yaml'                   //      it fully in Typescript
    });
    ...
    
    // ### traefik-ingress-route.yaml
    apiVersion: <http://traefik.containo.us/v1alpha1|traefik.containo.us/v1alpha1>
    kind: IngressRoute
    metadata:
      name: myapp
      namespace: default
    spec:
      entryPoints:
        - websecure
      routes:
        - match: Host(`<http://myapp.url.com|myapp.url.com>`) || Host(`<http://www.myapp.url.com|www.myapp.url.com>`)
          kind: Rule
          services:
            - name: myapp
              port: 80
      tls:
        secretName: myapp-cert
    b
    s
    • 3
    • 14
  • t

    tall-needle-56640

    10/19/2020, 9:59 PM
    I want to store a "dictionary" in the config, retrieve it and then assign to an 
    InputMap<string>
     property. Something like
    prog:resourceTags:
      - BU1: Business
      - CC: 12344
      
    var resourceTags = config.RequireObject<Dictionary<string, string>>("resourceTags");
    
    var storageAccount = new Account(storageAccountName, new AccountArgs
    {
        Tags = resourceTags,
    });
    But I get an error
    Pulumi.Config+ConfigTypeException: Configuration 'PulumiPort:resourceTags' value '[{"BU1":"Business"}]' is not a valid System.Collections.Generic.Dictionary`2
    How do I do this?
    l
    • 2
    • 7
  • j

    jolly-camera-35709

    10/20/2020, 4:56 AM
    I'm using pulumi python sdk, trying to query azure container registry see if image exist, if exist, then create azure container instance, what is the best way to do it? Should I run azure cli in the python script to query azure resource?
    g
    • 2
    • 2
  • j

    jolly-camera-35709

    10/20/2020, 5:43 AM
    Not sure if this is a problem, my pulumi python project uses venv, and I found python is installed in the venv, it didn't interrupt my local python which is good. Now I need to install the python module azure-cli, I added it in the requirements.txt, and then run '
    venv/bin/pip install -r requirements.txt
    to install the python module. After installation, I found the executable was placed under /usr/local/bin/, when I type "az -v" at terminal, it obviously found the executable from this location and reported the following error
  • j

    jolly-camera-35709

    10/20/2020, 5:43 AM
    Traceback (most recent call last):  File "/usr/local/bin/az", line 4, in <module>   __import__('pkg_resources').run_script('azure-cli==2.13.0', 'az')  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3088, in <module>   @_call_aside  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3072, in _call_aside   f(*args, **kwargs)  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3101, in _initialize_master_working_set   working_set = WorkingSet._build_master()  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 574, in _build_master   ws.require(requires)  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 892, in require   needed = self.resolve(parse_requirements(requirements))  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 778, in resolve   raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'vsts' distribution was not found and is required by azure-functions-devops-build
  • j

    jolly-camera-35709

    10/20/2020, 5:44 AM
    when I use the executable from /usr/bin/az, it's all good. So I believe the azure-cli installed from pulumi requirements.txt missed some dependency, so it doesn't work
  • j

    jolly-camera-35709

    10/20/2020, 5:46 AM
    But what's annoying is the installation from pulumi requirements.txt placed an executable under the path /usr/local/bin which is in the PATH env var, so the az command end up using this broken executable
  • j

    jolly-camera-35709

    10/20/2020, 5:47 AM
    not sure if it's a problem with pulumi handling python modules or is it something I did wrong
  • j

    jolly-camera-35709

    10/20/2020, 5:48 AM
    I thought virtual env is to isolate the runtime env from the local env, in this case, it's not
  • b

    bitter-application-91815

    10/20/2020, 1:36 PM
    Hi there,
  • b

    bitter-application-91815

    10/20/2020, 1:36 PM
    When i'm redploying fargate cluster with it's tasks, (with simple env var updates), I now get this error
  • b

    bitter-application-91815

    10/20/2020, 1:36 PM
    aws:ec2:RouteTable (axiom-cloud-private-subnet-3-routetable-staging-g):
        error: 1 error occurred:
        	* updating urn:pulumi:axiom-cloud::staging::aws:ec2/routeTable:RouteTable::axiom-cloud-private-subnet-3-routetable-staging-g: Error creating route: RouteAlreadyExists: The route identified by 0.0.0.0/0 already exists.
        	status code: 400, request id: c7800e9a-2e62-4efb-ad81-34b27f11c628
  • b

    bitter-application-91815

    10/20/2020, 1:37 PM
    It should not have to touch subnet routing as it was setup already for those tasks.
  • b

    bitter-application-91815

    10/20/2020, 1:37 PM
    i'm just redeploying ...
  • b

    bitter-application-91815

    10/20/2020, 1:40 PM
    View Live: <https://app.pulumi.com/axiom/staging/axiom-cloud/previews/a92a225e-8e64-40a2-b968-08f187e38f2f>
    
         Type                                         Name                                               Plan        Info
         pulumi:pulumi:Stack                          staging-axiom-cloud                                            
     ~   ├─ aws:ec2:RouteTable                        axiom-cloud-private-subnet-3-routetable-staging-g  update      [diff: ~routes]
     ~   ├─ aws:ec2:RouteTable                        axiom-cloud-private-subnet-1-routetable-staging-g  update      [diff: ~routes]
     ~   ├─ aws:ec2:RouteTable                        axiom-cloud-private-subnet-2-routetable-staging-g  update      [diff: ~routes]
     +-  ├─ aws:ecs:TaskDefinition                    monitors-staging-g-ecs-task                        replace     [diff: ~containerDefinitions]
     ~   ├─ aws:ecs:Service                           monitors-staging-g-ecs-service                     update      [diff: ~taskDefinition]
         └─ kubernetes:<http://helm.sh/v3:Chart|helm.sh/v3:Chart>               axiomdb-charts-staging-g                                       
            └─ kubernetes:extensions/v1beta1:Ingress  axiomdb/axiomdb-ingress                                        1 warning
     
    Diagnostics:
      kubernetes:extensions/v1beta1:Ingress (axiomdb/axiomdb-ingress):
        warning: extensions/v1beta1/Ingress is deprecated by <http://networking.k8s.io/v1beta1/Ingress|networking.k8s.io/v1beta1/Ingress> and not supported by Kubernetes v1.20+ clusters.
     
    
    Do you want to perform this update? yes
    Updating (axiom/axiom-cloud)
    
    View Live: <https://app.pulumi.com/axiom/staging/axiom-cloud/updates/67>
    
         Type                   Name                                               Status                  Info
         pulumi:pulumi:Stack    staging-axiom-cloud                                **failed**              1 error
     ~   ├─ aws:ec2:RouteTable  axiom-cloud-private-subnet-2-routetable-staging-g  updated                 [diff: ~routes]
     ~   ├─ aws:ec2:RouteTable  axiom-cloud-private-subnet-3-routetable-staging-g  **updating failed**     [diff: ~routes]; 1 error
     ~   └─ aws:ec2:RouteTable  axiom-cloud-private-subnet-1-routetable-staging-g  updated                 [diff: ~routes]
  • b

    bitter-application-91815

    10/20/2020, 1:40 PM
    of course it's not preventing the ecs-task be updated which is basically all i'm trying to do
    • 1
    • 3
  • b

    brash-student-27683

    10/20/2020, 2:49 PM
    Hi everyone, I am trying to set up vpc peering with pulumi (crosswalk)
    vpc1 = new awsx.ec2.Vpc(..)
    vpc2 = new awsx.ec2.Vpc(..)
    
    new aws.ec2.VpcPeeringConnection(..)
    now that the peering is set up, I need to add the route table entries to both the vpc’s route tables. But with crosswalk, these route tables are internally created for me. How do I access these route tables to add a new route to them? (to point the vpcs to each other)
    l
    • 2
    • 1
  • c

    careful-nail-88325

    10/20/2020, 4:29 PM
    I'm working on setting up a CD pipeline for Pulumi and I'd like my AWS provider to assume different roles depending on whether I'm running a preview on a branch or an update on master. I'm using
    pulumi.runtime.isDryRun()
    to determine whether a preview or update is being executed and assuming the corresponding role. Unfortunately, the change in the provider also affects the state of my stack. Is there a recommended way to do this? Currently, I think I'm going to have to abandon the assumeRole functionality of the AWS provider and assume the role with the AWS CLI in advance before executing preview or update.
    l
    • 2
    • 3
  • t

    tall-needle-56640

    10/20/2020, 4:32 PM
    Getting 404 error, when resource exists. In the below output (clipped for brevity), you can see that the app plan must be the same for both functions, but then it can't find the app plan to update it:
    > pulumi up
    Previewing update (dev)
    Type Name Plan
    pulumi😛ulumi:Stack PulumiPort-dev
    + ├─ azure:appservice:FunctionApp app create
    - └─ azure:appservice:FunctionApp test20201910func delete
    Resources:
    + 1 to create
    - 1 to delete
    2 changes. 5 unchanged
    Do you want to perform this update? yes
    Updating (dev)
    Type Name Status Info
    pulumi😛ulumi:Stack PulumiPort-dev failed 1 error
    + └─ azure:appservice:FunctionApp app creating failed 1 error
    Diagnostics:
    azure:appservice:FunctionApp (app):
    error: web.AppsClient#CreateOrUpdate: Failure sending request: StatusCode=404 -- Original Error: Code="NotFound" Message="Cannot find ServerFarm with name test20201910-aspa9aae18b." Details=[{"Message":"Cannot find ServerFarm with name test20201910-aspa9aae18b."},{"Code":"NotFound"},{"ErrorEntity":{"Code":"NotFound","ExtendedCode":"51004","Message":"Cannot find ServerFarm with name test20201910-aspa9aae18b.","MessageTemplate":"Cannot find {0} with name {1}.","Parameters":["ServerFarm","test20201910-aspa9aae18b"]}}]
    g
    • 2
    • 3
Powered by Linen
Title
t

tall-needle-56640

10/20/2020, 4:32 PM
Getting 404 error, when resource exists. In the below output (clipped for brevity), you can see that the app plan must be the same for both functions, but then it can't find the app plan to update it:
> pulumi up
Previewing update (dev)
Type Name Plan
pulumi😛ulumi:Stack PulumiPort-dev
+ ├─ azure:appservice:FunctionApp app create
- └─ azure:appservice:FunctionApp test20201910func delete
Resources:
+ 1 to create
- 1 to delete
2 changes. 5 unchanged
Do you want to perform this update? yes
Updating (dev)
Type Name Status Info
pulumi😛ulumi:Stack PulumiPort-dev failed 1 error
+ └─ azure:appservice:FunctionApp app creating failed 1 error
Diagnostics:
azure:appservice:FunctionApp (app):
error: web.AppsClient#CreateOrUpdate: Failure sending request: StatusCode=404 -- Original Error: Code="NotFound" Message="Cannot find ServerFarm with name test20201910-aspa9aae18b." Details=[{"Message":"Cannot find ServerFarm with name test20201910-aspa9aae18b."},{"Code":"NotFound"},{"ErrorEntity":{"Code":"NotFound","ExtendedCode":"51004","Message":"Cannot find ServerFarm with name test20201910-aspa9aae18b.","MessageTemplate":"Cannot find {0} with name {1}.","Parameters":["ServerFarm","test20201910-aspa9aae18b"]}}]
g

gentle-diamond-70147

10/20/2020, 5:23 PM
Was this working before and is now failing or the first time you're trying this deployment? Are you deploying these all within the same resource group? Can you share your code?
t

tall-needle-56640

10/20/2020, 6:23 PM
I started with the azure-cs-functions-consumption example and then made some edits and now it doesn't work. All go into the same resource group.
PulumiPort.zip
I figured it out. I had the Plan and FunctionApp deploying to different regions. Clearly, they have to be in the same location. 🙂
👍 1
View count: 10