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

    glamorous-helmet-50600

    05/21/2021, 8:08 PM
    Hey guys, I'm missing something here..how do I "link" up an Azure function to a change feed using AzureNative?
  • g

    glamorous-helmet-50600

    05/21/2021, 8:09 PM
    I create both the Cosmos stuff and functions AppService on the same pulumi run, then the deployment of the actual functions are done via AzureDevOps Pipelines
    t
    • 2
    • 2
  • j

    jolly-stone-87333

    05/22/2021, 11:59 AM
    Hi everyone, hope you are all doing well. I'm trying to upload databases when the infrastructure is setup. I'm doing the following which was taken from one of the examples. But I'm getting this error: error: Future#WaitForCompletion: the number of retries has been exceeded: StatusCode=400 -- Original Error: Code="BadRequest" Message="The ImportExport operation with Request Id 'cab7833d-f042-4dc9-b98f-b007989b0e48' failed due to 'Cannot create a BACPAC from a file that does not contain exported data.'." Details=[] InnerError={"multi":[]} From what I'm seeing online this can be because the bacpac contains the schema and no data. That might be right, as this is the blank version of the database when the application starts. Is there a way of altering this code snippet or another way to achieve this using Pulumi? I'm trying to do 18 databases some will have data and others will be blank schema initial versions. Any help greatly appreciated.
    var exampleBlob = new Azure.Storage.Blob("blob-" + name, new Azure.Storage.BlobArgs
                {
                    StorageAccountName = storageAccount.Name,
                    StorageContainerName = container.Name,
                    Type = "Block",
                    Source = new FileAsset(file),
                }, new CustomResourceOptions() { Parent = this, DependsOn = new InputList<Resource>() { container, storageAccount } });
            
                var exampleDatabase = new Azure.Sql.Database( name, new Azure.Sql.DatabaseArgs
                {
                    MaxSizeGb = size.MaxSize,
                    Edition = size.Edition,
                    RequestedServiceObjectiveName = size.ServiceObjectiveLevel,
                    ResourceGroupName = ResourceGroup.Name,
                    ServerName = sqlServer.Name,
                    Import = new DatabaseImportArgs()
                    {
                        AdministratorLogin = username,
                        AdministratorLoginPassword = password,
                        AuthenticationType = "SQL",
                        StorageKey = storageAccount.PrimaryAccessKey,
                        StorageKeyType = "StorageAccessKey",
                        OperationMode = "Import",
                        StorageUri = exampleBlob.Url
                    },
                    Collation = DatabaseCollation
                }, new CustomResourceOptions() { Parent = this, DependsOn = new InputList<Resource>() { sqlServer, storageAccount, exampleBlob } });
    
                return Output.All(sqlServer.Name, exampleDatabase.Name, password).Apply(f=> $"Data Source={f[0]}.<http://database.windows.net;Initial|database.windows.net;Initial> Catalog={f[1]};User ID={username};Password={f[2]};");
  • b

    billowy-vr-96461

    05/23/2021, 5:12 AM
    hey there! How can I create a self-signed certificate with Azure Native? I see that the Azure provider (legacy?) supports Secrets, Keys and Certificates for a KeyVault, but Azure Native supports only Secrets and Keys: https://www.pulumi.com/docs/reference/pkg/azure-native/keyvault/
    t
    • 2
    • 2
  • f

    freezing-memory-87554

    05/24/2021, 12:50 PM
    Hey! Does anyone know how to create a FrontDoor in Azure Native? Maybe some example I'm sooo confused with SubResourceArgs right now in RoutingRules... How am I suppose to know the Id before FrontDoor is created?
    w
    t
    • 3
    • 33
  • a

    acceptable-printer-2467

    05/25/2021, 7:31 PM
    Hey everyone, has anyone had any success deploying a function app to Azure via pulumi where the storage account is located behind a VNet?
  • g

    glamorous-helmet-50600

    05/25/2021, 9:46 PM
    Hi there! I'm setting up a CosmosDB database with SQL Containers using AzureNative and it looks like the indexing policy specified is not being applied.
    IndexingPolicy = new AzureNative.DocumentDB.Inputs.IndexingPolicyArgs
                    {
                        Automatic = true,
                        ExcludedPaths = {},
                        IncludedPaths = 
                        {
                            new AzureNative.DocumentDB.Inputs.IncludedPathArgs
                            {
                                Indexes = 
                                {
                                    new AzureNative.DocumentDB.Inputs.IndexesArgs
                                    {
                                        DataType = "String",
                                        Kind = "Range",
                                        Precision = -1,
                                    },
                                    new AzureNative.DocumentDB.Inputs.IndexesArgs
                                    {
                                        DataType = "Number",
                                        Kind = "Range",
                                        Precision = -1,
                                    },
                                    new AzureNative.DocumentDB.Inputs.IndexesArgs {
                                        Kind = "Spatial",
                                        DataType = "Point"
                                    }
                                },
                                Path = "/*",
                            },
                        },
                        IndexingMode = "consistent",
                    },
    It's as per documentation, but when I check the container via the portal this is the indexing policy:
    {
      "indexingMode": "consistent",
      "automatic": true,
      "includedPaths": [
        {
          "path": "/*"
        }
      ],
      "excludedPaths": [
        {
          "path": "/\"_etag\"/?"
        }
      ],
      "spatialIndexes": [
        {
          "path": "/*",
          "types": [
            "Point",
            "LineString",
            "Polygon",
            "MultiPolygon"
          ]
        }
      ]
    }
    Any clues?
    t
    • 2
    • 19
  • b

    bright-shampoo-60925

    05/27/2021, 12:31 AM
    Hello is there a way to do Azure Active Directory > Security > Identity Protection using c#? I am unable to find documentation under aad to do this.
    t
    • 2
    • 7
  • p

    powerful-printer-57241

    05/27/2021, 9:16 AM
    When using the Azure Pipeline Pulumi task in a DevOps pipeline, is there a way to detect simply if there is any change in a stack? We want to require a manual validation step in case the infrastructure is going to change, but the only way to check that I can think of is to run
    pulumi preview --json
    manually in a PowerShell script, parse the JSON output and act on whether there are any modifications.
    c
    a
    • 3
    • 3
  • b

    better-shampoo-48884

    05/27/2021, 9:51 AM
    A bit of a random question simply because it might be answer quicker than I figure it out - when doing this:
    const aksIngresssManagedIdentity = await azure.managedidentity.getUserAssignedIdentity({...stuff...})
    What happens when the identity I'm trying to get does not exist? Basically I'm trying to simplify some rules, and I'd like to conditionally link the ingress managed identity with AKS if and only if it exists (obviously). But I'm unsure of what the result of aksIngressManagedIdentity would be when it cannot find the identity that i'm looking for - so not sure what conditional I could use when it fails the lookup. edit: or would this be a good case for a try { } catch { } type thing?
  • g

    gorgeous-country-43026

    05/27/2021, 10:15 AM
    Hmm, any way for me to reliably wait for
    azure.network.PublicIPAddress
    to populate in such a way that it will always have the IP address available under
    ipAddress
    property? It's type signature in TS is
    Output<string | undefined>
    which I'm assuming is due to the fact that this output won't wait until it has got the IP address?
    t
    • 2
    • 5
  • b

    billowy-vr-96461

    05/27/2021, 7:01 PM
    how do I make a function like
    listNamespaceKeys
    (from Service Bus) to wait for the service bus resource's creation and resource group first?
    t
    • 2
    • 2
  • r

    rough-tomato-98795

    06/01/2021, 8:52 AM
    Hello, is there a way how to represent latin1 in memory string as asset for uploading to BlobStorage?
  • s

    square-eye-69977

    06/01/2021, 1:39 PM
    Hi - I am confused on how to express in C# an Input<object>. I used the conversion tool from ARM template for a Bot Registration and it produced the following: var channelResource = new AzureNative.BotService.V20210301.Channel("channelResource", new AzureNative.BotService.V20210301.ChannelArgs { ChannelName = $"{botServicesEICallingBotNameParam}/MsTeamsChannel", Location = "global", Properties = { { "channelName", "MsTeamsChannel" }, { "properties", { { "enableCalling", true }, { "isEnabled", true }, } }, }, ... When looking up ChannelArgs ....... // // Summary: // The set of properties specific to bot channel resource [Input("properties", false, false)] public Input<object>? Properties { get; set; } The error when hovering over the Properties is Object or collection initializer implicitly dereferences possibly null member 'ChannelArgs.Properties'. The error when running pulumi up: Invalid expression term '{' Thanks
    t
    • 2
    • 2
  • r

    rough-truck-68200

    06/02/2021, 6:59 AM
    hello there! I am experiencing issues executing pulumi up with the newly introduced
    soft deleted
    state for Computer Vision resources, and need to manually purge the resource before running pulumi (the resource was previously created and deleted with pulumi), is anyone aware of it? and if so, any property I need to use or known workaround?
    error: creating Cognitive Services Account. cognitiveservices.AccountsClient#Create: Failure sending request: StatusCode=409 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="FlagMustBeSetForRestore" Message="An existing resource with ID '{resource id here}' has been soft-deleted. To restore the resource, you must specify 'restore' to be 'true' in the property. If you don't want to restore existing resource, please purge it first."
    any help is appreciated thanks!
    t
    • 2
    • 2
  • c

    careful-river-95363

    06/02/2021, 10:09 AM
    [Newbie] I have a .net framework solution which currently deploys in azure (web app) using arm templates. How to update the same app service using Pulumi? Everywhere I am able to see examples of deploying a static html file as web service where I want to deploy a whole solution
    m
    • 2
    • 1
  • m

    miniature-leather-70472

    06/02/2021, 10:54 AM
    I'm sure I'm doing something dumb here, but any suggestions apprecited. Trying to migrate an AKS component resource to Azure Native, the following code sets permissions on the vNet to the ACI plugin identity, which is not known until the AKS cluster is created:
    new Authorization.RoleAssignment($"{name}-aks-subnet-aci-role", new Authorization.RoleAssignmentArgs
    {
        
    RoleAssignmentName = new RandomUuid($"{name}-Network-Contributor-Aci-Uuid").Result,
        
    Scope = args.ResourceGroupId,
        
    PrincipalId = aks.AddonProfiles.Apply(profiles => profiles!["AciConnectorLinux"].Identity.ObjectId),
        
    RoleDefinitionId = roleDefinitionId,
        
    PrincipalType = Authorization.PrincipalType.ServicePrincipal
    }
    Pulumi preview is failing on this line:
    PrincipalId = aks.AddonProfiles.Apply(profiles => profiles!["AciConnectorLinux"].Identity.ObjectId),
    With this error:
    System.NullReferenceException: Object reference not set to an instance of an object.
    `at Ict.AzureNative.Containers.IctAzureKubernetesCluster.<>c.<.ctor>b__32_7(ImmutableDictionary`2 profiles) in C:\repos\ict-azure-native\src\ict-azure-native\Containers\IctAzureKubernetesCluster.cs:line 254` Given that this identity is not known until the cluster is created, it is expected to be empty in the initial preview, so why is it trying to work it out rather than waiting on AKS to create first?
    • 1
    • 2
  • a

    average-greece-53878

    06/02/2021, 4:07 PM
    Hello! I'm using azure-native's
    VirtualMachineRunCommandByVirtualMachine
    and get this error:
    Code="OperationNotAllowed" Message="The property 'runCommands' is not valid because the 'Microsoft.Compute/RunCommandPreview' feature is not enabled for this subscription."
    b
    t
    • 3
    • 13
  • a

    average-greece-53878

    06/02/2021, 4:07 PM
    Have confirmed that Microsoft.Compute is enabled for the subscription as a provider. Microsoft's Azure support has suggest Pulumi may be using an outdated API?
  • e

    elegant-stone-54832

    06/02/2021, 6:54 PM
    Is there any chance to use Azure CLI to authenticate against Azure BlobStorage when using it as a custom pulumi backend?
    w
    b
    • 3
    • 11
  • p

    purple-quill-47375

    06/03/2021, 3:26 PM
    Hi, I am using Azure-Native to deploy a Bastion Host in Azure through C# Pulumi code. When doing a pulumi up, I am getting the following error: pulumi😛ulumi:Stack Deployment-dev.BastionHost running + Ict:Azure:Network:IctNetworkSecurityGroup nsg creating pulumi😛ulumi:Stack Deployment-dev.BastionHost running runtime: VirtualAlloc of 8192 bytes failed with errno=1455 pulumi😛ulumi:Stack Deployment-dev.BastionHost running fatal error: out of memory pulumi😛ulumi:Stack Deployment-dev.BastionHost running runtime stack: pulumi😛ulumi:Stack Deployment-dev.BastionHost running runtime.throw(0xfb517e, 0xd) pulumi😛ulumi:Stack Deployment-dev.BastionHost running /opt/hostedtoolcache/go/1.16.4/x64/src/runtime/panic.go:1117 +0x79 <snip> pulumi😛roviders:azure-native default_1_9_0 error: could not read plugin Pulumi preview does work, so I am slightly confused why it fails to read the plugin. (note that Pulumi Up uses --skip-preview  --yes --non-interactive) Any idea how I can increase the memory that Pulumi can utilise? #azure
    t
    • 2
    • 4
  • m

    miniature-leather-70472

    06/04/2021, 8:44 AM
    anyone had any issues with the azure-native provider not waiting for vNet subnets to be created before moving on? Been seeing issues with later steps failing because the subnet doesn't exist, run it again a few mins later and it works, although if I run it too soon after I get this error:
    autorest/azure: Service returned an error. Status=<nil> Code="AnotherOperationInProgress" Message="Another operation on this or dependent resource is in progress. To retrieve status of the operation use uri: <https://management.azure.com/subscriptions/892b688f-5e61-4b53-9091-e0ed72aef7a8/providers/Microsoft.Network/locations/westeurope/operations/6d9c24a9-c3f6-4e72-8193-bb618cc9b502?api-version=2020-11-01>." Details=[]
    t
    • 2
    • 11
  • p

    prehistoric-kite-30979

    06/04/2021, 6:01 PM
    Hi all, does anyone have an azure(-native) equivalent of this aws taggable resources list? https://github.com/joeduffy/aws-tags-example/blob/master/autotag-ts/taggable.ts
    p
    • 2
    • 1
  • b

    busy-sugar-35016

    06/07/2021, 9:05 AM
    Hi all, I use azure_native in Python and have a problem regarding Pulumi functions such as
    azure_native.eventhub.list_namespace_keys
    or
    azure_native.storage.list_storage_account_keys
    . Basically, I want to provision two Azure resources A and B lying in the same Pulumi stack, whereby resource B needs a key value from resource A as a setting property. Thus, I call e.g. list_namespace_keys in the code of resource B and mention the dependency on resource A through
    opts
    . Nevertheless,
    pulumi up
    immediately fails with the error "invoke of azure-native:eventhub:listNamespaceKeys failed" and "Can not perform requested operation on nested resource. Parent resource 'udp-dev-eventhub-media' not found". It seems to me that those functions ignore the given dependencies completely and expect the respective resources to exist already. Do you have a working example of how to use those functions correctly?
    b
    • 2
    • 2
  • w

    wet-noon-14291

    06/07/2021, 9:17 PM
    Any azuread provider experts that can point me in the right direction on how to set the API Permissions for an app?
  • e

    enough-butcher-66045

    06/08/2021, 5:36 AM
    hey peeps, any idea where to get linuxFxVersion possible values from?
  • e

    enough-butcher-66045

    06/08/2021, 5:40 AM
    is linuxFxVersion the way I can get these values populated on my app service?
    t
    • 2
    • 2
  • w

    wet-noon-14291

    06/08/2021, 11:15 AM
    Is azuread the only provider for azure active directory at the moment? I do find that it is missing some features and is buggy as well, like setting a property to true and the false only make the switch to true but not back (even with
    deleteBeforeReplace
    set to true). I also can't configure azure ad app in "spa mode".
    b
    • 2
    • 5
  • r

    red-flower-2343

    06/08/2021, 6:04 PM
    Hi, trying to create a private endpoint to an app service but get:
    error: Code="InvalidRequestFormat" Message="Cannot parse the request." Details=[]
    using N = Pulumi.AzureNative.Network;
    using NI = Pulumi.AzureNative.Network.Inputs;
    
     var privateEndpoint = new N.PrivateEndpoint("privateEndpoint", new N.PrivateEndpointArgs
            {
                Location = location,
                ManualPrivateLinkServiceConnections = 
                {
                    new NI.PrivateLinkServiceConnectionArgs
                    {
                        GroupIds = 
                        {
                            "sites",
                        },
                        PrivateLinkServiceId = apiAppService.Id,
                        RequestMessage = "Please manually approve my connection.",
                    },
                },
                PrivateEndpointName = "Pulumi-PEP",
                ResourceGroupName = platformResourceGroupName,
                Subnet = new NI.SubnetArgs{
                    Id = subnetApps01.Id,
                },
            });
    Any help much appreciated.
    ✅ 1
    • 1
    • 1
  • l

    lemon-garage-82195

    06/09/2021, 9:09 AM
    Morning guys, We're experiencing an odd issue after migrating from azure-nextgen to azure-native. A 
    pulumi up
     gives us the expect output, and the resources exist within Azure, however, we've noticed that running the pipeline again pulumi tries to delete a subnet even though there have been no changes made to the config of that subnet. Has anyone experienced a similar issue?
    👀 1
    t
    b
    • 3
    • 2
Powered by Linen
Title
l

lemon-garage-82195

06/09/2021, 9:09 AM
Morning guys, We're experiencing an odd issue after migrating from azure-nextgen to azure-native. A 
pulumi up
 gives us the expect output, and the resources exist within Azure, however, we've noticed that running the pipeline again pulumi tries to delete a subnet even though there have been no changes made to the config of that subnet. Has anyone experienced a similar issue?
👀 1
t

tall-librarian-49374

06/09/2021, 9:30 AM
Could it be https://github.com/pulumi/pulumi-azure-native/issues/611 ?
b

brave-planet-10645

06/09/2021, 9:30 AM
That looks like what I'm seeing as well
View count: 3