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

    many-psychiatrist-74327

    04/01/2022, 1:32 PM
    I’m having problems upgrading from pulumi 2 to 3 (and upgrading the plugin dependencies). After upgrading the CLI and changing the versions in
    package.json
    and removing
    node_modules
    and calling
    yarn install
    again, when I run
    pulumi preview
    , I get:
    aws:iam:Role (eks-cluster-node-group-role):
        error: could not validate provider configuration: 1 error occurred:
        	* Invalid or unknown key
    followed by a bunch of stack traces that look like this:
    Error:
            at Object.debuggablePromise (/scratch/node_modules/@pulumi/pulumi/runtime/debuggable.js:69:75)
            at /scratch/node_modules/@pulumi/pulumi/runtime/invoke.js:126:45
            at Generator.next (<anonymous>)
            at fulfilled (/scratch/node_modules/@pulumi/pulumi/runtime/invoke.js:18:58)
            at processTicksAndRejections (node:internal/process/task_queues:96:5)
        unhandled rejection: CONTEXT(6017): Invoking function: tok=kubernetes:yaml:decode asynchronously
        STACK_TRACE:
        Error:
            at Object.debuggablePromise (/scratch/node_modules/@pulumi/pulumi/runtime/debuggable.js:69:75)
            at /scratch/node_modules/@pulumi/pulumi/runtime/invoke.js:126:45
            at Generator.next (<anonymous>)
            at fulfilled (/scratch/node_modules/@pulumi/pulumi/runtime/invoke.js:18:58)
            at processTicksAndRejections (node:internal/process/task_queues:96:5)
    unfortunately this error isn’t very useful Any hints?
    g
    • 2
    • 3
  • q

    quick-painter-61380

    04/01/2022, 2:35 PM
    Hi All, I'm interested in giving pulumi a try. To get started I'm trying to get tf2pulumi going but it seems to ignore my *.auto.tfvars files. Am I missing an option to get that working or is there a simple way to get my variables imported?
    c
    • 2
    • 1
  • g

    gray-intern-82383

    04/01/2022, 2:38 PM
    Hello, I have been facing some odd is issues with Pulumi and GCP Uptime Check we added recently uptime checks to our pulumi stack, we create the uptime check like this
    ucc, err := monitoring.NewUptimeCheckConfig(ctx, name, &monitoring.UptimeCheckConfigArgs{
    		DisplayName: pulumi.String("uptime check example"),
    		HttpCheck: &monitoring.UptimeCheckConfigHttpCheckArgs{
    			Path:          pulumi.String(fmt.Sprintf("/%s/status", "github")),
    			Port:          <http://pulumi.Int|pulumi.Int>(443),
    			RequestMethod: pulumi.String("GET"),
    			UseSsl:        pulumi.Bool(true),
    			ValidateSsl:   pulumi.Bool(true),
    		},
    		MonitoredResource: &monitoring.UptimeCheckConfigMonitoredResourceArgs{
    			Labels: pulumi.StringMap{
    				"host": pulumi.String(targetUrl),
    			},
    			Type: pulumi.String("uptime_url"),
    		},
    		Period:  pulumi.String("60s"),
    		Timeout: pulumi.String("10s"),
    	})
    This was working fine, but then we decided to add an alert policy for this uptime check Note: here we forward the uptime check created previously
    args := monitoring.AlertPolicyArgs{
    		DisplayName: pulumi.String(name),
    		Combiner:    pulumi.String("AND"),
    		Conditions: monitoring.AlertPolicyConditionArray{
    			monitoring.AlertPolicyConditionArgs{
    				DisplayName: pulumi.String("Health check alerts for github %s", service.ShortName),
    				ConditionThreshold: monitoring.AlertPolicyConditionConditionThresholdArgs{
    					Filter:   pulumi.Sprintf("metric.type=\"<http://monitoring.googleapis.com/uptime_check/check_passed\|monitoring.googleapis.com/uptime_check/check_passed\>" AND metric.label.check_id=\"%s\" AND resource.type=\"uptime_url\"", uptimeCheck.UptimeCheckId),
    					Duration: pulumi.String("60s"),
    					Trigger: monitoring.AlertPolicyConditionConditionThresholdTriggerArgs{
    						Count: pulumi.IntPtr(1),
    					},
    					ThresholdValue: pulumi.Float64Ptr(1),
    					Comparison:     pulumi.String("COMPARISON_LT"),
    					Aggregations: monitoring.AlertPolicyConditionConditionThresholdAggregationArray{
    						monitoring.AlertPolicyConditionConditionThresholdAggregationArgs{
    							AlignmentPeriod:  pulumi.String("60s"),
    							PerSeriesAligner: pulumi.String("ALIGN_COUNT_TRUE"),
    						},
    					},
    				},
    			},
    		}
    		NotificationChannels: "alerts",
    This worked fine in the first deployment, but the subsequent ones started to fail.
    error: deleting urn:pulumi:env::company::gcp:monitoring/uptimeCheckConfig:UptimeCheckConfig::uptime-check-github: 1 error occurred:
    Error when reading or editing UptimeCheckConfig: googleapi: Error 400: Request contains an invalid argument.
    What a noticed is the new uptime checks got created in our account, but GCP entered in some weird state where it could not delete the previous uptime check, the only way I managed to fix the stack was by deleting the old uptime checks manually, I also noticed that the old uptime checks still had alert policies attached to them Is there any idea of what could be happening? I personally can’t find what I have missed and there’s not much documenation around pulumi and uptime checks.
    • 1
    • 1
  • w

    wonderful-motherboard-66151

    04/01/2022, 4:52 PM
    I was wondering if somebody could help me out with creating some Azure WebApps using Pulumi… I want them to run dotnet, and tried that with the following code:
    const webapp = new web.WebApp(
    		projectKey,
    		{
    			reserved: true,
    			resourceGroupName: resourceGroup.name,
    			serverFarmId: appServicePlan.id,
    			siteConfig: {
    				linuxFxVersion: "DOTNET|6.0",
    				netFrameworkVersion: "v6.0",
    			},
    		}
    	);
    
    	new web.WebAppMetadata("meta", {
    		resourceGroupName: resourceGroup.name,
    		name: webapp.name,
    		properties: {
    			CURRENT_STACK: "dotnetcore",
    		},
    	});
    The
    linuxFxVersion
    kind of worked, which means that I can create a deployment in Azure’s Deployment Center that seems to recognize dotnet as runtime. However, if I then deploy a .net app, it seems to me as if the application is started like a PHP application, which obviously does not work… All I see is an apache forbidden page. I tried to add the
    WebAppMetadata
    with the
    CURRENT_STACK
    and the
    netFrameworkVersion
    , but that didn’t help neither, so I am wondering if that is necessary at all… Another thing is that the general settings tab within configuration in portal.azure.com has no stack selected, although I tried to configure it using the code above. Can anybody tell me what I am doing wrong?
    • 1
    • 1
  • a

    astonishing-gpu-28317

    04/01/2022, 7:13 PM
    is there a way to skip a resource with
    pulumi up
    ? sort of the inverse of
    --target
    e
    • 2
    • 2
  • f

    future-window-78560

    04/02/2022, 2:06 AM
    Hey. I am mounting filestore in gce, (with the correct firewalls) the GCE and filestore are created through pulumi but the mounting is giving a timeout error. When I am creating through the console, the mounting works. Any solution?
  • l

    lively-vr-73939

    04/02/2022, 12:27 PM
    Hi, I've noticed that the https://github.com/pulumi/examples repository has the Apache-2.0 License, however some files have the following
    Copyright
    header.
    // Copyright 2016-2019, Pulumi Corporation.  All rights reserved.
    Am I allowed to use the examples under Apache-2.0 terms and conditions?
    e
    • 2
    • 1
  • c

    calm-tent-21096

    04/02/2022, 5:41 PM
    The following code seems kind of ugly:
    var searchDns = new PrivateZone("<http://privatelink.search.windows.net|privatelink.search.windows.net>", new PrivateZoneArgs
            {
                PrivateZoneName = "<http://privatelink.search.windows.net|privatelink.search.windows.net>",
                ResourceGroupName = (
                    _coreRef.GetOutput("CoreResourceGroupName") 
                        ?? throw new Exception("Core resource group not found"))
                    .Apply<string>(rg => Convert.ToString(rg) 
                        ?? string.Empty)
            });
    Am I doing something wrong?
    _coreRef.GetOutput()
    always returns
    Output<object?>
    but ResourceGroup name is
    Input<string>
    . Is there an easier way to convert to
    Input<string>
    from the output of
    GetOutput()
    ?
    e
    • 2
    • 2
  • b

    bored-monitor-99026

    04/02/2022, 11:53 PM
    hi, for rancher2 provider, i wonder if anyone has successfully used
    custom_cloud_provider
    to provision a cluster on cloud providers (other than aws/gcloud/azure etc. that are already supported)? https://www.pulumi.com/registry/packages/rancher2/
  • b

    bored-monitor-99026

    04/02/2022, 11:55 PM
    another question about rancher2 provider, since this provider requires you have a rancher k8s cluster in place. this brings a chicken-and-egg question, how do you create the cluster for rancher (following IasS best practices) in the first place?
    b
    • 2
    • 4
  • c

    careful-petabyte-65672

    04/03/2022, 1:29 PM
    Hi, we are having this issue with eks deploy https://github.com/pulumi/pulumi-eks/issues/676 Any ideas how to resolve?
    • 1
    • 1
  • m

    mammoth-memory-94473

    04/03/2022, 4:12 PM
    Hi, I am trying to deploy a VM on VMware vSphere and then run a shell script from local (not remote). How do I run the shell script where I need to pass multiple arguments to it? This is what I am trying it doesn’t seem to work
    script_output = command.local.Command("execute_shell_script",
                           create='chmod 755 configure.sh && ./configure.sh \"{pulumivm.default_ip_address}\" {arg1} {arg2}',
                           opts=pulumi.ResourceOptions(depends_on=[pulumivm])
                           )
    pulumi.export("script_output", script_output.stdout)
    Can you please point me to a snippet or an example where this is being done?
    e
    • 2
    • 1
  • b

    bitter-psychiatrist-55958

    04/03/2022, 5:47 PM
    👋 Hi everyone!
    👋 1
    👋🏻 1
  • a

    astonishing-energy-53370

    04/03/2022, 6:18 PM
    Hello, is there a way to get the information during runtime if the resource will be updated? I am using python
    e
    • 2
    • 3
  • b

    bored-monitor-99026

    04/04/2022, 3:51 AM
    hi community👋, i know a lot of folks use pulumi (infra provisioning) as well as flux (for gitops). i am curious why there isn't a pulumi provider for flux given there is a terraform provider. i imagine we can use flux pulumi provider to deploy flux onto the cluster.
    l
    • 2
    • 2
  • m

    mysterious-apartment-62241

    04/04/2022, 8:24 AM
    Hello Everyone! My name is Kelvin DeCosta. I'm very new to using IaC tools and so far my experience has been great! My team and I have a few tasks that we would like to automate. We need to execute some long-running scripts at the start of each week. We've settled on using
    AWS Batch
    with
    Fargate
    . We've tried and tested a "dispatcher"
    Lambda
    that is invoked at the start of each week (via
    EventBridge
    /
    CloudWatch
    events, in
    TypeScript
    ). This
    Lambda
    would submit
    Jobs
    with a specified
    Job Definition
    to a
    Job Queue
    which would then schedule them accordingly. I've set the
    Lambda
    function to use a
    Docker
    container the image of which is hosted on
    ECR
    (
    Docker
    container runs a
    Python
    script). I'm having a little trouble with connecting the
    AWS Batch
    resources (
    ComputeEnvironment
    ,
    JobDefinition
    , etc.) and
    ECS
    ,
    Fargate
    . I would really appreciate it if I can get some help/advice on linking these resources together. AFAIK, there are no examples using
    AWS Batch
    and
    Fargate
    with
    Docker
    containers in the examples repository. Feel free to correct me where I'm wrong. Any help is appreciated. Thank you for your time!
    • 1
    • 1
  • n

    nutritious-addition-48285

    04/04/2022, 1:51 PM
    Hey, I'm using the MongoDB Atlas package with Pulumi and I'm getting this error:
    debug: setting state: Invalid address to set: []string{"snapshot_backup_policy", "0", "policies", "0", "policy_item", "0", "id"}
    error: update failed
    It seems to be successfully setting everything up and then it's gets the new cluster and appears to try to set it to the pulumi stack state and fails. Is this something I'm doing incorrectly?
    l
    f
    • 3
    • 4
  • a

    acoustic-tiger-77630

    04/04/2022, 6:15 PM
    Hey guys. I am new around here and on Pulumi. Coming from a Terraform provider development background. I am curious to know what materials, videos, etc you recommend as a starting point, to start developing a Pulumi provider. Thanks
    s
    • 2
    • 3
  • b

    billowy-processor-56040

    04/04/2022, 6:18 PM
    Hi folks, looking for a bit of help with the login capability. Is there a way to run the pulumi login from the automation API ?
    m
    • 2
    • 4
  • b

    brave-doctor-12316

    04/04/2022, 7:15 PM
    do pulumi stack needs to connect to specific aws profile to work with respective aws environment aka dev/integration/prod.... how do pulumi stack know which env to work?
    m
    • 2
    • 3
  • b

    brave-doctor-12316

    04/04/2022, 7:45 PM
    I dont see anything related to canaries in cloudwatch, can you please help me.
    b
    • 2
    • 4
  • m

    mammoth-art-6111

    04/04/2022, 7:48 PM
    any way to get pulumi to re-output the generated code from a
    pulumi import
    ? i imported a lot of things using TMUX and...yeah
    b
    l
    • 3
    • 6
  • w

    wet-sunset-4939

    04/05/2022, 1:22 AM
    Hi All, just quick check. Is there anyway to hard code an stack with azure subscription id?
  • e

    eager-keyboard-30823

    04/05/2022, 7:16 AM
    Hey everyone 👋 I’m using F# in a Pulumi project and tried importing a GCP Composer environment. Since the code defaulted to C#, I had to translate it to F#. It’s now in a state where it builds fine but when I run
    pulumi preview
    it complains about something that looks like missing properties - but I’m not sure why, as those properties were not included in the C# code that was generated by the import command. Any tips for what to look for?
    e
    • 2
    • 21
  • l

    late-dog-2300

    04/05/2022, 10:17 AM
    I would be very happy if the people of this community can tell about themselves too. First of all, I want to tell about myself, my name is Bungla, and I am the director of adsansar.com.
  • l

    loud-rose-6296

    04/05/2022, 11:53 AM
    Hi guys, I am relatively new on IAC. I would wish to ask for opinions on the best practice to organize Pulumi projects. This link provides the best reference so far. However, I do not like the way that the app's main.go goes into the same repository with the other Pulumi code as it could reduce visibility. I wonder it would be possible to place the app's main.go/index.ts together with the application code. I have an example in the picture attached. This allows the pkg to be referenced from the service_api repo while having the visibility required. Please feel free to comment on this structure.
    l
    a
    • 3
    • 3
  • e

    echoing-postman-88590

    04/05/2022, 11:54 AM
    Hi, consider the following
    Pulumi.<stack>.yaml
    file:
    config:
      config:one:
        key: val
      config:two:
        key: val
    In order to read this config I have to:
    config = pulumi.Config(name="config")
    config_one = config.require_object("one")
    config_two = config.require_object("two")
    Is there away to
    for
    loop`config`over each object? Thanks
    l
    • 2
    • 5
  • s

    straight-egg-46671

    04/05/2022, 1:38 PM
    Hi all, I'm new in the Pulumi world, so forgive me if it is a stupid question. Our current VPC along is set up through
    awsx.ec2.Vpc
    The issue I can't figure out is if there is a way to edit the route table that it has created in the background. I found documentation on importing and creating new route tables, but nothing on how to edit the existing route tables and if that is possible when you create the VPC using the Pulumi Crosswalk.
    l
    • 2
    • 4
  • b

    brainy-cartoon-38510

    04/05/2022, 3:07 PM
    Hey folks, Is there a simple way to expect specific changes and fail if there are more. This is sort of similar to expect no change. For example I want to say only expect image version change, anything more it should not continue.
    e
    f
    • 3
    • 5
  • f

    fast-river-57630

    04/05/2022, 6:30 PM
    Doing our first 'stack destroy' 😎 No issues so far.
    🙌 3
    🎉 2
Powered by Linen
Title
f

fast-river-57630

04/05/2022, 6:30 PM
Doing our first 'stack destroy' 😎 No issues so far.
🙌 3
🎉 2
View count: 1