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

    most-lighter-95902

    10/02/2021, 11:55 PM
    const dbPassword = pulumi.interpolate`${config.requireSecret('db_password')}`
  • c

    crooked-sunset-90921

    10/03/2021, 4:22 AM
    Hi all, does anyone have any suggestions how to get a list of all outputs which are exported by another stack? I can get a named output using StackReference..get_output('foo'), but how do I get all outputs?
  • c

    crooked-sunset-90921

    10/03/2021, 4:23 AM
    On the CLI there's the command: pulumi stack outputs - thinking there must be an equivalent through the SDK?
  • l

    little-market-63455

    10/03/2021, 4:54 PM
    A suggestion, please let me know if it should go on the GitHub repository. While using
    awsx.ec2.Vpc.getDefault().publicSubnetIds
    I noticed that it always returns only exactly
    2
    subnets Checking the code, I found this comment:
    back compat. We always would just use the first two public subnets of the region we're in. So preserve that, even though we could get all of them here. Pulling in more than the two we pulled in before could have deep implications for clients as those subnets are used to make many downstream resource-creating decisions.
    But the documentation doesn't mention this which is a surprising behavior.
    b
    • 2
    • 2
  • r

    rapid-raincoat-36492

    10/03/2021, 9:09 PM
    In typescript, how can I say "Don't create resource X until 15 seconds after the IAM Role it depends on finishes provisioning?"
    b
    b
    • 3
    • 15
  • c

    crooked-pillow-11944

    10/04/2021, 12:06 AM
    I'm trying to pass my GitHub token from a secret exposed by another stack:
    github = pulumi.StackReference(f"github-{environment}")
    github_token = secrets.github("token")
    os.environ['GITHUB_TOKEN'] = github_token
    Is there any way to force the output to resolve before a github resource is requested?
    b
    • 2
    • 9
  • n

    nutritious-australia-90040

    10/04/2021, 7:25 AM
    I am trying to create an Azure Private Endpoint in a different Subscription so I want to pass a ResourceGroupId instead of just ResourceGroupName for PrivateEndPointArgs, but that option seems to be absent. is there any solution to this problem?
  • r

    rough-rain-68282

    10/04/2021, 7:42 AM
    Hello I need some help, can I somehow get the security group ID from the group name, I am trying to create multiple SGs from a single file using
    aws.ec2.SecurityGroupRule
    this leads me to a problem where the newly created groups cannot be referenced in other groups using the name. The field
    security_group_id
    expects a sg id. Not sure how I can get that dynamically . Thanks
    a
    • 2
    • 2
  • l

    lemon-monkey-228

    10/04/2021, 9:48 AM
    Totally didnt realise stacks were not unique between projects
  • l

    lemon-monkey-228

    10/04/2021, 9:48 AM
    Trying to use the same GCS bucket for 3 projects (they're all components of a larger project) and I kept getting told the stack
    production
    already existed
  • l

    lemon-monkey-228

    10/04/2021, 9:55 AM
    So, I've gone for
    some-project-a_production
    ,
    some-project-b_production
    etc.
  • l

    lemon-monkey-228

    10/04/2021, 9:57 AM
    Does that mean if I jump between these project directories, I'm going to have to keep `pulumi stack select`ing? 🤔
    b
    • 2
    • 2
  • l

    lemon-monkey-228

    10/04/2021, 10:00 AM
    My current directory structure is
    projects
        prometheus
            Pulumi.yaml, Pulumi.prometheus-production.yaml, Pulumi.prometheus-staging.yaml
        grafana
            Pulumi.yaml, Pulumi.grafana-production.yaml, Pulumi.grafana-staging.yaml
        rules
            Pulumi.yaml, Pulumi.rules-production.yaml, Pulumi.rules-staging.yaml
  • a

    able-doctor-68496

    10/04/2021, 3:12 PM
    Hi there - I’m really trying to wrap my head around the 
    props
     argument to the 
    ComponentResource
     constructor: https://www.pulumi.com/docs/reference/pkg/python/pulumi/#the-pulumi-python-resource-model-1 My main questions about it are: • When would I want to pass something to this 
    props
     argument? • What would I pass to that argument? For example, currently I’m passing a Kubernetes namespace to a “parent” 
    ComponentResource
     that I’ve created. I’m passing it like so:
    def __init__(..., namespace: Namespace, ...):
      super().__init__(
        ...,
        props={'namespace': namespace},
        ...
      )
    Is that the correct way to use 
    props
    ? My thinking was that this would let the Pulumi “engine” know that there is an ordering requirement between the namespace and my 
    ComponentResource
    . Is that how it works? If not, then what are 
    props
     for?
    r
    • 2
    • 1
  • d

    damp-accountant-65956

    10/04/2021, 3:42 PM
    is there a standard practice for validating inputs into a component that are passed in as
    pulumi.StringInput
    types in go? I know I could just make them a
    string
    and validate them but there may be cases where they could be supplied by the end user or as an output from like a data source. So I wasn't sure how to validate them when they are
    pulumi.StringInput
    values... do I need to do a
    .ToStringOutput().ApplyT()
    and validate within the applier?
    b
    • 2
    • 7
  • d

    damp-accountant-65956

    10/04/2021, 4:39 PM
    hmmm... okay so if I use the
    ApplyT
    and return an error, things still seem to continue on... If i try and use the
    pulumi.Output
    object returned by calling
    ApplyT
    I don't see how to convert that back to an Input object?
    b
    • 2
    • 2
  • r

    rapid-raincoat-36492

    10/04/2021, 5:21 PM
    Has anyone looked into maintaining a terraform provider for Pulumi, especially now that the REST API is available? I'm moving a large terraform codebase over, and being able to access
    terraform.state.RemoteStateReference
    is lovely, but it only lets me migrate over modules that no other terraform modules depend on (without using SSM as a intermediary step). If I could access Pulumi Stack outputs from Terraform, I would be able to migrate over any terraform module, making it a lot easier to switch over
    b
    g
    • 3
    • 4
  • s

    sparse-gold-10561

    10/04/2021, 5:59 PM
    Is there any way to pass credentials to use a private repo in a FROM statement line in a Dockerfile, during the DockerBuild phase of pulumi_docker.
    b
    • 2
    • 2
  • p

    purple-train-14007

    10/04/2021, 8:20 PM
    Can pulumi pull in shell environment variables? Like lets say we dont want to store it in the config file but rather store some shell vars in a jenkins secret. Is there a way to access that in pulumi?
    b
    g
    • 3
    • 5
  • l

    little-market-63455

    10/05/2021, 8:39 AM
    Hello, does the GitHub Action's
    edit-pr-comment
    has cases where it cannot detect earlier comments? I have a RP with a lot of pushes/force-pushes and it keeps adding new comments. I am sure I have seen it work before
  • f

    fast-oyster-42706

    10/05/2021, 1:51 PM
    Looking for a good example of testing pulumi automation api in golang. Code works and I have done testing when using the CLI but with automation API I am missing something.
  • c

    cuddly-lion-92829

    10/05/2021, 3:18 PM
    Hi all - Open office hours today at noon pacific - come with your questions and stories https://pulumi.zoom.us/meeting/register/tZMvf-yprT8qGND7Huc4j2YW1ESX5GoMZZMX
  • f

    fresh-wire-95028

    10/05/2021, 5:43 PM
    Hi there! What's the best way to get an ECS service name? It seems that a unique hash is assigned when I specify a name. For example, if my service name is "blah" it will actually be called "blah-3hd8d".
    const fgService = new awsx.ecs.FargateService('blah', {
    ...
    });
    
    const autoScaleTarget = new aws.appautoscaling.Target(`appautoscaling-target-api-${stack}`, {
      resourceId: `service/${apiClusterName}/${apiServiceName}`, <----- ???
    });
    b
    b
    • 3
    • 26
  • a

    alert-glass-49407

    10/05/2021, 6:05 PM
    Silly question, if I want to get resource nesting in
    pulumi preview
    output, do I need to create a component resource, or similar? Or is there something I can put into
    opts
    that would give me control over the display? edit: it turns out this is `parent`: <https://www.pulumi.com/docs/intro/concepts/resources/#parent>
    b
    • 2
    • 5
  • o

    orange-byte-86458

    10/05/2021, 9:56 PM
    Hi, Pulumi team! I’m wondering if there are any tutorials/articles on splitting a large project into multiple subprojects. Right now I have thousands of resources all originating from the same index.ts. Most of them are created implicitly, as children of things like EKS clusters, cofig groups, etc. For various reasons I’d like to split it into 4-5 subprojects and I’m wondering what would be the most efficient way of doing this without disrupting existing infrastructure. I guess, my main challenge is around properly renaming all URNs and ensuring that a new state won’t trigger any unexpected updates. Thanks for any help!
    l
    • 2
    • 7
  • p

    purple-train-14007

    10/05/2021, 11:30 PM
    Hey Pulumi Team, I found an issue with Azures API I'm working with MSFT to solve. This is for AADDS under azure native. So what's happening is not a Pulumi issue but when you build AADDS, their API doesn't complete an important part of its workflow which is creating the NSG with special service tags on it; this is breaking workflows that build AADDS.
    g
    • 2
    • 2
  • p

    purple-train-14007

    10/05/2021, 11:31 PM
    The NSG, NICs and NSG are all auto generated by this api
  • f

    fresh-actor-58531

    10/06/2021, 7:26 AM
    Hi Team, kindly help ... we are facing issue with pulumi stack - getting below error :
    [2021-10-06T06:47:38.665Z] error: the current deployment has 1 resource(s) with pending operations:
    [2021-10-06T06:47:38.665Z]   * urn:pulumi:stack-test::project-test::aws:elasticsearch/domain:Domain::stack-test, interrupted while deleting
    While updating the inbound rule for existing pulumi stack [12:50 PM] Kindly help, we are mentaining the stack from remote cloud
    w
    • 2
    • 1
  • g

    gifted-student-18589

    10/06/2021, 8:35 AM
    quick question - in my pulumi code, is it possible to fetch some kind of a current-stack’s unique ID? I just need to ensure uniqueness when defining my cognito user pool domain, and I think that might help me in achieving that 🙂
    p
    g
    • 3
    • 6
  • r

    rough-rain-68282

    10/06/2021, 11:33 AM
    Hello, I accidentally manually deleted a resource created by pulumi infrastructure, I am sure that the resource I delete doesnt have dependency on any other resource. Can I use "pulumi delete state 'urn of the resource I deleted' " to get rid of it from the state ?
    p
    m
    • 3
    • 9
Powered by Linen
Title
r

rough-rain-68282

10/06/2021, 11:33 AM
Hello, I accidentally manually deleted a resource created by pulumi infrastructure, I am sure that the resource I delete doesnt have dependency on any other resource. Can I use "pulumi delete state 'urn of the resource I deleted' " to get rid of it from the state ?
p

prehistoric-activity-61023

10/06/2021, 11:45 AM
I’d try to run
pulumi refresh
to refresh the pulumi state based on the current state in the cloud. You can backup the state just in case using
pulumi stack export
.
r

rough-rain-68282

10/06/2021, 11:50 AM
I get this error for any commands I will try
.pulumi/stacks/Staging.json: snapshot integrity failure; refusing to use it
the cloud state currently doesnt match the state in the Staging.json as the resource in cloud was deleted manually
m

millions-furniture-75402

10/06/2021, 1:02 PM
you can
pulumi stack export
then modify the stack.json to reflect reality, and then
cat stack.json | pulumi stack import
r

rough-rain-68282

10/06/2021, 1:31 PM
Thanks let me try the same
@millions-furniture-75402 I have got the json file with the correct state, the latest file being referred for state is in s3 bucket. Would replacing the state json in the s3 bucket with the one I want work?
m

millions-furniture-75402

10/06/2021, 1:50 PM
Why wouldn't you use
pulumi stack import
?
r

rough-rain-68282

10/06/2021, 2:31 PM
well replacing old state json file with the correct state file worked for me, I just replaced it in s3 bucket with same name
👍 1
Thanks @millions-furniture-75402
View count: 1