pulumi-azure-native: Azure Spring App - Unable to set `httpsOnly` and `public` properties to true

What happened?

When creating an Azure Spring App, Pulumi always applies a value of false for the public and httpsOnly properties no matter the input provide.

Steps to reproduce

Execute the below code:

import * as pulumi from "@pulumi/pulumi";
import { App, Service } from "@pulumi/azure-native/appplatform/v20220901preview"

export const app = (
    rgName: pulumi.Input<string>,
) => {
    const svc = new Service("svc", {
        resourceGroupName: rgName,
        serviceName: "azspa-test",
    });

    new App("test", {
        resourceGroupName: rgName,
        serviceName: svc.name,
        appName: "azspa-app",
        identity: { type: "SystemAssigned" },
        properties: {
            httpsOnly: true,
            public: true
        }
    });
};

execute pulumi up execute pulumi stack export --file export.json

Expected Behavior

public and httpsOnly properties should be set to true

Actual Behavior

public and httpsOnly properties are set to false and a pulumi up does not change anything.

Output of pulumi about

No response

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you’ve opened one already).

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Yes - absolutely does. Here is a variation of the original code provided that I’ve been testing with:

import * as pulumi from "@pulumi/pulumi";
import * as resources from "@pulumi/azure-native/resources";
// import { App, Service } from "@pulumi/azure-native/appplatform/v20221101preview"
import { App, Service } from "@pulumi/azure-native/appplatform/v20221201"

const resourceGroup = new resources.ResourceGroup("mitch-rg");

const boolSetting = true

const svc = new Service("mitch-svc", {
    resourceGroupName: resourceGroup.name
});

const app = new App("mitch-app", {
    resourceGroupName: resourceGroup.name,
    serviceName: svc.name,
    identity: { type: "SystemAssigned" },
    properties: {
        httpsOnly: boolSetting,
        public: boolSetting,
    }
});


export const checkSettingsCommand = pulumi.interpolate`az spring app show -g ${resourceGroup.name} -s ${svc.name} -n ${app.name}`

I ran a short debugging session and logged our requests and Azure responses. We seem to set the properties correctly:

{"identity":{"type":"SystemAssigned"},"location":"westeurope","properties":{"enableEndToEndTLS":false,"httpsOnly":true,"public":true}}

and even the first response comes with both true

{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":true,"provisioningState":"Creating","httpsOnly":true,"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"westeurope","id":"/subscriptions/redacted","name":"azspa-app","systemData":{"createdBy":"redacted","createdByType":"User","createdAt":"2022-12-06T12:18:16.762305Z","lastModifiedBy":"redacted","lastModifiedByType":"User","lastModifiedAt":"2022-12-06T12:18:16.762305Z"}}

but when the App is finally provisioned, they are suddenly false:

{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"azspa-test.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":{"type":"SystemAssigned","principalId":"redacted","tenantId":"706143bc-e1d4-4593-aee2-c9dc60ab9be7"},"location":"westeurope","id":"/subscriptions/redacted/providers/Microsoft.AppPlatform/Spring/azspa-test/apps/azspa-app","name":"azspa-app","systemData":{"createdBy":"redacted","createdByType":"User","createdAt":"2022-12-06T12:18:16.762305Z","lastModifiedBy":"redacted","lastModifiedByType":"User","lastModifiedAt":"2022-12-06T12:18:16.762305Z"}}

It definitely looks like a service issue to me.