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

    cuddly-smartphone-89735

    02/19/2020, 6:41 PM
    In case of Azure, is it possible to obtain the subscription ID from a resource? As in I wanna know which subscription a certain resource belongs to.
    a
    • 2
    • 2
  • c

    careful-state-15277

    02/20/2020, 2:05 PM
    Dumb question, but is there a way of getting a string out of an Outpus<string> using the C# SDK?
    m
    t
    • 3
    • 28
  • c

    careful-state-15277

    02/20/2020, 6:48 PM
    Is there a C# equivalent of pulumi.interpolate?
    b
    • 2
    • 2
  • c

    careful-state-15277

    02/20/2020, 6:53 PM
    never-mind, I think I've found it here https://github.com/pulumi/pulumi-azure/blob/9b037bffe19efdb8d3da0f12a9dc374d2eb67689/sdk/dotnet/Storage/SharedAccessSignature.cs#L33
  • m

    millions-journalist-34868

    02/21/2020, 1:10 PM
    Hello. I am trying to build an Azure Infrastructure with pulimi using C# and I noticed some resources change each time I do a pulumi up, even if I did not change anything in the code. For instance, the ApiKey from Pulumi.Azure.AppInsights "needs" to be modified (readPermissions) each time I preview changes.
    b
    t
    • 3
    • 9
  • d

    delightful-truck-1268

    02/22/2020, 12:48 AM
    Is it possible to create a metric rule for, say, http server errors that has a dynamic threshold, rather than a static one?
  • m

    millions-journalist-34868

    02/22/2020, 6:36 PM
    When I try to destroy my stack, I have an error because the azure keyvault access policy gets deleted before the keyvault. That's exactly the issue described here : https://github.com/terraform-providers/terraform-provider-azurerm/issues/4971. However I can't set the access policies in the keyvault declaration because one of my access policy is for an AppService that is declared after my keyvault (because one of its appsetting is the keyvault url). So I don't know how to do, it's kind of a circular dependency ... Any idea how to solve that ?
    • 1
    • 1
  • c

    creamy-keyboard-79767

    02/23/2020, 3:53 PM
    Hi! I have an azure function (currently deploying with
    ArchiveFunctionApp
    ). Trying to add a url to allowed origins in siteConfig.allowedorigins, but the property doesn't exist
    t
    • 2
    • 2
  • c

    creamy-keyboard-79767

    02/23/2020, 3:54 PM
    looking for options, currently using Typescript bindings, and checking the docs at https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/azure/appservice/#ArchiveFunctionAppArgs
  • f

    freezing-waiter-91293

    02/24/2020, 11:12 AM
    Hi! I am trying to add the pulumi azure pipeline (using the pulumi azure extension) with the local file state management. I use:
    - task: Pulumi@1
      inputs:
        azureSubscription: 'Visual Studio Enterprise ~~'
        command: 'up'
        loginArgs: '<file://infra/pulumi-state>'
        cwd: 'infra'
        stack: 'production'`
    but it fails because it tries to find the files in
    <buildDir>/infra/infra/pulumi-state
    . When I use:
    loginArgs: '<file://pulumi-state>'
    it fails as well because it looks at this path:
    <buildDir>/pulumi-state
    . What am i doing wrong ?
    t
    c
    c
    • 4
    • 6
  • m

    mammoth-train-70005

    02/26/2020, 5:23 AM
    Hi, i'm trying to setup App Services with Managed Identity and Create a AAD Group with all the Apps as Members. The Problem is that it fails directly whi the preview when nothing exists.
    Diagnostics:
      azuread:index:GroupMember (app3Member):
        error: azuread:index/groupMember:GroupMember resource 'app3Member' has a problem: Missing required property 'memberObjectId'
    On the other hand, it works when I comment out the GroupMember generation, run
    pulumi up
    and deploy the appServices first, the comment the group member generation in and run
    pulumi up
    again. So with two round trips in works. I also checked doing forcing an Output<string> with
    memberObjectId: pulimi.output(app1Service).apply(app=>app.identity.principalId)
    This does not help, also playing around with setting dependsOn does also not helps. Any Ideas? Running the Script twice (first without the GroupMember generation) seems not a good option. Here is the complete sample (extract of a longer script)
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * as azuread from "@pulumi/azuread";
    import { Kinds } from "@pulumi/azure/appservice";
    import { Locations } from "@pulumi/azure";
    
    const appName = 'testapp';
    
    const env = 'dev-';
    
    const rgName = `rg-${env}${appName}`;
    const planName = `${env}${appName}`;
    const serviceName = `${env}${appName}`;
    
    const resourceGroup = new azure.core.ResourceGroup(rgName, {
        location: Locations.WestEurope
    });
    
    const resourceGroupArgs = {
        resourceGroupName: resourceGroup.name,
        location: resourceGroup.location
    };
    
    const servicePlan = new azure.appservice.Plan(planName, {
        ...resourceGroupArgs,
        kind: <http://Kinds.App|Kinds.App>,
        sku: {
            capacity: 1,
            size: 'B1',
            tier: 'Basic'
        }
    })
    
    const app1Service = new azure.appservice.AppService('app1' + serviceName, {
        ...resourceGroupArgs,
        appServicePlanId: servicePlan.id,
        appSettings: {
            "ASPNETCORE_ENVIRONMENT": env.startsWith('dev') ? 'development' : 'production'
        },
        identity: {
            type: 'SystemAssigned'
        }
    })
    
    const app2Service = new azure.appservice.AppService('app2-' + serviceName, {
        ...resourceGroupArgs,
        appServicePlanId: servicePlan.id,
        appSettings: {
            "ASPNETCORE_ENVIRONMENT": env.startsWith('dev') ? 'development' : 'production'
        },
        identity: {
            type: 'SystemAssigned'
        }
    })
    
    const app3Service = new azure.appservice.AppService('app3-' + serviceName, {
        ...resourceGroupArgs,
        appServicePlanId: servicePlan.id,
        appSettings: {
            "ASPNETCORE_ENVIRONMENT": env.startsWith('dev') ? 'development' : 'production'
        },
        identity: {
            type: 'SystemAssigned'
        }
    })
    
    const appGroupName = `${appName}-App`;
    
    const appGroup = new azuread.Group(appGroupName, {
    });
    
    new azuread.GroupMember('app1Member', {
        groupObjectId: appGroup.id,
        memberObjectId: app1Service.identity.principalId
    }, { dependsOn: [appGroup, app1Service] })
    
    new azuread.GroupMember('app2Member', {
        groupObjectId: appGroup.id,
        memberObjectId: app2Service.identity.principalId
    }, { dependsOn: [appGroup, app2Service] })
    
    new azuread.GroupMember('app3Member', {
        groupObjectId: appGroup.id,
        memberObjectId: app3Service.identity.principalId
    }, { dependsOn: [appGroup, app3Service] })
    t
    • 2
    • 3
  • m

    mammoth-train-70005

    02/26/2020, 10:38 AM
    Hi, is there a pulumi “native” way to add AAD User/Groups to an Azure SQL Database? The azure/sql provider seems not providing such functionality, only on the Server Level i can set the AAD Administrator Or is it simpler to run a tool which runs the SQL Commands?
    b
    • 2
    • 7
  • e

    elegant-balloon-59607

    02/26/2020, 4:26 PM
    Hello! Does Pulumi support rolling keys/connection strings? Would like to regenerate a cosmosdb key from time to time and update some azurefunctions/appservices that uses it.
    b
    • 2
    • 1
  • g

    gray-plastic-11307

    02/27/2020, 9:02 AM
    Hi! I am trying to import an Application Gateway, but having some trouble with the SSL certificates already existing in the AG. The certificate data and passwords are fetched using
    azure.keyvault.getSecret
    . In the
    details
    section Pulumi lists addition to the
    data
    and
    password
    fields for all certificates.. Any ideas what might be causing this? (I am certain the fetched secrets are the correct ones and mapped correctly)
    w
    • 2
    • 2
  • b

    better-rainbow-14549

    02/27/2020, 4:17 PM
    is it normal to set a resource's parent to the resource group that it's in?
    w
    • 2
    • 3
  • f

    fresh-tent-88504

    02/28/2020, 10:39 AM
    Hi, I've run in to a problem when attempting to set up a Windows virtual machine with c#. As far as I can tell the setup should be fine and I'm running the latest version of pulumi. Setup of the VM:
    var vm = new WindowsVirtualMachine("clientvm", new WindowsVirtualMachineArgs
                {
                    Name = "client-vm",
                    Location = resourceGroup.Location,
                    ResourceGroupName = resourceGroup.Name,
                    NetworkInterfaceIds = {networkInterface.Id},
                    Size = "Standard_D1",
                    SourceImageReference = new WindowsVirtualMachineSourceImageReferenceArgs
                    {
                        Publisher = "MicrosoftWindowsDesktop",
                        Offer = "Windows-10",
                        Sku = "rs5-pro",
                        Version = "latest",
                    },
                    AdminPassword = "some password",
                    AdminUsername = "some username",
                    OsDisk = new WindowsVirtualMachineOsDiskArgs
                    {
                        Caching = "ReadWrite",
                        Name = "OsDisk",
                        StorageAccountType = "Standard_LRS",
                    },
                });
    When running Pulumi up I get the following error:
    └─ azure:compute:WindowsVirtualMachine  clientvm                   1 error
    
    Diagnostics:
      azure:compute:WindowsVirtualMachine (clientvm):
        error: unrecognized resource type (Check): azure:compute/windowsVirtualMachine:WindowsVirtualMachine
    I realise that this is probably not an adequate amount of information, but so far I would just love to hear if anyone have had a similar issue, or would have any idea as to why this error is happening. Thanks!
  • b

    broad-dog-22463

    02/29/2020, 11:53 AM
    Hi @fresh-tent-88504 can you tell me what version of pulumi and pulumi-azure that you are using?
    f
    • 2
    • 3
  • g

    gorgeous-elephant-23271

    02/29/2020, 12:52 PM
    Hi there! Looking at these docs: https://github.com/pulumi/examples/blob/master/azure-ts-aks-helm/README.md, wondering what the equivalent of this might be in powershell?
    pulumi config set sshPublicKey < key.rsa.pub
  • g

    gorgeous-elephant-23271

    02/29/2020, 12:53 PM
    I've done this for now but its a bit ugly:
    pulumi config set sshPublicKey ([Convert]::ToBase64String( [System.Text.Encoding]::Unicode.GetBytes((get-content keys/public))))
  • g

    gorgeous-elephant-23271

    02/29/2020, 1:08 PM
    just doing get-content on a mult-line public key fails as set doesn't handle line breaks - not sure how this works in unix land
  • g

    gorgeous-elephant-23271

    02/29/2020, 1:38 PM
    Ah figured it out, had the wrong format public key
  • t

    tall-librarian-49374

    02/29/2020, 8:56 PM
    @gorgeous-elephant-23271 I would also suggest you generating the SSK key inside the Pulumi program as shown in https://github.com/pulumi/examples/blob/master/azure-ts-aks-keda/cluster.ts#L32
  • g

    gorgeous-elephant-23271

    03/01/2020, 12:45 PM
    👍 thanks @tall-librarian-49374
  • w

    wet-noon-14291

    03/02/2020, 10:27 PM
    I finally found some time working on my small sample app, but for some reason deploying the infrastructure fails. I did try to run almost the same F# sample code from the examples project, but my version fails. The main difference is that I'm using paket and the sample is using standard nuget. My program fails when creating a
    ResourceGroup
    , anyone seen that before?
    error: Running program '/Users/tomasjansson/git/mastoj/Quickz/src/Quickz.Infra/bin/Debug/netcoreapp3.1/Quickz.Infra.dll' failed with an unhandled exception:
        System.MissingMethodException: Method not found: 'Void Pulumi.CustomResource..ctor(System.String, System.String, Pulumi.ResourceArgs, Pulumi.ResourceOptions)'.
           at Pulumi.Azure.Core.ResourceGroup..ctor(String name, ResourceGroupArgs args, CustomResourceOptions options)
           at Helpers.createResourceGroup(String name) in /Users/tomasjansson/git/mastoj/Quickz/src/Quickz.Infra/Helpers.fs:line 14
           at Program.infra() in /Users/tomasjansson/git/mastoj/Quickz/src/Quickz.Infra/Program.fs:line 5
           at Program.main@40.Invoke(Unit arg00@) in /Users/tomasjansson/git/mastoj/Quickz/src/Quickz.Infra/Program.fs:line 40
           at Pulumi.FSharp.Deployment.run@48.Invoke()
           at Pulumi.Deployment.<>c__DisplayClass75_0.<RunAsync>b__0()
           at Pulumi.Stack.RunInitAsync(Func`1 init)
           at Pulumi.Deployment.Runner.WhileRunningAsync()
    t
    • 2
    • 12
  • w

    wet-noon-14291

    03/02/2020, 10:44 PM
    Are there any good samples on deploying istio to a Azure Kubernetes cluster? The one I found was for GKE.
    t
    g
    • 3
    • 7
  • n

    nice-businessperson-16226

    03/03/2020, 11:49 AM
    Hi, I am new to Pulumi, so this might be a total newbie mistake, but I have a problem getting the NuGet-packages installed. I am using Azure and C#. The project created with "pulumi new" seems to have some problems with the packages. Both the Pulumi and the Pulumi.Azure have this problem.
    t
    • 2
    • 14
  • d

    dazzling-rose-37445

    03/04/2020, 10:24 AM
    Hi! I'm creating a CosmosDB with multiple regions, that's the code:
    const gcosmos = new azure.cosmosdb.Account(config.globalCosmosDb.name,
        {
            name: config.globalCosmosDb.name,
            resourceGroupName: resourceGroup.name,
            location: "northeurope",
            offerType: "Standard",
            geoLocations: [...config.globalCosmosDb.regions],
            consistencyPolicy: { consistencyLevel: "Session" }
        }
    );
    And the config in my stack yaml file:
    regions:
      - location: "North Europe"
        failoverPriority: 0
      - location: "West US"
        failoverPriority: 1
      - location: "Southeast Asia"
        failoverPriority: 2
    The problem is that if I change my config to add a new region, like:
    regions:
      - location: "North Europe"
        failoverPriority: 0
      - location: "West US"
        failoverPriority: 1
      - location: "Southeast Asia"
        failoverPriority: 2
      - location: "Canada East"
        failoverPriority: 3
    My
    pulumi up
    deletes my cosmosDb and creates again instead of just updating the geolocations property, like in the image. Am I doing something wrong? 🤔
    b
    t
    • 3
    • 7
  • l

    limited-rainbow-51650

    03/04/2020, 4:33 PM
    I’m creating an Azure Cache for Redis. In the portal, I can already see and click around on it for about 5 minutes. Pulumi is still saying
    creating...
    meanwhile. Does it really take that long for such an instance to be set up?
    t
    • 2
    • 2
  • b

    bitter-house-39981

    03/04/2020, 4:49 PM
    hi iam able to create a postgres sql resource in azure. now i want to be able to use database encryption, i dont see a property to set via pulumi to tell the database to use a specific key. any pointers?
    b
    • 2
    • 1
  • b

    best-jordan-23853

    03/05/2020, 1:01 PM
    Hi Folks! I’m creating a AZ SQL Database and I’d like to choose a Gen4 edition. Looking on docs I’ve found the edition varies between Basic, Hyperscale, General Purpose, etc. How do it and choose the vCores? Thanks!
    t
    • 2
    • 2
Powered by Linen
Title
b

best-jordan-23853

03/05/2020, 1:01 PM
Hi Folks! I’m creating a AZ SQL Database and I’d like to choose a Gen4 edition. Looking on docs I’ve found the edition varies between Basic, Hyperscale, General Purpose, etc. How do it and choose the vCores? Thanks!
t

tall-librarian-49374

03/05/2020, 1:09 PM
AFAIK, this isn’t available yet and you should upvote/watch https://github.com/terraform-providers/terraform-provider-azurerm/issues/2849
👍 1
b

best-jordan-23853

03/05/2020, 1:32 PM
Voted!
View count: 3