Skip to content

Expose Azure Front Door profile ID output - #20123

Open
Irakli Gabisonia (gabisonia) wants to merge 1 commit into
microsoft:mainfrom
gabisonia:fix/19960-frontdoor-id-output
Open

Irakli Gabisonia (gabisonia) wants to merge 1 commit into
microsoft:mainfrom
gabisonia:fix/19960-frontdoor-id-output

Conversation

@gabisonia

Copy link
Copy Markdown
Contributor

Description

Azure Front Door consumers currently need a custom provisioning output to reference the profile's resource ID, for example when configuring diagnostic settings. Expose AzureFrontDoorResource.Id as a BicepOutputReference and emit the profile's id output so dependent infrastructure can use the standard reference APIs.

Fixes #19960

User-facing usage

Pass the profile ID to another Bicep module from a C# AppHost:

var frontDoor = builder.AddAzureFrontDoor("frontdoor");
builder.AddAzureInfrastructure("consumer", infrastructure =>
{
    infrastructure.Add(new ProvisioningOutput("frontDoorId", typeof(string))
    {
        Value = frontDoor.Resource.Id.AsProvisioningParameter(infrastructure)
    });
});

The Front Door template emits output id string = frontdoor.id. The consumer's manifest references {frontdoor.outputs.id}. This uses the existing C# provisioning API; AsProvisioningParameter is not available in polyglot AppHosts.

Validation

  • All 14 AzureFrontDoorTests passed, with quarantined and outerloop tests excluded.
  • Reviewed Bicep snapshots for zero, one, and multiple origins, plus the dependent module's manifest and Bicep.
  • git diff --check passed.
  • No live Azure deployment was performed.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://github.com/@raw/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20123

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20123"

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose an Id Bicep output reference for Azure Front Door

1 participant