1. Packages
  2. Juju Provider
  3. API Docs
  4. getApplication
juju 1.0.0-beta3 published on Wednesday, Oct 8, 2025 by juju

juju.getApplication

Explore with Pulumi AI

juju logo
juju 1.0.0-beta3 published on Wednesday, Oct 8, 2025 by juju

    A data source that represents a single Juju application deployment from a charm.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as juju from "@pulumi/juju";
    
    const _this = juju.getApplication({
        name: juju_application["this"].name,
        modelUuid: juju_model.model.uuid,
    });
    
    import pulumi
    import pulumi_juju as juju
    
    this = juju.get_application(name=juju_application["this"]["name"],
        model_uuid=juju_model["model"]["uuid"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/juju/juju"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := juju.LookupApplication(ctx, &juju.LookupApplicationArgs{
    			Name:      juju_application.This.Name,
    			ModelUuid: juju_model.Model.Uuid,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Juju = Pulumi.Juju;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = Juju.GetApplication.Invoke(new()
        {
            Name = juju_application.This.Name,
            ModelUuid = juju_model.Model.Uuid,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.juju.JujuFunctions;
    import com.pulumi.juju.inputs.GetApplicationArgs;
    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 this = JujuFunctions.getApplication(GetApplicationArgs.builder()
                .name(juju_application.this().name())
                .modelUuid(juju_model.model().uuid())
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          function: juju:getApplication
          arguments:
            name: ${juju_application.this.name}
            modelUuid: ${juju_model.model.uuid}
    

    Using getApplication

    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 getApplication(args: GetApplicationArgs, opts?: InvokeOptions): Promise<GetApplicationResult>
    function getApplicationOutput(args: GetApplicationOutputArgs, opts?: InvokeOptions): Output<GetApplicationResult>
    def get_application(model_uuid: Optional[str] = None,
                        name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetApplicationResult
    def get_application_output(model_uuid: Optional[pulumi.Input[str]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetApplicationResult]
    func LookupApplication(ctx *Context, args *LookupApplicationArgs, opts ...InvokeOption) (*LookupApplicationResult, error)
    func LookupApplicationOutput(ctx *Context, args *LookupApplicationOutputArgs, opts ...InvokeOption) LookupApplicationResultOutput

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

    public static class GetApplication 
    {
        public static Task<GetApplicationResult> InvokeAsync(GetApplicationArgs args, InvokeOptions? opts = null)
        public static Output<GetApplicationResult> Invoke(GetApplicationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApplicationResult> getApplication(GetApplicationArgs args, InvokeOptions options)
    public static Output<GetApplicationResult> getApplication(GetApplicationArgs args, InvokeOptions options)
    
    fn::invoke:
      function: juju:index/getApplication:getApplication
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ModelUuid string
    The uuid of the model where the application is deployed.
    Name string
    Name of the application.
    ModelUuid string
    The uuid of the model where the application is deployed.
    Name string
    Name of the application.
    modelUuid String
    The uuid of the model where the application is deployed.
    name String
    Name of the application.
    modelUuid string
    The uuid of the model where the application is deployed.
    name string
    Name of the application.
    model_uuid str
    The uuid of the model where the application is deployed.
    name str
    Name of the application.
    modelUuid String
    The uuid of the model where the application is deployed.
    name String
    Name of the application.

    getApplication Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    ModelUuid string
    The uuid of the model where the application is deployed.
    Name string
    Name of the application.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModelUuid string
    The uuid of the model where the application is deployed.
    Name string
    Name of the application.
    id String
    The provider-assigned unique ID for this managed resource.
    modelUuid String
    The uuid of the model where the application is deployed.
    name String
    Name of the application.
    id string
    The provider-assigned unique ID for this managed resource.
    modelUuid string
    The uuid of the model where the application is deployed.
    name string
    Name of the application.
    id str
    The provider-assigned unique ID for this managed resource.
    model_uuid str
    The uuid of the model where the application is deployed.
    name str
    Name of the application.
    id String
    The provider-assigned unique ID for this managed resource.
    modelUuid String
    The uuid of the model where the application is deployed.
    name String
    Name of the application.

    Package Details

    Repository
    juju juju/terraform-provider-juju
    License
    Notes
    This Pulumi package is based on the juju Terraform Provider.
    juju logo
    juju 1.0.0-beta3 published on Wednesday, Oct 8, 2025 by juju
      AI Agentic Workflows: Register now