Skip to content
Discussion options

You must be logged in to vote

You can use an expression like this:

builder.AddProject<Projects.Api>("api")
    .PublishAsAzureContainerApp((infra, app) =>
    {
        // Add an environment variable to the container app that resolved the current subscription id
        app.Template.Containers[0].Value.Env.Add(new ContainerAppEnvironmentVariable
        {
            Name = "SUBSCRIPTION_ID",
            Value = BicepFunction.GetSubscription().Id
        });
    });

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@vim-sroberge
Comment options

@davidfowl
Comment options

Answer selected by vim-sroberge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants