1. Packages
  2. Azure Classic
  3. API Docs
  4. containerapp
  5. getEnvironmentStorage

We recommend using Azure Native.

Viewing docs for Azure v6.34.0
published on Wednesday, Apr 1, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v6.34.0
published on Wednesday, Apr 1, 2026 by Pulumi

    Use this data source to access information about an existing Container App Environment Storage.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.containerapp.getEnvironment({
        name: "existing-environment",
        resourceGroupName: "existing-resources",
    });
    const exampleGetEnvironmentStorage = example.then(example => azure.containerapp.getEnvironmentStorage({
        name: "existing-storage",
        containerAppEnvironmentId: example.id,
    }));
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.containerapp.get_environment(name="existing-environment",
        resource_group_name="existing-resources")
    example_get_environment_storage = azure.containerapp.get_environment_storage(name="existing-storage",
        container_app_environment_id=example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/containerapp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := containerapp.LookupEnvironment(ctx, &containerapp.LookupEnvironmentArgs{
    			Name:              "existing-environment",
    			ResourceGroupName: "existing-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = containerapp.LookupEnvironmentStorage(ctx, &containerapp.LookupEnvironmentStorageArgs{
    			Name:                      "existing-storage",
    			ContainerAppEnvironmentId: example.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.ContainerApp.GetEnvironment.Invoke(new()
        {
            Name = "existing-environment",
            ResourceGroupName = "existing-resources",
        });
    
        var exampleGetEnvironmentStorage = Azure.ContainerApp.GetEnvironmentStorage.Invoke(new()
        {
            Name = "existing-storage",
            ContainerAppEnvironmentId = example.Apply(getEnvironmentResult => getEnvironmentResult.Id),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.containerapp.ContainerappFunctions;
    import com.pulumi.azure.containerapp.inputs.GetEnvironmentArgs;
    import com.pulumi.azure.containerapp.inputs.GetEnvironmentStorageArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = ContainerappFunctions.getEnvironment(GetEnvironmentArgs.builder()
                .name("existing-environment")
                .resourceGroupName("existing-resources")
                .build());
    
            final var exampleGetEnvironmentStorage = ContainerappFunctions.getEnvironmentStorage(GetEnvironmentStorageArgs.builder()
                .name("existing-storage")
                .containerAppEnvironmentId(example.id())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: azure:containerapp:getEnvironment
          arguments:
            name: existing-environment
            resourceGroupName: existing-resources
      exampleGetEnvironmentStorage:
        fn::invoke:
          function: azure:containerapp:getEnvironmentStorage
          arguments:
            name: existing-storage
            containerAppEnvironmentId: ${example.id}
    

    API Providers

    This data source uses the following Azure API Providers:

    • Microsoft.App - 2025-07-01

    Using getEnvironmentStorage

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getEnvironmentStorage(args: GetEnvironmentStorageArgs, opts?: InvokeOptions): Promise<GetEnvironmentStorageResult>
    function getEnvironmentStorageOutput(args: GetEnvironmentStorageOutputArgs, opts?: InvokeOptions): Output<GetEnvironmentStorageResult>
    def get_environment_storage(container_app_environment_id: Optional[str] = None,
                                name: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetEnvironmentStorageResult
    def get_environment_storage_output(container_app_environment_id: Optional[pulumi.Input[str]] = None,
                                name: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentStorageResult]
    func LookupEnvironmentStorage(ctx *Context, args *LookupEnvironmentStorageArgs, opts ...InvokeOption) (*LookupEnvironmentStorageResult, error)
    func LookupEnvironmentStorageOutput(ctx *Context, args *LookupEnvironmentStorageOutputArgs, opts ...InvokeOption) LookupEnvironmentStorageResultOutput

    > Note: This function is named LookupEnvironmentStorage in the Go SDK.

    public static class GetEnvironmentStorage 
    {
        public static Task<GetEnvironmentStorageResult> InvokeAsync(GetEnvironmentStorageArgs args, InvokeOptions? opts = null)
        public static Output<GetEnvironmentStorageResult> Invoke(GetEnvironmentStorageInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnvironmentStorageResult> getEnvironmentStorage(GetEnvironmentStorageArgs args, InvokeOptions options)
    public static Output<GetEnvironmentStorageResult> getEnvironmentStorage(GetEnvironmentStorageArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:containerapp/getEnvironmentStorage:getEnvironmentStorage
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ContainerAppEnvironmentId string
    The ID of the Container App Environment to which this storage belongs.
    Name string
    The name of the Container App Environment Storage.
    ContainerAppEnvironmentId string
    The ID of the Container App Environment to which this storage belongs.
    Name string
    The name of the Container App Environment Storage.
    containerAppEnvironmentId String
    The ID of the Container App Environment to which this storage belongs.
    name String
    The name of the Container App Environment Storage.
    containerAppEnvironmentId string
    The ID of the Container App Environment to which this storage belongs.
    name string
    The name of the Container App Environment Storage.
    container_app_environment_id str
    The ID of the Container App Environment to which this storage belongs.
    name str
    The name of the Container App Environment Storage.
    containerAppEnvironmentId String
    The ID of the Container App Environment to which this storage belongs.
    name String
    The name of the Container App Environment Storage.

    getEnvironmentStorage Result

    The following output properties are available:

    AccessMode string
    The access mode to connect this storage to the Container App.
    AccountName string
    The Azure Storage Account in which the Share is located.
    ContainerAppEnvironmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    NfsServerUrl string
    The NFS server URL for the Azure File Share.
    ShareName string
    The name of the Azure Storage Share.
    AccessMode string
    The access mode to connect this storage to the Container App.
    AccountName string
    The Azure Storage Account in which the Share is located.
    ContainerAppEnvironmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    NfsServerUrl string
    The NFS server URL for the Azure File Share.
    ShareName string
    The name of the Azure Storage Share.
    accessMode String
    The access mode to connect this storage to the Container App.
    accountName String
    The Azure Storage Account in which the Share is located.
    containerAppEnvironmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    nfsServerUrl String
    The NFS server URL for the Azure File Share.
    shareName String
    The name of the Azure Storage Share.
    accessMode string
    The access mode to connect this storage to the Container App.
    accountName string
    The Azure Storage Account in which the Share is located.
    containerAppEnvironmentId string
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    nfsServerUrl string
    The NFS server URL for the Azure File Share.
    shareName string
    The name of the Azure Storage Share.
    access_mode str
    The access mode to connect this storage to the Container App.
    account_name str
    The Azure Storage Account in which the Share is located.
    container_app_environment_id str
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    nfs_server_url str
    The NFS server URL for the Azure File Share.
    share_name str
    The name of the Azure Storage Share.
    accessMode String
    The access mode to connect this storage to the Container App.
    accountName String
    The Azure Storage Account in which the Share is located.
    containerAppEnvironmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    nfsServerUrl String
    The NFS server URL for the Azure File Share.
    shareName String
    The name of the Azure Storage Share.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v6.34.0
    published on Wednesday, Apr 1, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.