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

    chilly-magazine-4507

    03/10/2020, 2:47 PM
    I am sorry I am a bit out of date, I just saw the announcement of v2 of pulumi-azure provider, so pulumi is not relying on terraform-azure provider anymore? or is it a wrapper on top of it?
    t
    • 2
    • 1
  • b

    bitter-dentist-28132

    03/10/2020, 5:46 PM
    is there a way to detect if an update is in progress? like investigating the state file or something?
  • t

    tall-stone-8237

    03/11/2020, 6:24 AM
    Hi everyone! Currently building out some dynamic providers that will “depend on each other” Could someone point me in the right direction with regards to exporting the resource ID? How do I access the resource ID outside the provider class?
    b
    b
    • 3
    • 3
  • m

    mammoth-caravan-51104

    03/11/2020, 8:18 AM
    Hi! Simple question around project configuration. Is it possible to specify main entry file in stack yml files? Use case would be to have one project codebase with stacks managing different responsibilities. Or is there a different way to achieve something similar?
    q
    • 2
    • 2
  • l

    limited-rainbow-51650

    03/11/2020, 10:47 AM
    Based on a comment from Luke in one of the Github issues, I found out about the arguments to `up`:
    pulumi up [template|url] [flags]
    However the docs do not specify much on what
    template
    or
    url
    can be. Can this be elaborated a bit more?
  • b

    better-actor-92669

    03/11/2020, 10:47 AM
    Hi guys! Is it possible to do "update before delete"? For instance, I have a GCP Https proxy target, which depends on a certificate and I cannot replace a certificate cause another resource depends on it.
    Error reading SslCertificate: googleapi: Error 400: The ssl_certificate resource 'projects/some-project/global/sslCertificates/base-site-ssl-certificate' is already being used by 'projects/some-project/global/targetHttpsProxies/base-site-http-proxy', resourceInUseByAnotherResource
    l
    s
    • 3
    • 28
  • t

    thousands-london-78260

    03/11/2020, 1:23 PM
    Hey anybody else suddenly unable to create/update k8s deployments? Just updated pulumi and trying to figure out if it’s something with GKE or latest pulumi?
    b
    • 2
    • 9
  • a

    acceptable-army-69872

    03/11/2020, 2:33 PM
    Can customers change their own billing data via pulumi.com or do we have to reach out to support?
    m
    g
    • 3
    • 2
  • b

    better-rainbow-14549

    03/11/2020, 3:49 PM
    i was logged in locally to a folder, then deleted that folder and now every pulumi command says
    unable to open bucket <file://oldfolder>
    including pulumi logout
    • 1
    • 1
  • b

    bitter-dentist-28132

    03/11/2020, 4:07 PM
    i'm having an issue where, when i change the values for a helm chart that's deploying mongodb, the mongo deployment gets stuck because it's waiting for the old pod release to pvc. how would i go about fixing this? do i need to apply a transformation on the chart to modify the deployment object to give it
    deleteBeforeReplace: true
    ?
    t
    • 2
    • 3
  • e

    echoing-breakfast-73834

    03/11/2020, 4:56 PM
    Does anybody know of a Slack provider? I'd like to define a channel for some notification stuff to be sent to. Found a couple for Terraform but nothing (currently) ported to Pulumi.
  • e

    early-musician-41645

    03/11/2020, 5:15 PM
    I’m having trouble finding how to restore an RDS instance from a manual snapshot. Anyone have a pointer to docs or examples using node/typescript?
    g
    • 2
    • 2
  • e

    early-intern-90238

    03/11/2020, 11:05 PM
    do you think you guys can fix the bug where the parser doesn't work when import the xml with trailing commas, which is legal syntax?
    g
    w
    • 3
    • 24
  • t

    thousands-london-78260

    03/11/2020, 11:23 PM
    Is there any good way to connect to several gke clusters that I create in a stack to deploy some services to them? I’m trying to convert them to kubernetes providers but get the following error
    configured Kubernetes cluster is unreachable: failed to parse kubeconfig data in `kubernetes:config:kubeconfig`; this must be a YAML literal string and not a filename or path - yaml: line 2: mapping values are not allowed in this context
    • 1
    • 1
  • b

    billowy-army-68599

    03/12/2020, 12:44 AM
    I'm trying my hand at building a community provider, and have a deprecated in the schema: https://github.com/rancher/terraform-provider-rke/blob/91b6d14d676aab96dc62aa0ca6135089105889ea/rke/schema_rke_cluster_node.go#L33 This creates a duplicate as expected, however I'm not sure how to override it. The TS schema has
    export interface RKEClusterNode {
    // snip
    /**
         * Node roles in k8s cluster. `controlplane`, `etcd` and `worker` are supported. (list)
         */
        roles: pulumi.Input<pulumi.Input<string>[]>;
        roles?: pulumi.Input<string>;
    }
    So I gave the following a try
    Resources: map[string]*tfbridge.ResourceInfo{
    			"rke_cluster": {
    				Tok: makeResource(mainMod, "RKECluster"),
    				Fields: map[string]*tfbridge.SchemaInfo{
    					"nodes": {
    						Fields: map[string]*tfbridge.SchemaInfo{
    							"roles": {
    								Name: "RoleList",
    							},
    						},
    					},
    				},
    			},
    		},
  • b

    billowy-army-68599

    03/12/2020, 12:45 AM
    doesn't seem like that overrode the field as I expected. I see lots of examples in the repos of overriding a field at the top of the schema (not sure if that's the right word?) but none in a nested map - any pointers?
    w
    • 2
    • 3
  • r

    rapid-lamp-57703

    03/12/2020, 3:00 PM
    hi
    👋 5
  • p

    prehistoric-pillow-672

    03/12/2020, 3:46 PM
    👋
    👋 4
  • f

    fast-dinner-32080

    03/12/2020, 5:19 PM
    In dotnet what is the recommended way to render a template file? I have a userdata file I need to render/template for each VM I start with a few dynamic variables. I have tried using the liquid template engine but I cannot pass it outputs or inputs since they are not real strings. I tried something like output.Apply(x => x.ToString()) but all that returns is "Pulumi.Input`1[System.String]". I'm having a hard time wrapping my head around these special types and why I can't just access them like plain string or just convert it to one. Does pulumi have a templatefile method in dotnet or am I forced to use another template provider like liquid?
  • f

    fast-dinner-32080

    03/12/2020, 5:50 PM
    Like something simple is trying to get a dotnet string with a input variable included in it like
    string test = $"Test String: {args.Name.Apply(x => x.ToString())}";
    but that doesn't seem to work where I get
    Test String: Pulumi.Output`1[System.String]
    r
    t
    • 3
    • 14
  • r

    rapid-lamp-57703

    03/12/2020, 7:08 PM
    Does anyone know what access rights in Azure pulumi needs to function?
  • b

    billowy-army-68599

    03/12/2020, 7:20 PM
    is it currently only possible to publish pulumi packages to the pulumi npm org?
    l
    • 2
    • 1
  • b

    billowy-army-68599

    03/12/2020, 8:53 PM
    also: is there an example of writing an output to a file?
    l
    • 2
    • 1
  • f

    full-dress-10026

    03/12/2020, 10:19 PM
    I started getting the below error after running
    pulumi up
    .
    error: [500] Internal Server Error
    f
    w
    • 3
    • 6
  • k

    kind-minister-39119

    03/13/2020, 1:11 AM
    Hey guys. New to pulumi, using the python aws module> I want to create an ec2 instance in an existing VPC. I can
    get_vpc
    and
    get_subnet
    , but
    aws.ec2.Instance
    does not give me the opportunity to specify a VPC ID. The result is when I specify the subnet, I get this error:
    aws:ec2:Instance (ansible-master):
        error: Error launching source instance: InvalidGroup.NotFound: The security group 'mgmt-ansible-master-sg-xxxx' does not exist in VPC 'vpc-xxxxxx'
            status code: 400, request id: xxxxx
    vpc = aws.ec2.get_vpc(cidr_block="172.18.0.0/16")
    subnet = aws.ec2.get_subnet(vpc_id=vpc.id, cidr_block="172.18.1.0/24")
    
    group = aws.ec2.SecurityGroup('mgmt-ansible-master-sg',
        description='Ansible Master Security Group',
        ingress=[
            { 'protocol': 'tcp', 'from_port': 22, 'to_port': 22, 'cidr_blocks': ['172.18.0.0/24'] }
        ],
        egress=[
            { 'protocol': '-1', 'from_port': 0, 'to_port': 0, 'cidr_blocks': ['0.0.0.0/0'] }
        ], vpc_id=vpc.id)
    
    server = aws.ec2.Instance("ansible-master",
            instance_type=size,
            security_groups=[group.name],
            ami=ami.id, key_name='mgmt', subnet_id=subnet.id)
    c
    • 2
    • 1
  • r

    rapid-lamp-57703

    03/13/2020, 9:28 AM
    Does anyone know what access rights in Azure pulumi needs to function? I am trying it out in a coperate environment and my account has severely limited access - i am trying to work out what is needed minimally - for it to work.
    s
    • 2
    • 1
  • a

    acceptable-stone-35112

    03/13/2020, 2:18 PM
    Hi, where can I find a full-scale example of Pulumi project? No matter if its AWS or Azure. I need to understand your best practices to organize code in big and mid-size projects. How would entire solution for serious e-commerce/industry/marketing/gaming project look like? How to structure code for multi-tenancy when I work as service provider / SaaS? How to design for multi-cloud or hybrid-cloud solutions?
    👍 2
    g
    • 2
    • 2
  • w

    wet-sunset-4939

    03/13/2020, 2:39 PM
    Hi All, I got an error when enable static site for an Storage.
    azure:storage/account:Account resource 'xxxx' has a problem: static_website.0: invalid or unknown key: error404_document
    t
    • 2
    • 1
  • w

    wet-sunset-4939

    03/13/2020, 3:30 PM
    Seems there are many issue with Azure 2.0 plugin. I got below issue as well.
    Message="Property id '' at path 'properties.hostingEnvironmentProfile.id' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
    t
    • 2
    • 3
  • e

    elegant-crayon-4967

    03/13/2020, 8:18 PM
    got an easy one…today I’m focusing on unit testing following the post here https://www.pulumi.com/blog/unit-testing-infrastructure-in-nodejs-and-mocha/ Although my linter complains about moving the following functions
    // runTests executes all test files (*.ts) in the current directory.
    export function runTests() {
        // Create a new Mocha test runner (with a long timeout).
        const mocha = new Mocha({ timeout: 1000*60*30 });
    
        // Only keep the .ts files, and skip this file (index.ts).
        const testDir = __dirname;
        fs.readdirSync(testDir).
            filter(file => file.endsWith(".ts") && file !== "index.ts").
                forEach(file => { mocha.addFile(path.join(testDir, file)); });
    
        // Now actually run the tests with the desired reporter.
        console.log(`Running Mocha Tests: ${mocha.files}`);
        mocha.reporter("spec").run(failures => {
            process.exitCode = failures ? 1 : 0;
        });
    }
    
    // promise returns a resource output's value, even if it's undefined.
    export function promise<T>(output: pulumi.Output<T>): Promise<T | undefined> {
        return (output as any).promise() as Promise<T>;
    }
    to arrow functions. I’m not sure how to do that for the
    export function promise<T>
    anyone have updated code that uses arrow functions for the testing?
    • 1
    • 1
Powered by Linen
Title
e

elegant-crayon-4967

03/13/2020, 8:18 PM
got an easy one…today I’m focusing on unit testing following the post here https://www.pulumi.com/blog/unit-testing-infrastructure-in-nodejs-and-mocha/ Although my linter complains about moving the following functions
// runTests executes all test files (*.ts) in the current directory.
export function runTests() {
    // Create a new Mocha test runner (with a long timeout).
    const mocha = new Mocha({ timeout: 1000*60*30 });

    // Only keep the .ts files, and skip this file (index.ts).
    const testDir = __dirname;
    fs.readdirSync(testDir).
        filter(file => file.endsWith(".ts") && file !== "index.ts").
            forEach(file => { mocha.addFile(path.join(testDir, file)); });

    // Now actually run the tests with the desired reporter.
    console.log(`Running Mocha Tests: ${mocha.files}`);
    mocha.reporter("spec").run(failures => {
        process.exitCode = failures ? 1 : 0;
    });
}

// promise returns a resource output's value, even if it's undefined.
export function promise<T>(output: pulumi.Output<T>): Promise<T | undefined> {
    return (output as any).promise() as Promise<T>;
}
to arrow functions. I’m not sure how to do that for the
export function promise<T>
anyone have updated code that uses arrow functions for the testing?
responding to my own ask…I think the following works
export const promise: <T>(output: pulumi.Output<T>) => 
  pulumi.Output<T> = (output) => output;
View count: 1