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

    wet-noon-14291

    09/27/2022, 1:19 PM
    is it possible to delete the logs for an "activity"? I want a way to clean up potential secrets that might have been printed.
    m
    s
    l
    • 4
    • 9
  • s

    shy-hydrogen-95871

    09/27/2022, 4:37 PM
    Hello, Could you please tell - is it possible to use async in custom provider written in python? Thank you
    e
    • 2
    • 1
  • s

    shy-hydrogen-95871

    09/27/2022, 4:38 PM
    Based on this snippet it looks like it is not possible
  • c

    clean-salesclerk-32849

    09/27/2022, 7:08 PM
    Hey, when I upgraded to the new Pulumi, I started getting this error message - any ideas why?
    > $ pulumi up                                                                    ⬡ 16.17.0 [±feature-new-pulumi-load-balancer ●▴]
    error: could not get cloud url: could not load current project: 1 error occurred:
    	* #/config: expected string or null, but got object
    
    > $ pulumi logout                                                                ⬡ 16.17.0 [±feature-new-pulumi-load-balancer ●▴]
    error: could not determine current cloud: could not load current project: 1 error occurred:
    	* #/config: expected string or null, but got object
    
    > $ pulumi login                                                                 ⬡ 16.17.0 [±feature-new-pulumi-load-balancer ●▴]
    error: could not determine current cloud: could not load current project: 1 error occurred:
    	* #/config: expected string or null, but got object
    💯 1
    r
    • 2
    • 3
  • w

    witty-barista-69390

    09/27/2022, 8:59 PM
    Question for the group, does anyone have an example of setting up cross-account with delegated DNS to child accounts? Main account has mydomain.com, dev account has dev.mydomain.com ?
    s
    l
    • 3
    • 15
  • s

    square-hair-965

    09/27/2022, 9:21 PM
    I'm sure this comes up a lot: Anyone know a 1- or 2 liner I can use in typescript to verify an account id just before the plan runs? i'm already getting the account id via a getter/waiter in most of my index files?. There's been a few times now were I've created a few resources I have to go cleanup because I'm on the wrong aws cli profile 😓
    const account = aws.getCallerIdentity({});
    const accountId = pulumi.output(account).apply(acc => `${acc.accountId}`);
    Seems like checking that account id against a config value would do it but it's not that straight forward with how pulumi plans
    s
    • 2
    • 1
  • m

    mammoth-camera-90962

    09/28/2022, 12:42 AM
    Is there any tooling available to help me visualise/understand the resource dependencies, resource provisioning time, and actual vs max parallelisation of a
    pulumi up
    ? I'm looking to understand if there's potential improvements that could be made anywhere through the whole stack.
    l
    • 2
    • 3
  • c

    creamy-byte-37608

    09/28/2022, 1:23 AM
    Is there an Azure Native way to get a role definition by name?
    • 1
    • 1
  • s

    strong-helmet-83704

    09/28/2022, 5:44 AM
    Could someone please explain the difference between calling pulumi.invokeOptions vs pulumi.resourceOptions on a given resource. They seem to be interchangeable but in some scenarios resourceOptions gives a merge exception. I’m not sure where one should be used over the other? thanks in advance 🙏
    e
    • 2
    • 3
  • b

    billions-crowd-71510

    09/28/2022, 6:30 AM
    Hi i'm trying to import an existing Event hub Cluster in Azure. But geting allways same error imputs no match with the resource . Using the same program to create a new cluster works. and i see no diference in the ARM Templates for the 2 clusters. This is my program. Can someone help me understand this error and where it's not working.
    def import_cluster(self) -> None:
            """
            Import an event hub cluster.
            Args:
            Returns:
              None
            """
            cluster_name = environment_variables.CLUSTER_NAME
            cluster_id_import = '/subscriptions/' + self.eh_subscription_id + '/resourceGroups/' + self.eh_rg + '/providers/Microsoft.EventHub/clusters/' + cluster_name
            azure_native.eventhub.Cluster(
                resource_name=cluster_name,
                cluster_name=cluster_name,
                location='West Europe',
                resource_group_name='streamming-pulumi-poc',
                sku=azure_native.eventhub.ClusterSkuArgs(
                    capacity=1,
                    name="Dedicated",
                ),
                tags={
                },
                opts=pulumi.ResourceOptions(import_=cluster_id_import)
            )
  • b

    bitter-twilight-16606

    09/28/2022, 8:15 AM
    I'm getting an error running pulumi up
    Error building AzureAD Client: Error populating Client ID from the Azure CLI: No Authorization Tokens were found - please ensure the Azure CLI is installed and then log-in with `az login`.
    I have latest azure CLI and pulumi installed and have run az login. Any ideas what is going on here?
    • 1
    • 1
  • l

    lively-france-83054

    09/28/2022, 1:34 PM
    hi, i'm using
    aws.glue.CatalogTableStorageDescriptorArgs
    to manage Glue tables. i'm facing something strange - without changing code at all,
    pulumi up
    always tries to update the table.
    pulumi preview --diff
    does some something new.
  • l

    lively-france-83054

    09/28/2022, 1:34 PM
    is this a known issue or a bug?
  • b

    brash-restaurant-84207

    09/28/2022, 1:35 PM
    hi, I'm a complete pulumi noob. my initial goal is to create just a vpc using a specific aws profile from my aws credentials file. I have so far: - created a new directory - run 'pulumi new' , and chosen aws-python - taken the following code from the 'setting up a new vpc' part of the pulumi getting started section of their website: import pulumi import pulumi_awsx as awsx vpc = awsx.ec2.Vpc("custom") pulumi.export("vpcId", vpc.vpc_id) pulumi.export("publicSubnetIds", vpc.public_subnet_ids) pulumi.export("privateSubnetIds", vpc.private_subnet_ids) - replaced the default code in the '__main__.py' file with the above code - added the following line to Pulumi.<stackname>.yaml: aws😛rofile: dev-account When I try to run: 'pulumi up' I'm getting the error: ModuleNotFoundError: No module named 'pulumi_awsx' I then executed: 'pip install pulumi_awsx' This installed the module. When I tried to run 'pulumi up' again I experienced the same error What am I missing? (doing this on a windows machine btw)
  • l

    lively-france-83054

    09/28/2022, 1:46 PM
    @brash-restaurant-84207 you might try
    ./venv/bin/pip install ...
  • b

    brash-restaurant-84207

    09/28/2022, 1:47 PM
    @lively-france-83054 does that assume I'm using virtual environment?
    b
    l
    • 3
    • 14
  • r

    ripe-russia-4239

    09/28/2022, 2:15 PM
    I feel I've come across this kind of deadlock issue before, in another project. Is there a way that Pulumi could surface circular dependencies that cause this kind of deadlock?
  • m

    melodic-car-16900

    09/28/2022, 5:33 PM
    Can someone tell me how I can detect, in my index.ts file, whether it's being run as the first step or the second "yes'ed" step
    s
    • 2
    • 2
  • a

    agreeable-whale-35898

    09/28/2022, 5:52 PM
    I couldn't find how to get the user name (the name of the entity who executed the
    pulumi up
    command, namely the CLI identity..) I found
    GetCallerIdentity.InvokeAsync().GetAwaiter().GetResult().UserId
    , but couldn't find the actual user's name. I want to add a transformation that adds a
    by
    tag with the executor name. Any idea how to do so in C# and AWS?
    s
    • 2
    • 4
  • s

    stale-room-29458

    09/28/2022, 6:55 PM
    Hi folks, I'm facing a problem with pulumi's kubernetes NamespacePatch resource. Whenever I'm using it to patch an existing namespace, pulumi will fail, telling me that this resource already exists. This seems to be the whole point of that resource, to be applied if the namespace does already exist. The namespace to be mutated is created by the same provider. If I use the NamespacePatch for a namespace name that does not exist already, this namespace is created by it. Maybe anybody got an idea what I'm doing wrong here?
    g
    • 2
    • 2
  • l

    little-soccer-5693

    09/28/2022, 11:34 PM
    the examples for AWS certification validations https://www.pulumi.com/registry/packages/aws/api-docs/acm/certificatevalidation/ assume that only a single domain validation output is returned; however in practice AWS can return more than 1 (as described by https://pkg.go.dev/github.com/pulumi/pulumi-aws/sdk/v5/go/aws/acm#CertificateOutput.DomainValidationOptions) . so the example code here should be ranging over all of the outputs rather than assume there is only 1. I can't figure out how to get the length of the array without crashing. Example code is:
    domainValidationOption := exampleCertificate.DomainValidationOptions.ApplyT(func(options []acm.CertificateDomainValidationOption) interface{} {
                return options[0]
            })
    ^ DomainValidationOptions type is CertificateDomainValidationOptionArrayOutput which has an Index() method but not an associated Len() method. If I use Index() that exceeds the length of the array I get a pulumi crash:
    
        goroutine 163 [running]:
        <http://github.com/pulumi/pulumi-aws/sdk/v5/go/aws/acm.CertificateDomainValidationOptionArrayOutput.Index.func1({0xc000068da0|github.com/pulumi/pulumi-aws/sdk/v5/go/aws/acm.CertificateDomainValidationOptionArrayOutput.Index.func1({0xc000068da0>?, 0xc000052710?, 0x1?})
            /tmp/7bdd55732174400744/vendor/github.com/pulumi/pulumi-aws/sdk/v5/go/aws/acm/pulumiTypes.go:133 +0x8e
        reflect.Value.call({0x123aa40?, 0x1675698?, 0x40efe5?}, {0x160ba84, 0x4}, {0xc000640648, 0x1, 0xc000452480?})
            /snap/go/9952/src/reflect/value.go:556 +0x845
        reflect.Value.Call({0x123aa40?, 0x1675698?, 0x4a75bc?}, {0xc000640648, 0x1, 0x1})
            /snap/go/9952/src/reflect/value.go:339 +0xbf
        <http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.makeContextful.func1(|github.com/pulumi/pulumi/sdk/v3/go/pulumi.makeContextful.func1(>{0xc000640630?, 0x5?, 0x8?})
            /tmp/7bdd55732174400744/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/types.go:384 +0x56
        reflect.Value.call({0xc000401920?, 0xc00028a9c0?, 0x0?}, {0x160ba84, 0x4}, {0xc000404fa0, 0x2, 0x0?})
            /snap/go/9952/src/reflect/value.go:556 +0x845
        reflect.Value.Call({0xc000401920?, 0xc00028a9c0?, 0xc000122000?}, {0xc000404fa0, 0x2, 0x2})
            /snap/go/9952/src/reflect/value.go:339 +0xbf
        <http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).ApplyTWithContext.func1()|github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).ApplyTWithContext.func1()>
            /tmp/7bdd55732174400744/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/types.go:507 +0x2f0
        created by <http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).ApplyTWithContext|github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).ApplyTWithContext>
            /tmp/7bdd55732174400744/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/types.go:495 +0x3fb
     
        error: an unhandled error occurred: program exited with non-zero exit code: 2
    how are callers supposed to get the length of DomainValidationOptions? followup would be can pulumi update the referenced example code to include this?
  • l

    lemon-salesclerk-6224

    09/29/2022, 12:41 AM
    Is there a way to determine what kind of operation pulumi is doing when it's running your code? I have an
    index.ts
    file that pulumi is running but when I do a
    pulumi up
    I want to know whether the current run of the code is because of
    pulumi refresh
    or
    pulumi deploy
    for example
    l
    • 2
    • 3
  • n

    narrow-cpu-35517

    09/29/2022, 6:05 AM
    Hi All
  • n

    narrow-cpu-35517

    09/29/2022, 6:06 AM
    I am facing error while creating a deployment in kubernetes:
    kubernetes:apps/v1:Deployment (deployment-game):
        error: 4 errors occurred:
        	* the Kubernetes API server reported that "web-infra-ns/deployment-game" failed to fully initialize or become live: 'deployment-game' timed out waiting to be Ready
        	* [MinimumReplicasUnavailable] Deployment does not have minimum availability.
        	* [ProgressDeadlineExceeded] ReplicaSet "deployment-game-589b4c95dd" has timed out progressing.
        	* Minimum number of live Pods was not attained
  • n

    narrow-cpu-35517

    09/29/2022, 6:07 AM
    below is my deployment config:
    const deployment = new k8s.apps.v1.Deployment(
      "deployment-game",
      {
        metadata: { name: "deployment-game", namespace: namespaceName },
        spec: {
          replicas: 5,
          selector: { matchLabels: { app: "2048" } },
          template: {
            metadata: { labels: { app: "2048" } },
            spec: {
              containers: [
                {
                  image: `<http://xxxx.dkr.ecr.us-east-1.amazonaws.com/web-bff-d3f46e7:latest|xxxx.dkr.ecr.us-east-1.amazonaws.com/web-bff-d3f46e7:latest>`,
                  imagePullPolicy: "Always",
                  name: "2048",
                  ports: [{ containerPort: 80 }],
                },
              ],
            },
          },
        },
      },
      { provider }
    );
  • n

    narrow-cpu-35517

    09/29/2022, 6:07 AM
    Please help
  • b

    bulky-rose-70012

    09/29/2022, 7:04 AM
    Is there a way to get the Pulumi Github app to display the diff on pull requests? Like the Github action can with
    comment-on-pr: true
    and
    diff: true
    .
    l
    • 2
    • 6
  • e

    enough-table-42729

    09/29/2022, 7:18 AM
    Hi all, Trying to create EKS clusters in an existing VPC and subnets using Pulumi. Currently struggling to retrieve information about the existing VPC and its subnets using just the VPC id. I also need to distinguish between the private and public subnets of that VPC, because I want to create the managed node group in the private subnets. I tried using
    Vpc.fromExistingIds
    by passing the existing vpc id, but it doesn't seem to populate the
    publicSubnetIds
    and
    publicSubnetIds
    fields of the resulting object.
    aws.ec2.getVpc
    or
    aws.ec2.getSubnets
    don't distinguish between public and private subnets. Am I missing something obvious? Is there some other way to do it? The existing VPC and subnets should not be managed by the stack that is creating the clusters. Thanks.
    b
    • 2
    • 2
  • l

    lively-france-83054

    09/29/2022, 8:26 AM
    hi, is there a way to set the default provider programmatically?
    e
    • 2
    • 2
  • b

    brash-restaurant-84207

    09/29/2022, 11:31 AM
    hi, what is the method for assigning which AWS credentials profile should be used? (not from the command line) Something in a a yaml file?
    e
    • 2
    • 7
Powered by Linen
Title
b

brash-restaurant-84207

09/29/2022, 11:31 AM
hi, what is the method for assigning which AWS credentials profile should be used? (not from the command line) Something in a a yaml file?
e

echoing-dinner-19531

09/29/2022, 11:57 AM
pulumi config set aws:profile <profile name>
That will set the profile for the current stack
We’re working on being able to just add that to the Pulumi.yaml file as well
b

brash-restaurant-84207

09/29/2022, 2:49 PM
a colleague of mine seems to think that it can be configured in the Pulumi.stackname.yaml file
something like this:
config: aws:region: us-east-1 aws😛rofile: <aws-credentials-file-profile-name>
does that sound right?
e

echoing-dinner-19531

09/29/2022, 7:11 PM
yup yup, that’s what
pulumi config set
does, it just edits the Pulumi.stack.yaml file
View count: 2