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

    proud-spoon-58287

    08/06/2020, 2:13 PM
    k8s.helm.v3.Chart
    b
    r
    • 3
    • 34
  • n

    nutritious-battery-42762

    08/06/2020, 2:25 PM
    how can i share config values between stacks?
    l
    h
    • 3
    • 2
  • g

    gifted-student-18589

    08/06/2020, 4:12 PM
    A quick question regarding Pulumi projects 🙂 I have two
    Pulumi.yaml
    files, meaning two Pulumi projects, one in the
    api
    folder (in the sshot letter
    A
    ) and the other in the
    apps/admin
    folder (in the sshot letter
    B
    ). What is surprising to me is that when I go to
    A
    and run
    pulumi up
    , it deploys stuff fine, but when I go to
    B
    , then it’s actually still working with
    A
    but it’s using the
    index.ts
    from
    B
    . Is this normal? So for example, in
    A
    I have a simple IAM role, and running
    pulumi up
    in there deploys it. But then, cd-ing to
    B
    , where
    index.ts
    contains as simple S3 bucket, and running again
    pulumi up
    says that it will remove the IAM role, and deploy the bucket. Maybe I’m not using projects as they are meant to be used, and I should just handle this situation with different stack names, and a single Pulumi project?
    b
    l
    • 3
    • 15
  • n

    nutritious-battery-42762

    08/06/2020, 5:01 PM
    i want to run a fargate task just once to database migration how would i do that?
    l
    c
    m
    • 4
    • 7
  • c

    careful-engine-71229

    08/06/2020, 6:55 PM
    Hey guys I'm getting a really weird issue.
  • c

    careful-engine-71229

    08/06/2020, 6:55 PM
    Untitled
  • c

    careful-engine-71229

    08/06/2020, 6:55 PM
    Getting while from this.
  • c

    careful-engine-71229

    08/06/2020, 6:55 PM
    Untitled
  • c

    careful-engine-71229

    08/06/2020, 6:55 PM
    What gives?
  • c

    careful-engine-71229

    08/06/2020, 6:56 PM
    that's in almost vanilla typescript file.
    l
    • 2
    • 1
  • f

    full-dress-10026

    08/06/2020, 8:17 PM
    Do StackReferences preserve type? e.g., If my export is an array of strings, will the stack reference be an array of strings?
    l
    • 2
    • 6
  • f

    fast-dinner-32080

    08/06/2020, 8:31 PM
    Hey guys, I am trying to port a C# stack to Python with pretty much 1:1 code so nothing should change. However I am using components and when resources are built out in the component in Python the urn is completely different. The C# urn doesn't include the component type but the python urn does include the component type. Is this something I configured wrong or is this expected when moving to a different language for the same stack?
    l
    • 2
    • 2
  • m

    miniature-megabyte-76794

    08/06/2020, 10:43 PM
    Does Pulumi have something equivalent to
    eb setenv KEY=VALUE
    for AWS Elastic Beanstalk? I am trying to create an
    aws.elasticbeanstalk.Environment
    , and want to make an environment variable with
    CNAME
    as a value. I've tried to pass
    CNAME
    in as a setting, but because I can only access it when the resource itself is fully created, I've seem to run into a sort of "The Chicken or the Egg" problem in which I need the output of a resource in order to make the inputs for it.
  • e

    elegant-window-55250

    08/07/2020, 7:32 AM
    Hello! I have a repository (“infra-services”) that describes all services in Kubernetes, the CI/CD builds and deploys these with Pulumi (at every change to
    master
    ,
    develop
    branch). The services are kept in smaller repositories, the CI/CD builds and deploys Docker images. I’d like to deploy versions based on branch, and for develop branch I’d like to deploy latest version. I’ve considered adding another GitOps tool, such as Flux or otherwise, but I don’t really want to introduce that into the stack, I’d like to keep using Pulumi, Pulumi should know the state at all times. I don’t really want to add Pulumi to the services repositories (to keep things separated). Any ideas?
    • 1
    • 1
  • b

    bland-ice-32467

    08/07/2020, 9:01 AM
    https://pulumi-community.slack.com/archives/CRVK66N5U/p1596744333208700
  • d

    delightful-controller-41497

    08/07/2020, 9:57 AM
    is there a way to apply a security group to an RDS instance after it has been created?
    b
    b
    • 3
    • 4
  • b

    bored-terabyte-19735

    08/07/2020, 10:43 AM
    Hey I have a problem with my RDS setup as well, I want to also create default users in mysql for that I am using the pulumi mysql provider. Now that is all fine and works like a charm... on my local machine where I can free up port 3306 but on my CI/CD port 3306 is already taken for a test database and I am trying to redirect (via a bastion host as well) the port to 6000 but when i try to use "localhost:6000" on the mysql providers endpoint argument it just ignores it and defaults back to 3306. I also tried doing it via env vars MYSQL_TCP_PORT and MYSQL_ENDPOINT but still the same result. The Readme from pulumi-mysql also says: -
    mysql:endpoint
    (required) - The address of the MySQL server to use. Most often a "hostname:port" pair, but may also be an absolute path to a Unix socket when the host OS is Unix-compatible. Can be set via
    MYSQL_ENDPOINT
    environment variable.
    m
    • 2
    • 6
  • d

    delightful-controller-41497

    08/07/2020, 11:17 AM
    btw, how can I upload a local directory to be used as a docker volume by one of my containers?
    • 1
    • 3
  • w

    wet-egg-6347

    08/07/2020, 1:55 PM
    How should I go about: • Creating a Postgres instance via pulumi/aws • Creating a Postgres database via pulumi/postgres ? The problem I'm running into is that the pulumi/postgres provider takes connection info as Pulumi config. However, postgres connection info is not available until I run
    pulumi up
    . Is there some way to set Pulumi config values at runtime?
    b
    l
    • 3
    • 7
  • b

    bland-lamp-16797

    08/07/2020, 7:56 PM
    ok, silly question but I'm giving up... if I have a Pulumi setting file like this:
    config:
      gcp:project: THIS
      gcp:region: europe-west3
    How do i get value of gcp:project? I tried
    config = pulumi.Config()
    INFRA_PROJECT_ID = config.get_object('gcp')
    but it didn't work 😞
  • b

    bland-lamp-16797

    08/07/2020, 7:56 PM
    like... I can create a new value and get it but that would not be fun
    f
    b
    • 3
    • 6
  • b

    best-summer-38252

    08/08/2020, 4:18 AM
    Hi, Im looking for doc gen options of iac. We have the code, dot graph output... What do y'all do?
  • n

    narrow-jackal-57645

    08/08/2020, 8:46 AM
    Q: I could not find any way to create new Custom IAM Role on GCP because the API does not support this resource. I would like to ask where I could find more information on the GCP feature roadmap and any workaround? Atm I revert to Terraform
    b
    b
    • 3
    • 7
  • o

    orange-electrician-25669

    08/08/2020, 8:25 PM
    HI who can help to create "LoadBalancer" i have issue in params
  • o

    orange-electrician-25669

    08/08/2020, 8:25 PM
    Cannot convert expression of type '[]string' to type 'String'
  • o

    orange-electrician-25669

    08/08/2020, 8:26 PM
    Golang
  • o

    orange-electrician-25669

    08/08/2020, 8:28 PM
    type (
    	S1LBConfig struct {
    		LoadBalancer struct {
    			Rules []struct {
    				Lb struct {
    					SecurityGroups           []string
    					Subnets                  []string
    				} 
    			} 
    		} 
    	}
    )
    
    SecurityGroups:           pulumi.StringArray{pulumi.String(s1LoadBalancerConfig.LoadBalancer.Rules[k].Lb.SecurityGroups)},
    
    Cannot convert expression of type '[]string' to type 'String'
  • o

    orange-electrician-25669

    08/08/2020, 8:32 PM
    i dont understand why ? as i create the "SecurityGroups" as array of string anf pulumi ask for array of string ...i lost
  • i

    important-appointment-55126

    08/09/2020, 1:41 AM
    i don’t think there’s any helpers to convert []string to []StringInput automatically; you’ll probably have to loop over your []string slice and build up one yourself
  • m

    millions-microphone-64941

    08/09/2020, 3:05 AM
    I'm having trouble (on Node and JS) getting the Pulumi ID for the results of: •
    const alb = new <http://awsx.lb|awsx.lb>.ApplicationLoadBalancer
    •
    const albTarget = alb.createTargetGroup
    , or •
    const albListener = albTarget.createListener
    . I'm trying to export the the arn and id from one stack and then use
    StackReference
    to get the arn/id and rebuild the resources so I can use them. But I'm having trouble getting the pulumi name/id of these resources. Please help, thanks!
    f
    m
    • 3
    • 8
