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

    bitter-application-91815

    09/22/2020, 5:42 PM
    this uses a azure container service registry
  • b

    bitter-application-91815

    09/22/2020, 5:42 PM
    is there any model i can use for a generic one
  • c

    curved-cartoon-90054

    09/22/2020, 6:45 PM
    hi I am using pulumi crossguard for 1st time i have been using opa for validating requests using opa api endpoint does pulumi has api endpoint ?
    g
    • 2
    • 3
  • w

    wet-noon-14291

    09/22/2020, 8:28 PM
    I'm trying to see if I can get the auth0 provider to work with a minimal example. What I wanted to try out first is check if I can create a tenant using pulumi. I'm using F# and have the following minimal code:
    let tenant = 
        Tenant("my-pulumi-tenant",
          TenantArgs(
            AllowedLogoutUrls = inputList [input "<http://site/ut>"],
            ChangePassword = 
              input (
                Inputs.TenantChangePasswordArgs(
                  Enabled = input true,
                  Html = input "<html></html>"
              )),
            DefaultRedirectionUri = input "<https://site/redirect>",
            FriendlyName = input "My Tenant name"
          ))
      dict [
        "id", tenant.Id :> obj
        "name", tenant.FriendlyName :> obj
      ]
    When I run pulumi everything seems to work out just fine, but I can't see any tenants when I log into auth0. Does anyone have any clue of what is going on?
    p
    • 2
    • 5
  • w

    wet-noon-14291

    09/22/2020, 8:45 PM
    If someone is interested to see all their stack in neo4j I created this small dotnet tool you can use to upload all the stacks you have access to to neo4j: https://github.com/mastoj/pulumigraph/. It will also visualize connections between stacks through the stackreference resource. Haven't figured out a way to show which exact resource in a referenced stack a property might depend on, not even sure that is possible in a reliable fashion.
    👍 1
    l
    • 2
    • 24
  • b

    bitter-application-91815

    09/22/2020, 9:28 PM
    hey guys, trying to get access to a private registry for a docker image (via pulumi obvs). Using this
    // make sure to
    	_, err = yaml.NewConfigGroup(ctx, fmt.Sprintf("axiomdb-yaml-config-group-%s", w.targetEnv), &yaml.ConfigGroupArgs{
    		Files: []string{yamlSctsFile}},
    	)
    	if err != nil {
    		return err
    	}
  • b

    bitter-application-91815

    09/22/2020, 9:29 PM
    where
    yamlSctsFile
    is the path to the secretsFile, base64'd `
    .docker/config.json
  • b

    bitter-application-91815

    09/22/2020, 9:29 PM
    following these instructions
  • b

    bitter-application-91815

    09/22/2020, 9:29 PM
    <https://stackoverflow.com/questions/59882357/pulumi-how-to-pull-a-docker-image-from-a-private-registry>
  • b

    bitter-application-91815

    09/22/2020, 9:30 PM
    i'm getting this error
  • b

    bitter-application-91815

    09/22/2020, 9:30 PM
    * decoding YAML: rpc error: code = Unknown desc = invocation of kubernetes:yaml:decode returned an error: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type map[string]interface {}
        exit status 1
    q
    • 2
    • 3
  • c

    clever-plumber-29709

    09/23/2020, 12:09 AM
    how can i modifiy some github repository settings with the pulumi provider? Should the repo be created with pulumi? or can i modify already existing repos?
    b
    • 2
    • 5
  • l

    little-cartoon-10569

    09/23/2020, 8:05 AM
    Is there a way to see what inputs don't match in a failed import? I'm getting several cases of "warning: inputs to import do not match the existing resource; importing this resource will fail" but I don't know why. Some of them are on resources with only two properties (e.g. RolePolicyAttachment), both of which are specified and match....
    • 1
    • 4
  • e

    elegant-island-39916

    09/23/2020, 9:52 AM
    Hi, I'm trying to deploy the gitlab helm chart to k8s with pulumi and I'm seeing the following error when issuing `pulumi up`:
    File "/home/user/Projects/deepseer/deployments/venv/lib/python3.7/site-packages/pulumi_kubernetes/yaml.py", line 531, in <lambda>
            CustomResourceDefinition(f"{x}", opts, **obj)))]
        TypeError: __init__() got an unexpected keyword argument 'status'
    It seems pulumi fails to parse the gitlab helm chart somehow How can I work around this issue? (details in replies)
    • 1
    • 1
  • h

    hundreds-receptionist-31352

    09/23/2020, 6:12 PM
    Hi I have a component resource that return an Output<String> that works and I can see the value when I execute export const lb = return_value Now I want to send this value to a custom function , but I need this value as "string", because I have to comparate this string value with another string. Is there any way to "transform" the Output<String> as string? I have tried with interpolate but I don't get the string value Ej:
    const value = new customComponentResource.something(); -> got an Output<String>
    
    let lb2 = pulumi.interpolate`${value}`
    
    export const lb2 -> I see the value ok.
    
    but customfunction(lb2) -> I got an lb2 Output<String> I need string.
    g
    • 2
    • 8
  • b

    bitter-dentist-28132

    09/23/2020, 8:15 PM
    is there an example "use this terraform provider in pulumi" tutorial?
    b
    • 2
    • 1
  • b

    broad-morning-54433

    09/23/2020, 9:12 PM
    Hi, I have a simple question that I can't seem to find an answer for.... why isn't there an
    output
    method on
    azure.servicebus.Queue
    ? And my follow up question.... how can output bindings be configured on Service Bus Queues?
  • h

    high-wire-68732

    09/23/2020, 10:44 PM
    Good Afternoon, my team has tried creating a LoadBalancer with NO SecurityGroups definition, pointed two FargateService instances with NO SecurityGroups definition to the LB and we got the following error:
    error: [WARN] A duplicate Security Group rule was found
    Multiple times, once for each Listener. Any idea how to be able to achieve this? Here's a sample of what we are trying to do:
    import * as awsx from '@pulumi/awsx';
    
    const vpc = new awsx.ec2.Vpc('test-vpc', {
      vpcId: '...',
    });
    
    // LOAD BALANCER DEFINITION
    
    const lb = new awsx.lb.ApplicationLoadBalancer('testLB', {
      vpc,
      subnets: [
        // ...
      ],
      external: true,
      tags: {
        'Name': 'testLB'
      },
    });
    
    // FIRST APP DEFINITION
    
    const targetGroup1 = lb.createTargetGroup('testTG1', {
      port: 80,
      loadBalancer: lb,
      healthCheck: {
        path: '/api',
      },
      tags: {
        'Name': 'testTG1'
      },
    });
    
    const httpListener1 = lb.createListener('testHTTP1', {
      defaultActions: [{
        fixedResponse: {
          contentType: 'text/plain',
          statusCode: '404',
        },
        type: 'fixed-response',
      }],
      loadBalancer: lb,
      port: 80,
      protocol: 'HTTP',
      external: true,
    });
    
    httpListener1.addListenerRule('testListener1', {
      actions: [{
        targetGroupArn: targetGroup1.targetGroup.arn,
        type: 'forward',
      }],
      conditions: [
        {
          pathPattern: {
            values: [
              '/api/*',
            ],
          },
        },
      ],
      priority: 200,
    });
    
    new awsx.ecs.FargateService('api', {
      desiredCount: 1,
      subnets: [
        // ...
      ],
      taskDefinitionArgs: {
        tags: {
          'Name': 'api'
        },
        containers: {
          adminBackend: {
            image: '...',
            memory: 512,
            portMappings: [
              targetGroup1,
            ],
          },
        },
      },
    });
    
    // SECOND APP DEFINITION
    
    const targetGroup2 = lb.createTargetGroup('testTG2', {
      port: 80,
      loadBalancer: lb,
      healthCheck: {
        path: '/ui',
      },
      tags: {
        'Name': 'testTG2'
      },
    });
    
    const httpListener2 = lb.createListener('testHTTP2', {
      defaultActions: [{
        fixedResponse: {
          contentType: 'text/plain',
          statusCode: '404',
        },
        type: 'fixed-response',
      }],
      loadBalancer: lb,
      port: 80,
      protocol: 'HTTP',
      external: true,
    });
    
    httpListener2.addListenerRule('testListener2', {
      actions: [{
        targetGroupArn: targetGroup2.targetGroup.arn,
        type: 'forward',
      }],
      conditions: [
        {
          pathPattern: {
            values: [
              '/*',
            ],
          },
        },
      ],
      priority: 200,
    });
    
    new awsx.ecs.FargateService('ui', {
      desiredCount: 1,
      subnets: [
        // ...
      ],
      taskDefinitionArgs: {
        tags: {
          'Name': 'ui'
        },
        containers: {
          adminBackend: {
            image: '...',
            memory: 512,
            portMappings: [
              targetGroup2,
            ],
          },
        },
      },
    });
    a
    • 2
    • 7
  • c

    clever-plumber-29709

    09/24/2020, 4:16 AM
    Does someone has an example of creating an appmesh in aws, with pulumi? awsx does not manages it, and also there is none in the pulumi-examples repo just wanted to see a reference implementation
    c
    • 2
    • 1
  • h

    helpful-processor-86468

    09/24/2020, 11:08 AM
    error: Exception calling application: code() takes at most 15 arguments (16 given)
    - this is what I'm getting when using dynamic resource when trying to do
    pulumi destroy
    . It was working fine for some time and now it's broken without any code change. What is happening?
  • g

    gorgeous-cpu-53034

    09/24/2020, 12:07 PM
    We are looking to Integrate Infrastructure as a code with Web Application . In our case we are using ASP.net core 3.1 mvc app which displays onprem inventory we want to spill up resource in Azure cloud provider using dynamic variable or inputs from data source and provision resources in Azure cloud. Is there why to integrate Pulum with web application
  • b

    billions-greece-30724

    09/24/2020, 1:52 PM
    I figured out my issue - I was in the wrong subscription when I ran the preview. sorry for the noise! I'm new to Pulumi and inherited a project where the infrastructure has drifted considerably, and I'm trying to update the Pulumi code to match. I'm getting this error:
    PS C:\GitRepos\iac-pulumi\src\nvp-az-identity> pulumi preview
    Previewing update (nvoicepay/production)
    
    View Live: <https://app.pulumi.com/***/***-az-identity/production/previews/****>
    
         Type                         Name                        Plan       Info
         pulumi:pulumi:Stack          ***-az-identity-production             1 error
     +   ├─ pulumi:providers:azuread  Production                  create
     =   └─ azure:keyvault:KeyVault   ***-prod-global-keyvault    import     1 error
    
    Diagnostics:
      pulumi:pulumi:Stack (***-az-identity-production):
        error: preview failed
    
      azure:keyvault:KeyVault (***-prod-global-keyvault):
        error: Preview failed: unrecognized resource type (Read): azure:keyvault/keyVault:KeyVault
  • b

    billions-greece-30724

    09/24/2020, 1:53 PM
    Other background info is that the keyvault and the resource group were moved to another subscription between when the code worked and now. So I'm using this to attempt to import it back in:
    var keyVault = new KeyVault(globalRegion.Configurator.GetKeyVaultName(), new KeyVaultArgs
                {
                    Name = globalRegion.Configurator.GetKeyVaultName(),
                    Location = globalResourceGroup.Resource.Location,
                    ResourceGroupName = globalResourceGroup.Resource.Name,
                    TenantId = globalRegion.SharedConfig.TenantId,
                    SkuName = "standard",
    
                    //acc
                    EnabledForDiskEncryption = true,
                    EnabledForDeployment = true,
                    EnabledForTemplateDeployment = true,
                }, new CustomResourceOptions
                {
                    ImportId = NvpConfig.GlobalKeyVaultResourceId,
                    Provider = azProvider
                }
    );
  • r

    red-energy-90711

    09/24/2020, 2:41 PM
    Hi, I'm new in pulumi, I would like to know if is possible to run pulumi inside a serverless function like AWS Lambda or Azure Functions. For example, suppose we have a function, and when it is invoked then pulumi run the "up" command in another way run provisioning code based on some arguments of function..
    g
    s
    • 3
    • 2
  • c

    clever-plumber-29709

    09/24/2020, 3:17 PM
    Still looking for a way to do this
    b
    l
    • 3
    • 4
  • h

    helpful-processor-86468

    09/25/2020, 7:11 AM
    still didn't solve it,
  • m

    mammoth-insurance-9770

    09/25/2020, 10:27 AM
    Hi everyone! I have a question about `ComponentResource`s and their intended usage. The example on the documentation shows that we should accept an
    opts
    argument which is then passed to the superconstructor:
    class MyComponent(pulumi.ComponentResource):
        def __init__(self, name, opts = None):
            super().__init__('pkg:index:MyComponent', name, None, opts)
    I was hopeful that this would cause Pulumi to apply those
    opts
    to all the resources inside the
    ComponentResource
    , so that if for example I wanted to use a custom provider, I only have to specify when creating my compontent resource:
    my_component = MyComponent(opts=ResourceOptions(provider=my_provider))
    But this doesn't seem to be the case. So, what is the appropriate way of propagating these options onward? Should I pass
    opts
    into every child resource:
    class MyComponent(pulumi.ComponentResource):
        def __init__(self, name, opts = None):
            super().__init__('pkg:index:MyComponent', name, None, opts)
            my_resource1 = ResourceA(opts=opts)
            my_resource2 = ResourceB(opts=opts)
    Although, this makes life more difficult when I need to add additional fields to the
    ResourceOptions
    of certain resources, such as
    depends_on
    . Or, should I pick out the fields that I want:
    class MyComponent(pulumi.ComponentResource):
        def __init__(self, name, opts = None):
            super().__init__('pkg:index:MyComponent', name, None, opts)
            my_resource1 = ResourceA(opts=ResourceOptions(provider=opts.provider))
            my_resource2 = ResourceB(opts=ResourceOptions(provider=opts.provider))
    which is OK, but I am concerned I will then by missing options which were supposed to be progagated down the tree. What was the intended usage here? Thanks in advance 🙂
    a
    • 2
    • 2
  • p

    proud-pizza-80589

    09/25/2020, 12:34 PM
    Is there a way to integrate pulumi directly into typescript code without that TS code needing to shell out to the pulumi cli? e.g. a express webserver with a route: POST /bucket which would then execute
    const bucket = new aws.s3.Bucket("my-bucket");
    l
    • 2
    • 4
  • g

    gifted-student-18589

    09/25/2020, 3:50 PM
    A simple question (with possibly a complicated answer? 😄) - I’m trying to deploy an AWS DocumentDB cluster in my custom VPC (so, not the default one), but it seems I can’t set the VPC for it (https://www.pulumi.com/docs/reference/pkg/aws/docdb/cluster/) Is there a way to do it? Or am I just missing something here? 🤔 Thank you! 🚀
    g
    • 2
    • 5
  • m

    millions-furniture-75402

    09/25/2020, 4:54 PM
    I’m trying to get a Lambda function declared in another stack using:
    // systemBackupLambdaId = backupLambda.id exported from the other project
    
    const systemBackupLambda = aws.lambda.Function.get("system-backup-lambda", systemBackupLambdaId);
    I’m getting an error I don’t understand:
    Diagnostics:
      pulumi:pulumi:Stack (monitoring-service-sandbox):
        error: preview failed
    
      aws:lambda:Function (system-backup-lambda):
        error: Preview failed: refreshing urn:pulumi:sandbox::monitoring-service::aws:lambda/function:Function::system-backup-lambda: 1 error occurred:
        	* InvalidParameter: 1 validation error(s) found.
        - minimum field size of 1, GetFunctionInput.FunctionName.
    • 1
    • 2
Powered by Linen
Title
m

millions-furniture-75402

09/25/2020, 4:54 PM
I’m trying to get a Lambda function declared in another stack using:
// systemBackupLambdaId = backupLambda.id exported from the other project

const systemBackupLambda = aws.lambda.Function.get("system-backup-lambda", systemBackupLambdaId);
I’m getting an error I don’t understand:
Diagnostics:
  pulumi:pulumi:Stack (monitoring-service-sandbox):
    error: preview failed

  aws:lambda:Function (system-backup-lambda):
    error: Preview failed: refreshing urn:pulumi:sandbox::monitoring-service::aws:lambda/function:Function::system-backup-lambda: 1 error occurred:
    	* InvalidParameter: 1 validation error(s) found.
    - minimum field size of 1, GetFunctionInput.FunctionName.
I’m able to get other resources this way, so I don’t understand why it would fail on lambda:
const bastionEc2Instance = aws.ec2.Instance.get("bastion-ec2", bastionInstanceId);
Looks like I had to do:
const systemBackupLambda = aws.lambda.Function.get("system-backup-lambda", systemBackupLambdaId, {
  name: systemBackupLambdaId
});
View count: 1