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

    big-spring-69861

    12/15/2021, 9:53 PM
    Hi, I'm trying to setup a new trigger on a lambda function in pulumi. I want the source to be a cloudwatch log stream. Is this possible with pulumi? Also, if this is not the right channel please lmk and I'll move the quest there 🙂
    b
    w
    • 3
    • 4
  • r

    rough-hydrogen-27449

    12/16/2021, 3:10 AM
    Is anyone else trying to use the pulumi-kafka package to manage topics and acls in confluent cloud? I am attempting to create topics with a provider that looks like this:
    provider = kafka.Provider(
                    "kafka-provider",
                    bootstrap_servers=confluent_environment.apply(
                        lambda e: [e.bootstrap_servers.lstrip("SASL_SSL://")]
                    ),
                    opts=opts,
                    sasl_mechanism="plain",
                    sasl_username=confluent_environment.apply(
                        lambda e: e.environment_credentials.api_key
                    ),
                    sasl_password=confluent_environment.apply(
                        lambda e: e.environment_credentials.api_secret
                    ),
                    tls_enabled=True,
                    timeout=120,
                )
    and getting this error:
    kafka:index:Topic (logs-topic):
        error: 1 error occurred:
            * kafka server: The client is not authorized to access this topic.
    I have given the service account attached to my API key the
    CloudClusterAdmin
    entitlement and have confirmed with the confluent CLI that the API key can create a topic in the cluster... Any ideas what might be going wrong here?
    b
    • 2
    • 7
  • t

    thousands-jordan-32051

    12/16/2021, 1:00 PM
    Hi all - quick question I'm trying to import some Azure Native resources by ID, specifically a VNet right now. The Subnets are throwing up some mismatches which are mostly erroneous (saying it needs to update e.g. RouteTable but the IDs are identical). My main query is though how do I ignore properties that sit below an array? I can use
    ignoreChanges
    to set individual elements e.g.
    "subnets[0].routeTable"
    but I want to do it for all with some syntax like
    "subnets[*].routeTable"
    . I've tried a few combos like [] and [*] or no brackets at all, but no luck so far. What have I missed?
    • 1
    • 1
  • h

    handsome-painter-81634

    12/16/2021, 5:24 PM
    Hey Guys does anyone know how to get a vault secret using azure-native
    • 1
    • 1
  • r

    rapid-raincoat-36492

    12/16/2021, 7:27 PM
    Hello! I wrote a blog on incrementally migrating from Terraform/Terragrunt to Pulumi if anyone is interested 😄: https://news.ycombinator.com/item?id=29582542 To do so, we created a Terraform Provider for the Pulumi cloud, which is open sourced here: https://github.com/transcend-io/terraform-provider-pulumi/
    🙌🏽 1
    🙌 3
    ❤️ 2
  • s

    steep-portugal-37539

    12/16/2021, 7:31 PM
    Hey guys! Does anyone know in regards to using pulumi aliases, once you configure them for a resource and deploy, can you then remove the alias configuration from the code? So does the alias field need to be set for eternity still, after having deployed once with it? https://www.pulumi.com/docs/intro/concepts/resources/#aliases https://www.pulumi.com/blog/cumundi-guest-post/
    r
    • 2
    • 2
  • p

    polite-napkin-90098

    12/16/2021, 9:09 PM
    I'm running into some trouble with the AWS-Native package in golang, I need an AWS Role so I copied the example here: https://www.pulumi.com/registry/packages/aws-native/api-docs/iam/role/#example-2 thusly
    eksRole, err := iam.NewRole(ctx, "eksRole", &iam.RoleArgs{
                            AssumeRolePolicyDocument: pulumi.Any{
                                    Version: "2012-10-17",
                                    Statement: []map[string]interface{}{
                                            map[string]interface{}{
                                                    "effect": "Allow",
                                                    "principal": map[string]interface{}{
                                                            "service": []string{
                                                                    "<http://eks.amazonaws.com|eks.amazonaws.com>",
                                                            },
                                                    },
                                                    "action": []string{
                                                            "sts:AssumeRole",
                                                    },
                                            },
                                    },
                            },
                            Path: pulumi.String("/"),
                            ManagedPolicyArns: pulumi.StringArray{
                                    pulumi.String("arn:aws:iam::aws:policy/AmazonEKSClusterPolicy"),
                                    pulumi.String("arn:aws:iam::aws:policy/AmazonEKSServicePolicy"),
                            },
                    })
                    if err != nil {
                            return err
                    }
    But when I try and run that I get the following errors.
    Diagnostics:
      pulumi:pulumi:Stack (EKS-EKS-test):
        # EKS
        ./main.go:77:30: pulumi.Any is not a type
        ./main.go:77:30: invalid composite literal type func(interface {}) pulumi.AnyOutput
     
        error: an unhandled error occurred: program exited with non-zero exit code: 2
    I have spent some time checking I copied the example well enough and I can't find any syntax errors, also when I copy the code from the example verbatim into my main.go and try to run it I get similar errors. Did something change about pulumi.Any? Is there an error in the example? Please help!
    l
    • 2
    • 20
  • r

    rhythmic-tailor-1242

    12/17/2021, 3:49 AM
    Hi all, is it possible to have a Pulumi project to allocate resources be broken down into multiple files and folders? similar to how one would structure a Terraform project... For example, inside
    dev
    I have the file
    index.ts
    and then inside
    dev
    I also have another folder
    iam
    and inside it I have another
    index.ts
    file. I need
    pulumi up
    to execute both files. Is it possible?
    a
    w
    • 3
    • 3
  • e

    enough-motorcycle-97835

    12/17/2021, 9:48 AM
    Hi all, is Pulumi based on Terraform?
    a
    • 2
    • 1
  • w

    wet-noon-14291

    12/17/2021, 1:38 PM
    Is there a way to get the org name pre-filled for the SSO login? I mean something like
    <https://app.pulumi.com/signin/sso?reason=401&orgName=><myorgname>
    f
    • 2
    • 1
  • r

    rapid-eve-24229

    12/17/2021, 10:39 PM
    Hello All, I have a project that I have been deploying in Python3.6 for some time. I am deploying a container to aws ecs. I installed the latest version of Pulumi, v3.19.0 I created a virtual environment in Python 3.8 pulumi==3.20.0 pulumi-aws==4.33.0 pulumi-docker==3.1.0 When I run pulumi up, I get the message error: failed to discover plugin requirements: exit status 1 So, same code works in Python3.6 does not work in Python3.8 and the error message is vague. Here is the code I am trying to run
    from pulumi import export
    import pulumi_aws as aws
    
    
    # Create an Elastic Container Service (ECS) cluster in the default VPC
    
    cluster = aws.ecs.Cluster(
        "app-cluster",
        settings=[aws.ecs.ClusterSettingArgs(name="containerInsights", value="enabled")],
    )
    
    Also does not work in Python 3.9
    Also tried all the latest pip install libraries with the same message
    Also tried a brand new project, still same message
  • m

    millions-laptop-48175

    12/19/2021, 3:00 PM
    hello, can pulumi revert manual changes? I tested with k8s deployment, when manually changing replicas count, 'pulumi up' don't rollback this update. Is this expected behavior?
    t
    • 2
    • 1
  • q

    quiet-plastic-34312

    12/19/2021, 11:11 PM
    anyone can help me... im trying to integrate gitlab cicd with pulumi and when im runing the #pulumi up comand i get a [Failed to parse python version: ''] at console... but dont know how to debug it
    l
    f
    g
    • 4
    • 15
  • b

    bulky-oil-97030

    12/20/2021, 9:21 AM
    Hello everyone 👋 Our team using pulumi on Azure, and I would like to use the
    pulumi import
    cli command to import an api management resource. Unfortunately, there is only documentation to import AWS resources via cli import. Is this possible with Azure too, and if so, how?
    ✅ 1
    b
    • 2
    • 3
  • c

    colossal-market-93154

    12/20/2021, 1:35 PM
    Hi everyone! I'm trying to use
    pulumi import
    to import some resources from Github. Do you have any solution from that error? If not, can you point me to the source code of this command so I can write a bugfix? Related to: https://github.com/pulumi/pulumi/issues/7046 https://github.com/pulumi/pulumi-aws/issues/1368
    l
    h
    • 3
    • 17
  • a

    alert-laptop-13489

    12/20/2021, 1:50 PM
    Hi Folks. I've just started using the Pulumi Go SDK. In some of the example code it uses type
    pulumi.String
    instead of just a regular Go
    String
    . What's the advantage of using the String from the
    pulumi
    package?
    b
    • 2
    • 3
  • a

    ancient-cricket-42076

    12/20/2021, 3:14 PM
    Hello people, I have a small obstacle on my project where beanstalk's ec2 instances take longer to create and I need the instances ID so I can work with their security groups and their ingress rules Is the any module native to pulumi to let it know it needs to wait (I rather no use use async if it's possible).
    b
    • 2
    • 2
  • b

    best-waiter-16927

    12/20/2021, 4:34 PM
    Hey, Question. Can we move resources between stacks using `aliases`'
    stack
    arg? (f.e.
    aliases: [{ stack: 'old-stack' }]
    ) If not, what is this arg used for?
  • l

    limited-army-96747

    12/20/2021, 5:30 PM
    hey folks, is there any trick to run some clean up steps, like delete dynamically created files?
  • f

    full-dress-10026

    12/20/2021, 6:44 PM
    How does pulumi decide what version of a plugin to download?
    b
    • 2
    • 3
  • b

    broad-island-71889

    12/20/2021, 9:35 PM
    Hi guys, could you please help me to figure out what is going on with the Custom resource? Pulumi reports that the CR is updated, but it’s not. I’ve tried to upgrade the pulumi_kubernetes to 3.12.1, but it didn’t help. Would appreciate any directions for debugging this issue.
    l
    • 2
    • 16
  • b

    billions-hospital-77217

    12/21/2021, 12:56 AM
    Hi, I'm new to IaC, and I'm spinning up an EKS stack on AWS. I just want to make sure I need two separate stacks: one to manage Kubernetes and the nodes/pods and one to manage the EKS configuration on the AWS side of things. I'm also struggling to find documentation relating to deploying a service mesh using Pulumi
    l
    • 2
    • 3
  • l

    little-cartoon-10569

    12/21/2021, 2:23 AM
    Is anyone else having issues running anything backed by the Pulumi backend? All my destroys/previews/ups are running forever and have to be interrupted...
    a
    • 2
    • 5
  • p

    prehistoric-controller-80994

    12/21/2021, 11:48 AM
    Hello! I’m starting with Pulumi, and I’m on discovery mode to find out if it’s the right tool - so I’m a noobie in the subject of this solution. I’ve tried to find how to do it, but maybe I have the wrong perspective. I’m looking to codify two VPC: one in GCP and one in AWS connected with S2S VPN. I can do it individually VPCs (AWS and GCP separate Pulumi apps). What should I do if I need it in a single application? Is it the right approach, or shall I manage it separately and import it somehow later into a single app (I also can’t figure out how it would work - so not sure if it’s the right track)? Does anyone manage multi-cloud (GCP and AWS) in a single app?
    l
    a
    • 3
    • 7
  • i

    important-vegetable-39003

    12/21/2021, 12:24 PM
    Hi folks, new to Pulumi and enjoying it so far, but wanted to ask one thing. Say I try to create an existing resource (and ofc it fails). If the resource already exists, how can I register it to state?
    e
    • 2
    • 6
  • l

    limited-army-96747

    12/21/2021, 2:14 PM
    Hey folks, what is the way to get the value out of pulumi/random? I tried using apply and pulumi output, just keep getting an error
    Calling [toJSON] on an [Output<T>] is not supported. To get the value of an Output as a JSON value or JSON string consider either: 1: o.apply(v => v.toJSON()) 2: o.apply(v => JSON.stringify(v)) See <https://pulumi.io/help/outputs> for more details. This function may throw in a future version of @pulumi/pulumi.
    g
    • 2
    • 7
  • l

    limited-army-96747

    12/21/2021, 2:14 PM
    const rdsPassword = new random.RandomPassword('rds-password', {
      length: 20,
      special: true,
      overrideSpecial: '_%@',
    })
    
    const rdsUsername = new random.RandomPassword('rds-username', {
      length: 20,
      special: false,
    })
    
    const rdsSecretVersion = new aws.secretsmanager.SecretVersion('rds-secret-version', {
      secretId: rdsSecret.id,
      secretString: JSON.stringify({
        AURORA_USERNAME: rdsUsername.result.apply((value) => JSON.stringify(value)),
        AURORA_PASSWORD: rdsPassword.result.apply((value) => JSON.stringify(value)),
      }),
    })
  • s

    sticky-match-71841

    12/21/2021, 2:26 PM
    Is there any ideas for creating an interface for stack outputs? I caught myself using the automation API to orchestrate 100+ micro-stacks and weaving outputs together and staging dependent resources, but it seems like I am really just creating a layer on top of what Pulumi already does pretty well with outputs. My use case is solving the orchestration issue that arises when moving from a mono-repo to micro-stacks. From one side, we want to make workflows efficient for dev teams, but it comes at a cost to us as the operators as we need to pick up the orchestration "slack". Stuff like provisioning dev environments can be tricky if we need to trigger 60+ pipelines in other repositories. If dev teams services depend on other teams services it becomes even more opaque what to do.
    • 1
    • 1
  • b

    busy-island-31180

    12/21/2021, 5:50 PM
    Hi Pulumi Folks - I'm looking into Pulumi, and wondering if the Pulumi SaaS offering provides features that would allow engineers, managers, etc to visualize the infrastructure we are deploying, see dependency relationship, do cost analysis, etc?
    ➕ 1
    g
    • 2
    • 8
  • f

    fancy-egg-38667

    12/21/2021, 8:46 PM
    In Terraform there is a
    data
    type that I can use to refer to and verify external ( unmanaged ) resources Is there an equivalent in Pulumi?
    g
    l
    • 3
    • 6
Powered by Linen
Title
f

fancy-egg-38667

12/21/2021, 8:46 PM
In Terraform there is a
data
type that I can use to refer to and verify external ( unmanaged ) resources Is there an equivalent in Pulumi?
g

green-stone-37839

12/21/2021, 8:51 PM
There is. Generally, this would be accomplished with a SDK such as the AWS SDK for node/go/python/csharp. You'd import that SDK into your Pulumi project and are free to use the full scope.
l

little-cartoon-10569

12/21/2021, 8:53 PM
All the resources have a
get
function that creates a read-only, unmanaged version of the resource.
And there are SDK wrappers in most modules.
For example, the AWS EC2 module has GetAmi, GetNetworkInterfaces, GetRoute, etc. https://www.pulumi.com/registry/packages/aws/api-docs/ec2/ (scroll half-way down the page).
g

green-stone-37839

12/21/2021, 8:55 PM
Yep, that's also a great solution. Generally, the more complex the lookup, the more likely you'll need to use an external SDK. Eg- if you have the AWS ARN/ID of the resource use the
get
functions.
f

fancy-egg-38667

12/21/2021, 9:02 PM
❤️ thanks!
View count: 1