Powered by Linen
Title
m

millions-microphone-64941

08/09/2020, 3:05 AM
I'm having trouble (on Node and JS) getting the Pulumi ID for the results of: •
const alb = new <http://awsx.lb|awsx.lb>.ApplicationLoadBalancer
•
const albTarget = alb.createTargetGroup
, or •
const albListener = albTarget.createListener
. I'm trying to export the the arn and id from one stack and then use
StackReference
to get the arn/id and rebuild the resources so I can use them. But I'm having trouble getting the pulumi name/id of these resources. Please help, thanks!
• https://github.com/khatm-org/khatm-infrastructure/blob/split-app/foundation/index.js is where I'm trying to export. • https://github.com/khatm-org/khatm-infrastructure/blob/split-app/application/index.js is where I'm trying to import and use the resources
f

famous-garage-15683

08/09/2020, 3:43 AM
I was trying to do the same thing and sent a PR for it: https://github.com/pulumi/pulumi-awsx/pull/560
👍 1
m

millions-microphone-64941

08/09/2020, 4:54 AM
@famous-garage-15683 thank you. I think this is exactly what I'll need when it's released. I'm having a hard time figuring out how to use it though. You're right that I'm doing exactly what you're doing (would be interested in your new architecture that doesn't need this anymore).
Would you have an example of how to re-create a resource, like the
<http://aws.lb|aws.lb>.Listener
with an ARN?
oh I think I get it. The projects will reference the same aws resource, but will have different pulumi ids per project
f

famous-garage-15683

08/09/2020, 10:42 PM
yeah. I'm pretty new to Pulumi. that was the most I figured out how to do
👍 1
m

millions-microphone-64941

08/09/2020, 11:18 PM
I think it's a good solution. What is the different architecture you're using to bypass what we're trying to do?
m

millions-furniture-75402

10/02/2020, 2:17 PM
That was a lot of work to create a new listener rule on an ALB / Listener created in another stack (shared-infrastructure). Am I doing something extremely wrong, or is it just this long-winded and not very clear?
const alb = new awsx.lb.ApplicationLoadBalancer(`${appName}-lb`, {
  loadBalancer: aws.lb.LoadBalancer.get(`${appName}-lb`, defaultAlbId, {
    vpcId: vpc.vpc.id
  }),
  external: true,
  securityGroups: [defaultAlbSecurityGroupId],
  subnets: vpc.vpc.publicSubnetIds,
  vpc: vpc.vpc,
});

const appTargetGroup = new awsx.lb.ApplicationTargetGroup(`${appName}-tg`, {
  deregistrationDelay: 0,
  healthCheck: {
    path: '/api/health',
    port: '443',
    protocol: 'HTTP',
    matcher: '200',
  },
  loadBalancer: alb,
  port: 443,
  protocol: 'HTTP',
  vpc: vpc.vpc,
});

const https = new awsx.lb.ApplicationListener(`${appName}-https`, {
  listener: aws.lb.Listener.get(`${appName}-https`, defaultListenerHttpsId),
  loadBalancer: alb,
  targetGroup: appTargetGroup,
  vpc: vpc.vpc,
})

const appListenerRule = new awsx.lb.ListenerRule(`${appName}-lr`, https, {
  actions: [
    {
      targetGroupArn: appTargetGroup.targetGroup.arn.apply(v => v),
      type: 'forward',
    },
  ],
  conditions: [
    {
      hostHeader: {
        values: [`${appName}.*`],
      },
    },
  ],
  priority: 10,
});
View count: 1