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
getting-started
  • f

    full-sugar-56177

    10/22/2021, 6:33 PM
    Hello! I am trying to setup a project to multiple environments in AWS. As I saw from previous discussions in the channel a good way to separate my projects for my specific case is to create one project for my AWS ECS Cluster and one for my Services that I am going to deploy into the Cluster. For my stacks though, I still struggle to understand how I am going to separate and configure properly the environments and their specific variables in the .yaml configuration files, since different environments have to be deployed in different AWS Accounts. Any help would be appreciated
    b
    b
    • 3
    • 7
  • b

    big-pizza-47421

    10/23/2021, 3:12 PM
    Hello everyone, gotta say I love Pulumi. just awesome! and now for the real reason I've found myself in Pulumi's Slack.
    pulumi:pulumi:Stack       ecs-dev
     -   └─ aws:ec2:SecurityGroup  web-traffic  deleting.    completing deletion from previous update
    This have been running forever now, and I see no reason for that since removing a SG should took 2 seconds. Anyway to DEBUG or force it somehow?
    s
    b
    • 3
    • 21
  • b

    big-pizza-47421

    10/23/2021, 5:26 PM
    so I have the following setup: NETWORK project, which creates a simple awsx.vpc
    // Allocate a new VPC that uses all of the current region's availability zones:
    const vpc = new awsx.ec2.Vpc(`lsports-${getStack()}`, {
      numberOfAvailabilityZones: "all",
      subnets: [
        { type: "public" },
        { type: "private" },
        { type: "isolated", name: "db" },
        { type: "isolated", name: "redis" },
      ],
      tags: baseTags,
    });
    and the following ECS project
    const vpc = awsx.ec2.Vpc.fromExistingIds(`lsports-${getStack()}`, {
      vpcId: network.getOutput("vpcId"),
    });
    
    // Create a load balancer on port 80 and spin up two instances of Nginx.
    const alb = new awsx.elasticloadbalancingv2.ApplicationLoadBalancer(
      "web-traffic",
      {
        vpc: vpc,
        subnets: network.getOutput("publicSubnetIds"),
        tags: baseTags,
      }
    );
    
    const listener = alb.createListener("web-listener", { port: 80 });
    
    const nginx = new awsx.ecs.FargateService("nginx", {
      tags: baseTags,
      taskDefinitionArgs: {
        containers: {
          nginx: {
            image: "nginx",
            memory: 128,
            portMappings: [listener],
          },
        },
      },
      desiredCount: 2,
    });
    I'm getting the following error:
    * error creating application Load Balancer: ValidationError: At least two subnets in two different Availability Zones must be specified
            status code: 400, request id: 99ff6eef-e935-43e3-b34a-cf36251db0e7
    which is weird, since I have public subnets across all AZ's, if I create the VPC in the same project everything seem to work as expected
  • b

    big-pizza-47421

    10/23/2021, 5:27 PM
    similar to this issue https://github.com/pulumi/pulumi-awsx/issues/670
  • s

    some-magician-44503

    10/25/2021, 10:03 AM
    i created an osdisk with (python) disk=azure-native.compute.Disk(..), (because it was the only way i found to specify hyper_v_generation=“V2”), how do i feed that disk object into the storage_profile part of vm=azure-native.compute.VirtualMachine(…) Thanks!!
  • b

    brave-nightfall-19158

    10/25/2021, 5:13 PM
    hey y'all. Quick question on git / file structure vs stacks. If I have 2 different stacks to manage 2 different DNS domains, for example, do I need 2 separate folders with a Pulumi.yml & index file? Or can the 2 stacks be configured with e.g. Pulumi.domainA.yml & Pulumi.domainB.yml. If the latter, how does Pulumi know where the code is for the different stacks? Following the Pulumi guide, I'm assuming that 2 stacks for different environments are actually only configurable based on the config in the yml file, but the resources must be the same in both environments?
    b
    • 2
    • 4
  • b

    brave-nightfall-19158

    10/25/2021, 5:13 PM
    Hope that makes sense talking about a mono Git repo😅
  • f

    flaky-waitress-53285

    10/25/2021, 9:58 PM
    Hi, I would like to create an architecture with a container and an Application Load Balancer using path-based routing in AWS (as detailed in https://aws.amazon.com/blogs/containers/using-aws-application-load-balancer-path-based-routing-to-combine-amazon-ecs-launch-types/). Is this possible with pulumi, using the awsx.ecs.FargateService component? I tried to do so, but couldn't figure out how to add target groups to the Container service. Any help is appreciated.
  • p

    polite-kite-18322

    10/26/2021, 12:44 AM
    New to Pulumi. Any assistance appreciated. Trying to automate deployment of a kubernetes Deployment to aws-eks cluster that already exists. When I run
    pulumi up
    with this:
    // Connect to an EKS cluster
    const clusterState: aws.eks.ClusterState = {
    	arn:  "arn:aws:eks:us-west-2:xxxxxxxxxx:cluster/prod-eks-cluster",
    	roleArn: "arn:aws:iam::xxxxxxxxxx:role/prod-eks-role"
    };
    const cluster = aws.eks.Cluster.get("prod-eks-cluster", "arn:aws:eks:us-west-2:xxxxxxxxxx:cluster/prod-eks-cluster", clusterState);
    I get this error:
    aws:eks:Cluster (prod-eks-cluster):
        error: Preview failed: refreshing urn:pulumi:credit-queue-consumer::credit-queue-consumer::aws:eks/cluster:Cluster::prod-eks-cluster: 1 error occurred:
            * error reading EKS Cluster (arn:aws:eks:us-west-2:xxxxxxxxxx:cluster/prod-eks-cluster): InvalidParameterException: The name parameter contains invalid characters. It should begin with letter or digit and can have any of the following characters: the set of Unicode letters, digits, hyphens and underscores.
        {
          RespMetadata: {
            StatusCode: 400,
            RequestID: "ff224265-9991-4840-9a91-91bd4a010dc1"
          },
          ClusterName: "arn:aws:eks:us-west-2:xxxxxxxxxx:cluster/prod-eks-cluster",
          Message_: "The name parameter contains invalid characters. It should begin with letter or digit and can have any of the following characters: the set of Unicode letters, digits, hyphens and underscores."
        }
    The documentation for
    aws.eks.Cluster.get
    suggests that
    id
    is the unique provider id of the resource to lookup, but this error response looks like it's being interpreted as the
    ClusterName
    . What format should the
    id
    take?
    b
    f
    • 3
    • 11
  • b

    busy-insurance-52853

    10/26/2021, 2:07 PM
    hey all, I am having really tough time figuring out how to fetch exported variable in golang so I
    ctx.Export("vpcID", vpc.ID())
    and I want to get that output later on in the script, how do I do that?
    b
    • 2
    • 14
  • b

    bored-barista-23480

    10/27/2021, 3:04 PM
    Hey all, I'm working with Pulumi for a while now, but as I'm confronted with user documentation for an AWS setup I created I ran into an acutally pretty basic problem: What is the best way to make my setup available to a user? My first idea was to make the user clone my repo, then he/she could create a project based on my files and run it themself on their account. But there does not seem to be such an "import based on local project files" feature. I saw that
    pulumi new
    also works with any repo containing a template - that would solve the problem and make it even easier for the user. But I get
    error: authentication required
    trying to do so. But I can't find any hints how to authenticate using the command. Any suggestions?
    w
    • 2
    • 7
  • b

    brave-nightfall-19158

    10/27/2021, 3:26 PM
    hey all, just wondering, if I manually change a resource urn (and all references) in the stack export file and re import it, will everything be ok? Or would it mess things up in the pulumi backend?
  • b

    brave-nightfall-19158

    10/27/2021, 3:31 PM
    The reason is because I have route 53 records for which I have changed the pulumi name. As such, it creates the new resource but then deletes the old record, but because it does the create first and then the delete, the actual record is actually removed but pulumi thinks it still exists (because the actual record name (e.g. www.domain.com is specific and defined)
    f
    • 2
    • 2
  • l

    little-pilot-47306

    10/28/2021, 1:14 PM
    Hi! I'm new to pulumi, evaluating it for our org, where we are using terraform currently. Have some questions how to reproduce features we actively use in terraform. The most interesting thing at the moment is: we use
    terraform plan -out=planfile.json
    to ensure that the reviewed and pproved plan executed by a downstream ci ci step is the exact one reviewed (executed by
    terraform apply -input=planfile.json
  • l

    little-pilot-47306

    10/28/2021, 1:15 PM
    I could not spot equivalent feature in pulumi cli. did I overlook it?
    b
    b
    +2
    • 5
    • 10
  • m

    many-yak-61188

    11/02/2021, 3:38 PM
    hello all 👋 - qq I see terraform has added new resource types in version
    3.36.0
    but I don't see the equivalent in pulumi https://github.com/hashicorp/terraform-provider-aws/blob/v3.36.0/CHANGELOG.md specifically looking for the resource
    aws_mwaa_environment
    . Can someone point me to the right place to find this?
    b
    • 2
    • 3
  • f

    full-sugar-56177

    11/03/2021, 11:19 AM
    Hello, What is the best way to configure and run the stacks in different AWS accounts for each environment while having pulumi state stored at S3 only in the main AWS account?
    s
    b
    • 3
    • 2
  • s

    straight-intern-54129

    11/03/2021, 10:09 PM
    I have an Azure resource that was manually deleted and now I get an error when running
    pulumi up
    with no suggestions on how to fix it. It looks like I should use
    pulumi state delete
    , but I'm not sure how to find the urn of the resource, or if that's even the right command. It would be nice if I could delete it by its
    name
    .
  • s

    straight-intern-54129

    11/03/2021, 10:15 PM
    Found it!
    pulumi stack --show-urns
  • q

    quick-lifeguard-72252

    11/03/2021, 11:24 PM
    I've used CDK before to set up self-mutating pipelines on AWS (example https://docs.aws.amazon.com/cdk/latest/guide/cdk_pipeline.html). Is it possible to do the same thing with Pulumi?
    b
    g
    • 3
    • 7
  • s

    square-coat-62279

    11/04/2021, 12:47 AM
    I am new to Pulumi and the programming languages, which language should I pick up to get things started?
    b
    • 2
    • 2
  • a

    abundant-book-94104

    11/04/2021, 2:21 AM
    I'm new to Pulumi, I'm looking at how to manage creating a group of different Azure key vaults for developers to have own keys so when a developer leaves we can revoke their keys to remove access that they might have had. Would you create a list of key vault names so that I could deploy that list to dev, but not have all/any in prod?
  • c

    calm-motherboard-38234

    11/05/2021, 6:41 PM
    Heya, I'm going through the initial exercise and I am getting a stack overflow with an extensive stack trace after modifying my initial application as described here: https://www.pulumi.com/docs/get-started/aws/modify-program/ I won't paste the error as it's wildly long, but here's my application:
    package main
    
    import (
    	"<http://github.com/pulumi/pulumi-aws/sdk/v4/go/aws/s3|github.com/pulumi/pulumi-aws/sdk/v4/go/aws/s3>"
    	"<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi>"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create an AWS resource (S3 Bucket)
    		bucket, err := s3.NewBucket(ctx, "playground", nil)
    		if err != nil {
    			return err
    		}
    
    		_, err = s3.NewBucketObject(ctx, "index.html", &s3.BucketObjectArgs{
    			Bucket: bucket.ID(),
    			Source: pulumi.NewFileAsset("index.html"),
    		})
    		if err != nil {
    			return err
    		}
    
    		// Export the name of the bucket
    		ctx.Export("bucketName", bucket.ID())
    		return nil
    	})
    }
    Is there something I might be missing? The application runs fine until I introduce the NewBucketObject func call. Thanks in advance!
    • 1
    • 2
  • b

    brainy-church-78120

    11/05/2021, 7:41 PM
    we would especially love feedback from folks that are just getting started!!
  • b

    bland-cartoon-22627

    11/08/2021, 12:54 AM
    I'm trying to setup an automated deployment with Pulumi to multiple AWS accounts using AWS SSO for credentials. I seem to have SSO generally working but it seems to issue credentials under the same account profile regardless of the desired target deployment account. I'm also wondering if there is a way to identify the target AWS account in the deployment preview ?
    c
    • 2
    • 1
  • a

    abundant-book-94104

    11/08/2021, 3:43 AM
    One of the processes within Azure creates the NetworkWatcherRG resource group. Is it right to add it to the imported resources when setting up pulumi against existing infrastructure?
  • w

    witty-honey-13693

    11/09/2021, 3:02 AM
    Hi Team Is there any example programs in internet to utilize config system(pulumi.yaml) within pulumi ?
    a
    s
    • 3
    • 4
  • f

    full-sugar-56177

    11/09/2021, 9:25 AM
    I have created ProjectA with 2 stacks
    dev
    and
    prod
    . Using S3 as a state backend, there is a directory called
    stacks
    with the corresponding
    dev
    and
    prod
    json files. What if I create ProjectB with the same stack names though? How can Pulumi separate these stacks from the stacks of ProjectA? I guess I have to use more explicit names for my stacks?
    e
    • 2
    • 4
  • h

    hundreds-lion-28881

    11/09/2021, 10:49 AM
    Hi all, trying out Pulumi for the first time. I'm getting a reproducible issue that I can't figure how to fix. I followed the GCP tutorial and created a bucket. Now, what I want to test is the
    pulumi refresh
    command. I manually deleted the bucket from GCP and tried to run
    pulumi refresh
    to see if it would notice the change. However, it hangs forever, and if I run it with
    pulumi refresh --logtostderr -v=9
    I see that it seems to infinitely encounter this
    I1109 12:44:31.269962   54836 eventsink.go:62] eventSink::Debug(<{%reset%}>Dismissed an error as retryable. Retry 404s for bu
    cket creation - googleapi: Error 404: The specified bucket does not exist., notFound<{%reset%}>)
    I know you can manually alter the state to tell it a resource has been deleted but that's not a long term solution for us.
    b
    • 2
    • 4
  • c

    clean-beard-72040

    11/10/2021, 12:25 AM
    Hello, I'm also new to Pulumi. Is it possible to use multi-language components without using the hosted service? At the moment, we're considering using Pulumi and managing state in S3, etc. etc. Some of our teams use Go, some TypeScript, others Python. I'm wondering if it's possible to publish reusable components to a public registry? If not, is it possible to host an internal registry that will allow us to share components across different languages?
    l
    • 2
    • 2
Powered by Linen
Title
c

clean-beard-72040

11/10/2021, 12:25 AM
Hello, I'm also new to Pulumi. Is it possible to use multi-language components without using the hosted service? At the moment, we're considering using Pulumi and managing state in S3, etc. etc. Some of our teams use Go, some TypeScript, others Python. I'm wondering if it's possible to publish reusable components to a public registry? If not, is it possible to host an internal registry that will allow us to share components across different languages?
l

limited-rainbow-51650

11/10/2021, 12:02 PM
I don't know the answer to your question, but asking again in the #registry channel might help probably.
c

clean-beard-72040

11/10/2021, 8:03 PM
Great! Thank you
View count: 3