1. Packages
  2. Juju Provider
  3. API Docs
  4. Application
juju 0.19.0 published on Wednesday, Apr 30, 2025 by juju

juju.Application

Explore with Pulumi AI

juju logo
juju 0.19.0 published on Wednesday, Apr 30, 2025 by juju

    A resource that represents a single Juju application deployment from a charm. Deployment of bundles is not supported.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as juju from "@pulumi/juju";
    
    const _this = new juju.Application("this", {
        model: juju_model.development.name,
        charms: [{
            name: "ubuntu",
            channel: "edge",
            revision: 24,
            series: "trusty",
        }],
        resources: {
            "gosherve-image": "gatici/gosherve:1.0",
        },
        units: 3,
        placement: "0,1,2",
        storageDirectives: {
            files: "101M",
        },
        config: {
            "external-hostname": "...",
        },
    });
    
    import pulumi
    import pulumi_juju as juju
    
    this = juju.Application("this",
        model=juju_model["development"]["name"],
        charms=[{
            "name": "ubuntu",
            "channel": "edge",
            "revision": 24,
            "series": "trusty",
        }],
        resources={
            "gosherve-image": "gatici/gosherve:1.0",
        },
        units=3,
        placement="0,1,2",
        storage_directives={
            "files": "101M",
        },
        config={
            "external-hostname": "...",
        })
    
    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.NewApplication(ctx, "this", &juju.ApplicationArgs{
    			Model: pulumi.Any(juju_model.Development.Name),
    			Charms: juju.ApplicationCharmArray{
    				&juju.ApplicationCharmArgs{
    					Name:     pulumi.String("ubuntu"),
    					Channel:  pulumi.String("edge"),
    					Revision: pulumi.Float64(24),
    					Series:   pulumi.String("trusty"),
    				},
    			},
    			Resources: pulumi.StringMap{
    				"gosherve-image": pulumi.String("gatici/gosherve:1.0"),
    			},
    			Units:     pulumi.Float64(3),
    			Placement: pulumi.String("0,1,2"),
    			StorageDirectives: pulumi.StringMap{
    				"files": pulumi.String("101M"),
    			},
    			Config: pulumi.StringMap{
    				"external-hostname": pulumi.String("..."),
    			},
    		})
    		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 = new Juju.Application("this", new()
        {
            Model = juju_model.Development.Name,
            Charms = new[]
            {
                new Juju.Inputs.ApplicationCharmArgs
                {
                    Name = "ubuntu",
                    Channel = "edge",
                    Revision = 24,
                    Series = "trusty",
                },
            },
            Resources = 
            {
                { "gosherve-image", "gatici/gosherve:1.0" },
            },
            Units = 3,
            Placement = "0,1,2",
            StorageDirectives = 
            {
                { "files", "101M" },
            },
            Config = 
            {
                { "external-hostname", "..." },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.juju.Application;
    import com.pulumi.juju.ApplicationArgs;
    import com.pulumi.juju.inputs.ApplicationCharmArgs;
    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) {
            var this_ = new Application("this", ApplicationArgs.builder()
                .model(juju_model.development().name())
                .charms(ApplicationCharmArgs.builder()
                    .name("ubuntu")
                    .channel("edge")
                    .revision(24)
                    .series("trusty")
                    .build())
                .resources(Map.of("gosherve-image", "gatici/gosherve:1.0"))
                .units(3)
                .placement("0,1,2")
                .storageDirectives(Map.of("files", "101M"))
                .config(Map.of("external-hostname", "..."))
                .build());
    
        }
    }
    
    resources:
      this:
        type: juju:Application
        properties:
          model: ${juju_model.development.name}
          charms:
            - name: ubuntu
              channel: edge
              revision: 24
              series: trusty
          resources:
            gosherve-image: gatici/gosherve:1.0
          units: 3
          placement: 0,1,2
          storageDirectives:
            files: 101M
          config:
            external-hostname: '...'
    

    Create Application Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Application(name: string, args: ApplicationArgs, opts?: CustomResourceOptions);
    @overload
    def Application(resource_name: str,
                    args: ApplicationArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Application(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    model: Optional[str] = None,
                    endpoint_bindings: Optional[Sequence[ApplicationEndpointBindingArgs]] = None,
                    constraints: Optional[str] = None,
                    charms: Optional[Sequence[ApplicationCharmArgs]] = None,
                    exposes: Optional[Sequence[ApplicationExposeArgs]] = None,
                    machines: Optional[Sequence[str]] = None,
                    config: Optional[Mapping[str, str]] = None,
                    name: Optional[str] = None,
                    placement: Optional[str] = None,
                    resources: Optional[Mapping[str, str]] = None,
                    storage_directives: Optional[Mapping[str, str]] = None,
                    storages: Optional[Sequence[ApplicationStorageArgs]] = None,
                    trust: Optional[bool] = None,
                    units: Optional[float] = None)
    func NewApplication(ctx *Context, name string, args ApplicationArgs, opts ...ResourceOption) (*Application, error)
    public Application(string name, ApplicationArgs args, CustomResourceOptions? opts = null)
    public Application(String name, ApplicationArgs args)
    public Application(String name, ApplicationArgs args, CustomResourceOptions options)
    
    type: juju:Application
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var applicationResource = new Juju.Application("applicationResource", new()
    {
        Model = "string",
        EndpointBindings = new[]
        {
            new Juju.Inputs.ApplicationEndpointBindingArgs
            {
                Space = "string",
                Endpoint = "string",
            },
        },
        Constraints = "string",
        Charms = new[]
        {
            new Juju.Inputs.ApplicationCharmArgs
            {
                Name = "string",
                Base = "string",
                Channel = "string",
                Revision = 0,
            },
        },
        Exposes = new[]
        {
            new Juju.Inputs.ApplicationExposeArgs
            {
                Cidrs = "string",
                Endpoints = "string",
                Spaces = "string",
            },
        },
        Machines = new[]
        {
            "string",
        },
        Config = 
        {
            { "string", "string" },
        },
        Name = "string",
        Resources = 
        {
            { "string", "string" },
        },
        StorageDirectives = 
        {
            { "string", "string" },
        },
        Storages = new[]
        {
            new Juju.Inputs.ApplicationStorageArgs
            {
                Count = 0,
                Label = "string",
                Pool = "string",
                Size = "string",
            },
        },
        Trust = false,
        Units = 0,
    });
    
    example, err := juju.NewApplication(ctx, "applicationResource", &juju.ApplicationArgs{
    	Model: pulumi.String("string"),
    	EndpointBindings: juju.ApplicationEndpointBindingArray{
    		&juju.ApplicationEndpointBindingArgs{
    			Space:    pulumi.String("string"),
    			Endpoint: pulumi.String("string"),
    		},
    	},
    	Constraints: pulumi.String("string"),
    	Charms: juju.ApplicationCharmArray{
    		&juju.ApplicationCharmArgs{
    			Name:     pulumi.String("string"),
    			Base:     pulumi.String("string"),
    			Channel:  pulumi.String("string"),
    			Revision: pulumi.Float64(0),
    		},
    	},
    	Exposes: juju.ApplicationExposeArray{
    		&juju.ApplicationExposeArgs{
    			Cidrs:     pulumi.String("string"),
    			Endpoints: pulumi.String("string"),
    			Spaces:    pulumi.String("string"),
    		},
    	},
    	Machines: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Config: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	Resources: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	StorageDirectives: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Storages: juju.ApplicationStorageArray{
    		&juju.ApplicationStorageArgs{
    			Count: pulumi.Float64(0),
    			Label: pulumi.String("string"),
    			Pool:  pulumi.String("string"),
    			Size:  pulumi.String("string"),
    		},
    	},
    	Trust: pulumi.Bool(false),
    	Units: pulumi.Float64(0),
    })
    
    var applicationResource = new Application("applicationResource", ApplicationArgs.builder()
        .model("string")
        .endpointBindings(ApplicationEndpointBindingArgs.builder()
            .space("string")
            .endpoint("string")
            .build())
        .constraints("string")
        .charms(ApplicationCharmArgs.builder()
            .name("string")
            .base("string")
            .channel("string")
            .revision(0)
            .build())
        .exposes(ApplicationExposeArgs.builder()
            .cidrs("string")
            .endpoints("string")
            .spaces("string")
            .build())
        .machines("string")
        .config(Map.of("string", "string"))
        .name("string")
        .resources(Map.of("string", "string"))
        .storageDirectives(Map.of("string", "string"))
        .storages(ApplicationStorageArgs.builder()
            .count(0)
            .label("string")
            .pool("string")
            .size("string")
            .build())
        .trust(false)
        .units(0)
        .build());
    
    application_resource = juju.Application("applicationResource",
        model="string",
        endpoint_bindings=[{
            "space": "string",
            "endpoint": "string",
        }],
        constraints="string",
        charms=[{
            "name": "string",
            "base": "string",
            "channel": "string",
            "revision": 0,
        }],
        exposes=[{
            "cidrs": "string",
            "endpoints": "string",
            "spaces": "string",
        }],
        machines=["string"],
        config={
            "string": "string",
        },
        name="string",
        resources={
            "string": "string",
        },
        storage_directives={
            "string": "string",
        },
        storages=[{
            "count": 0,
            "label": "string",
            "pool": "string",
            "size": "string",
        }],
        trust=False,
        units=0)
    
    const applicationResource = new juju.Application("applicationResource", {
        model: "string",
        endpointBindings: [{
            space: "string",
            endpoint: "string",
        }],
        constraints: "string",
        charms: [{
            name: "string",
            base: "string",
            channel: "string",
            revision: 0,
        }],
        exposes: [{
            cidrs: "string",
            endpoints: "string",
            spaces: "string",
        }],
        machines: ["string"],
        config: {
            string: "string",
        },
        name: "string",
        resources: {
            string: "string",
        },
        storageDirectives: {
            string: "string",
        },
        storages: [{
            count: 0,
            label: "string",
            pool: "string",
            size: "string",
        }],
        trust: false,
        units: 0,
    });
    
    type: juju:Application
    properties:
        charms:
            - base: string
              channel: string
              name: string
              revision: 0
        config:
            string: string
        constraints: string
        endpointBindings:
            - endpoint: string
              space: string
        exposes:
            - cidrs: string
              endpoints: string
              spaces: string
        machines:
            - string
        model: string
        name: string
        resources:
            string: string
        storageDirectives:
            string: string
        storages:
            - count: 0
              label: string
              pool: string
              size: string
        trust: false
        units: 0
    

    Application Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Application resource accepts the following input properties:

    Model string
    Charms List<ApplicationCharm>
    The charm installed from Charmhub.
    Config Dictionary<string, string>
    Application specific configuration. Must evaluate to a string, integer or boolean.
    Constraints string
    EndpointBindings List<ApplicationEndpointBinding>
    Configure endpoint bindings
    Exposes List<ApplicationExpose>
    Makes an application publicly available over the network
    Machines List<string>
    Specify the target machines for the application's units. The number of machines in the set indicates the unit count for the application. Removing a machine from the set will remove the application's unit residing on it. machines is mutually exclusive with units and placement (which is deprecated).
    Name string
    Placement string

    Deprecated: Deprecated

    Resources Dictionary<string, string>
    Charm resources. Must evaluate to a string. A resource could be a resource revision number from CharmHub or a custom OCI image resource. Specify a resource other than the default for a charm. Note that not all charms have resources.
    StorageDirectives Dictionary<string, string>
    Storage directives (constraints) for the juju application. The map key is the label of the storage defined by the charm, the map value is the storage directive in the form ,,. Changing an existing key/value pair will cause the application to be replaced. Adding a new key/value pair will add storage to the application on upgrade.
    Storages List<ApplicationStorage>
    Storage used by the application.
    Trust bool
    Set the trust for the application.
    Units double
    The number of application units to deploy for the charm.
    Model string
    Charms []ApplicationCharmArgs
    The charm installed from Charmhub.
    Config map[string]string
    Application specific configuration. Must evaluate to a string, integer or boolean.
    Constraints string
    EndpointBindings []ApplicationEndpointBindingArgs
    Configure endpoint bindings
    Exposes []ApplicationExposeArgs
    Makes an application publicly available over the network
    Machines []string
    Specify the target machines for the application's units. The number of machines in the set indicates the unit count for the application. Removing a machine from the set will remove the application's unit residing on it. machines is mutually exclusive with units and placement (which is deprecated).
    Name string
    Placement string

    Deprecated: Deprecated

    Resources map[string]string
    Charm resources. Must evaluate to a string. A resource could be a resource revision number from CharmHub or a custom OCI image resource. Specify a resource other than the default for a charm. Note that not all charms have resources.
    StorageDirectives map[string]string
    Storage directives (constraints) for the juju application. The map key is the label of the storage defined by the charm, the map value is the storage directive in the form ,,. Changing an existing key/value pair will cause the application to be replaced. Adding a new key/value pair will add storage to the application on upgrade.
    Storages []ApplicationStorageArgs
    Storage used by the application.
    Trust bool
    Set the trust for the application.
    Units float64
    The number of application units to deploy for the charm.
    model String
    charms List<ApplicationCharm>
    The charm installed from Charmhub.
    config Map<String,String>
    Application specific configuration. Must evaluate to a string, integer or boolean.
    constraints String
    endpointBindings List<ApplicationEndpointBinding>
    Configure endpoint bindings
    exposes List<ApplicationExpose>
    Makes an application publicly available over the network
    machines List<String>
    Specify the target machines for the application's units. The number of machines in the set indicates the unit count for the application. Removing a machine from the set will remove the application's unit residing on it. machines is mutually exclusive with units and placement (which is deprecated).
    name String
    placement String

    Deprecated: Deprecated

    resources Map<String,String>
    Charm resources. Must evaluate to a string. A resource could be a resource revision number from CharmHub or a custom OCI image resource. Specify a resource other than the default for a charm. Note that not all charms have resources.
    storageDirectives Map<String,String>
    Storage directives (constraints) for the juju application. The map key is the label of the storage defined by the charm, the map value is the storage directive in the form ,,. Changing an existing key/value pair will cause the application to be replaced. Adding a new key/value pair will add storage to the application on upgrade.
    storages List<ApplicationStorage>
    Storage used by the application.
    trust Boolean
    Set the trust for the application.
    units Double
    The number of application units to deploy for the charm.
    model string
    charms ApplicationCharm[]
    The charm installed from Charmhub.
    config {[key: string]: string}
    Application specific configuration. Must evaluate to a string, integer or boolean.
    constraints string
    endpointBindings ApplicationEndpointBinding[]
    Configure endpoint bindings
    exposes ApplicationExpose[]
    Makes an application publicly available over the network
    machines string[]
    Specify the target machines for the application's units. The number of machines in the set indicates the unit count for the application. Removing a machine from the set will remove the application's unit residing on it. machines is mutually exclusive with units and placement (which is deprecated).
    name string
    placement string

    Deprecated: Deprecated

    resources {[key: string]: string}
    Charm resources. Must evaluate to a string. A resource could be a resource revision number from CharmHub or a custom OCI image resource. Specify a resource other than the default for a charm. Note that not all charms have resources.
    storageDirectives {[key: string]: string}
    Storage directives (constraints) for the juju application. The map key is the label of the storage defined by the charm, the map value is the storage directive in the form ,,. Changing an existing key/value pair will cause the application to be replaced. Adding a new key/value pair will add storage to the application on upgrade.
    storages ApplicationStorage[]
    Storage used by the application.
    trust boolean
    Set the trust for the application.
    units number
    The number of application units to deploy for the charm.
    model str
    charms Sequence[ApplicationCharmArgs]
    The charm installed from Charmhub.
    config Mapping[str, str]
    Application specific configuration. Must evaluate to a string, integer or boolean.
    constraints str
    endpoint_bindings Sequence[ApplicationEndpointBindingArgs]
    Configure endpoint bindings
    exposes Sequence[ApplicationExposeArgs]
    Makes an application publicly available over the network
    machines Sequence[str]
    Specify the target machines for the application's units. The number of machines in the set indicates the unit count for the application. Removing a machine from the set will remove the application's unit residing on it. machines is mutually exclusive with units and placement (which is deprecated).
    name str
    placement str

    Deprecated: Deprecated

    resources Mapping[str, str]
    Charm resources. Must evaluate to a string. A resource could be a resource revision number from CharmHub or a custom OCI image resource. Specify a resource other than the default for a charm. Note that not all charms have resources.
    storage_directives Mapping[str, str]
    Storage directives (constraints) for the juju application. The map key is the label of the storage defined by the charm, the map value is the storage directive in the form ,,. Changing an existing key/value pair will cause the application to be replaced. Adding a new key/value pair will add storage to the application on upgrade.
    storages Sequence[ApplicationStorageArgs]
    Storage used by the application.
    trust bool
    Set the trust for the application.
    units float
    The number of application units to deploy for the charm.
    model String
    charms List<Property Map>
    The charm installed from Charmhub.
    config Map<String>
    Application specific configuration. Must evaluate to a string, integer or boolean.
    constraints String
    endpointBindings List<Property Map>
    Configure endpoint bindings
    exposes List<Property Map>
    Makes an application publicly available over the network
    machines List<String>
    Specify the target machines for the application's units. The number of machines in the set indicates the unit count for the application. Removing a machine from the set will remove the application's unit residing on it. machines is mutually exclusive with units and placement (which is deprecated).
    name String
    placement String

    Deprecated: Deprecated

    resources Map<String>
    Charm resources. Must evaluate to a string. A resource could be a resource revision number from CharmHub or a custom OCI image resource. Specify a resource other than the default for a charm. Note that not all charms have resources.
    storageDirectives Map<String>
    Storage directives (constraints) for the juju application. The map key is the label of the storage defined by the charm, the map value is the storage directive in the form ,,. Changing an existing key/value pair will cause the application to be replaced. Adding a new key/value pair will add storage to the application on upgrade.
    storages List<Property Map>
    Storage used by the application.
    trust Boolean
    Set the trust for the application.
    units Number
    The number of application units to deploy for the charm.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Application resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    ModelType string
    The type of the model where the application is deployed. It is a computed field and is needed to determine if the application should be replaced or updated in case of base updates.
    Principal bool
    Whether this is a Principal application

    Deprecated: Deprecated

    Id string
    The provider-assigned unique ID for this managed resource.
    ModelType string
    The type of the model where the application is deployed. It is a computed field and is needed to determine if the application should be replaced or updated in case of base updates.
    Principal bool
    Whether this is a Principal application

    Deprecated: Deprecated

    id String
    The provider-assigned unique ID for this managed resource.
    modelType String
    The type of the model where the application is deployed. It is a computed field and is needed to determine if the application should be replaced or updated in case of base updates.
    principal Boolean
    Whether this is a Principal application

    Deprecated: Deprecated

    id string
    The provider-assigned unique ID for this managed resource.
    modelType string
    The type of the model where the application is deployed. It is a computed field and is needed to determine if the application should be replaced or updated in case of base updates.
    principal boolean
    Whether this is a Principal application

    Deprecated: Deprecated

    id str
    The provider-assigned unique ID for this managed resource.
    model_type str
    The type of the model where the application is deployed. It is a computed field and is needed to determine if the application should be replaced or updated in case of base updates.
    principal bool
    Whether this is a Principal application

    Deprecated: Deprecated

    id String
    The provider-assigned unique ID for this managed resource.
    modelType String
    The type of the model where the application is deployed. It is a computed field and is needed to determine if the application should be replaced or updated in case of base updates.
    principal Boolean
    Whether this is a Principal application

    Deprecated: Deprecated

    Look up Existing Application Resource

    Get an existing Application resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ApplicationState, opts?: CustomResourceOptions): Application
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            charms: Optional[Sequence[ApplicationCharmArgs]] = None,
            config: Optional[Mapping[str, str]] = None,
            constraints: Optional[str] = None,
            endpoint_bindings: Optional[Sequence[ApplicationEndpointBindingArgs]] = None,
            exposes: Optional[Sequence[ApplicationExposeArgs]] = None,
            machines: Optional[Sequence[str]] = None,
            model: Optional[str] = None,
            model_type: Optional[str] = None,
            name: Optional[str] = None,
            placement: Optional[str] = None,
            principal: Optional[bool] = None,
            resources: Optional[Mapping[str, str]] = None,
            storage_directives: Optional[Mapping[str, str]] = None,
            storages: Optional[Sequence[ApplicationStorageArgs]] = None,
            trust: Optional[bool] = None,
            units: Optional[float] = None) -> Application
    func GetApplication(ctx *Context, name string, id IDInput, state *ApplicationState, opts ...ResourceOption) (*Application, error)
    public static Application Get(string name, Input<string> id, ApplicationState? state, CustomResourceOptions? opts = null)
    public static Application get(String name, Output<String> id, ApplicationState state, CustomResourceOptions options)
    resources:  _:    type: juju:Application    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Charms List<ApplicationCharm>
    The charm installed from Charmhub.
    Config Dictionary<string, string>
    Application specific configuration. Must evaluate to a string, integer or boolean.
    Constraints string
    EndpointBindings List<ApplicationEndpointBinding>
    Configure endpoint bindings
    Exposes List<ApplicationExpose>
    Makes an application publicly available over the network
    Machines List<string>
    Specify the target machines for the application's units. The number of machines in the set indicates the unit count for the application. Removing a machine from the set will remove the application's unit residing on it. machines is mutually exclusive with units and placement (which is deprecated).
    Model string
    ModelType string
    The type of the model where the application is deployed. It is a computed field and is needed to determine if the application should be replaced or updated in case of base updates.
    Name string
    Placement string

    Deprecated: Deprecated

    Principal bool
    Whether this is a Principal application

    Deprecated: Deprecated

    Resources Dictionary<string, string>
    Charm resources. Must evaluate to a string. A resource could be a resource revision number from CharmHub or a custom OCI image resource. Specify a resource other than the default for a charm. Note that not all charms have resources.
    StorageDirectives Dictionary<string, string>
    Storage directives (constraints) for the juju application. The map key is the label of the storage defined by the charm, the map value is the storage directive in the form ,,. Changing an existing key/value pair will cause the application to be replaced. Adding a new key/value pair will add storage to the application on upgrade.
    Storages List<ApplicationStorage>
    Storage used by the application.
    Trust bool
    Set the trust for the application.
    Units double
    The number of application units to deploy for the charm.
    Charms []ApplicationCharmArgs
    The charm installed from Charmhub.
    Config map[string]string
    Application specific configuration. Must evaluate to a string, integer or boolean.
    Constraints string
    EndpointBindings []ApplicationEndpointBindingArgs
    Configure endpoint bindings
    Exposes []ApplicationExposeArgs
    Makes an application publicly available over the network
    Machines []string
    Specify the target machines for the application's units. The number of machines in the set indicates the unit count for the application. Removing a machine from the set will remove the application's unit residing on it. machines is mutually exclusive with units and placement (which is deprecated).
    Model string
    ModelType string
    The type of the model where the application is deployed. It is a computed field and is needed to determine if the application should be replaced or updated in case of base updates.
    Name string
    Placement string

    Deprecated: Deprecated

    Principal bool
    Whether this is a Principal application

    Deprecated: Deprecated

    Resources map[string]string
    Charm resources. Must evaluate to a string. A resource could be a resource revision number from CharmHub or a custom OCI image resource. Specify a resource other than the default for a charm. Note that not all charms have resources.
    StorageDirectives map[string]string
    Storage directives (constraints) for the juju application. The map key is the label of the storage defined by the charm, the map value is the storage directive in the form ,,. Changing an existing key/value pair will cause the application to be replaced. Adding a new key/value pair will add storage to the application on upgrade.
    Storages []ApplicationStorageArgs
    Storage used by the application.
    Trust bool
    Set the trust for the application.
    Units float64
    The number of application units to deploy for the charm.
    charms List<ApplicationCharm>
    The charm installed from Charmhub.
    config Map<String,String>
    Application specific configuration. Must evaluate to a string, integer or boolean.
    constraints String
    endpointBindings List<ApplicationEndpointBinding>
    Configure endpoint bindings
    exposes List<ApplicationExpose>
    Makes an application publicly available over the network
    machines List<String>
    Specify the target machines for the application's units. The number of machines in the set indicates the unit count for the application. Removing a machine from the set will remove the application's unit residing on it. machines is mutually exclusive with units and placement (which is deprecated).
    model String
    modelType String
    The type of the model where the application is deployed. It is a computed field and is needed to determine if the application should be replaced or updated in case of base updates.
    name String
    placement String

    Deprecated: Deprecated

    principal Boolean
    Whether this is a Principal application

    Deprecated: Deprecated

    resources Map<String,String>
    Charm resources. Must evaluate to a string. A resource could be a resource revision number from CharmHub or a custom OCI image resource. Specify a resource other than the default for a charm. Note that not all charms have resources.
    storageDirectives Map<String,String>
    Storage directives (constraints) for the juju application. The map key is the label of the storage defined by the charm, the map value is the storage directive in the form ,,. Changing an existing key/value pair will cause the application to be replaced. Adding a new key/value pair will add storage to the application on upgrade.
    storages List<ApplicationStorage>
    Storage used by the application.
    trust Boolean
    Set the trust for the application.
    units Double
    The number of application units to deploy for the charm.
    charms ApplicationCharm[]
    The charm installed from Charmhub.
    config {[key: string]: string}
    Application specific configuration. Must evaluate to a string, integer or boolean.
    constraints string
    endpointBindings ApplicationEndpointBinding[]
    Configure endpoint bindings
    exposes ApplicationExpose[]
    Makes an application publicly available over the network
    machines string[]
    Specify the target machines for the application's units. The number of machines in the set indicates the unit count for the application. Removing a machine from the set will remove the application's unit residing on it. machines is mutually exclusive with units and placement (which is deprecated).
    model string
    modelType string
    The type of the model where the application is deployed. It is a computed field and is needed to determine if the application should be replaced or updated in case of base updates.
    name string
    placement string

    Deprecated: Deprecated

    principal boolean
    Whether this is a Principal application

    Deprecated: Deprecated

    resources {[key: string]: string}
    Charm resources. Must evaluate to a string. A resource could be a resource revision number from CharmHub or a custom OCI image resource. Specify a resource other than the default for a charm. Note that not all charms have resources.
    storageDirectives {[key: string]: string}
    Storage directives (constraints) for the juju application. The map key is the label of the storage defined by the charm, the map value is the storage directive in the form ,,. Changing an existing key/value pair will cause the application to be replaced. Adding a new key/value pair will add storage to the application on upgrade.
    storages ApplicationStorage[]
    Storage used by the application.
    trust boolean
    Set the trust for the application.
    units number
    The number of application units to deploy for the charm.
    charms Sequence[ApplicationCharmArgs]
    The charm installed from Charmhub.
    config Mapping[str, str]
    Application specific configuration. Must evaluate to a string, integer or boolean.
    constraints str
    endpoint_bindings Sequence[ApplicationEndpointBindingArgs]
    Configure endpoint bindings
    exposes Sequence[ApplicationExposeArgs]
    Makes an application publicly available over the network
    machines Sequence[str]
    Specify the target machines for the application's units. The number of machines in the set indicates the unit count for the application. Removing a machine from the set will remove the application's unit residing on it. machines is mutually exclusive with units and placement (which is deprecated).
    model str
    model_type str
    The type of the model where the application is deployed. It is a computed field and is needed to determine if the application should be replaced or updated in case of base updates.
    name str
    placement str

    Deprecated: Deprecated

    principal bool
    Whether this is a Principal application

    Deprecated: Deprecated

    resources Mapping[str, str]
    Charm resources. Must evaluate to a string. A resource could be a resource revision number from CharmHub or a custom OCI image resource. Specify a resource other than the default for a charm. Note that not all charms have resources.
    storage_directives Mapping[str, str]
    Storage directives (constraints) for the juju application. The map key is the label of the storage defined by the charm, the map value is the storage directive in the form ,,. Changing an existing key/value pair will cause the application to be replaced. Adding a new key/value pair will add storage to the application on upgrade.
    storages Sequence[ApplicationStorageArgs]
    Storage used by the application.
    trust bool
    Set the trust for the application.
    units float
    The number of application units to deploy for the charm.
    charms List<Property Map>
    The charm installed from Charmhub.
    config Map<String>
    Application specific configuration. Must evaluate to a string, integer or boolean.
    constraints String
    endpointBindings List<Property Map>
    Configure endpoint bindings
    exposes List<Property Map>
    Makes an application publicly available over the network
    machines List<String>
    Specify the target machines for the application's units. The number of machines in the set indicates the unit count for the application. Removing a machine from the set will remove the application's unit residing on it. machines is mutually exclusive with units and placement (which is deprecated).
    model String
    modelType String
    The type of the model where the application is deployed. It is a computed field and is needed to determine if the application should be replaced or updated in case of base updates.
    name String
    placement String

    Deprecated: Deprecated

    principal Boolean
    Whether this is a Principal application

    Deprecated: Deprecated

    resources Map<String>
    Charm resources. Must evaluate to a string. A resource could be a resource revision number from CharmHub or a custom OCI image resource. Specify a resource other than the default for a charm. Note that not all charms have resources.
    storageDirectives Map<String>
    Storage directives (constraints) for the juju application. The map key is the label of the storage defined by the charm, the map value is the storage directive in the form ,,. Changing an existing key/value pair will cause the application to be replaced. Adding a new key/value pair will add storage to the application on upgrade.
    storages List<Property Map>
    Storage used by the application.
    trust Boolean
    Set the trust for the application.
    units Number
    The number of application units to deploy for the charm.

    Supporting Types

    ApplicationCharm, ApplicationCharmArgs

    Name string
    Base string
    Channel string
    The channel to use when deploying a charm. Specified as //.
    Revision double
    The revision of the charm to deploy. During the update phase, the charm revision should be update before config update, to avoid issues with config parameters parsing.
    Series string
    The series on which to deploy.

    Deprecated: Deprecated

    Name string
    Base string
    Channel string
    The channel to use when deploying a charm. Specified as //.
    Revision float64
    The revision of the charm to deploy. During the update phase, the charm revision should be update before config update, to avoid issues with config parameters parsing.
    Series string
    The series on which to deploy.

    Deprecated: Deprecated

    name String
    base String
    channel String
    The channel to use when deploying a charm. Specified as //.
    revision Double
    The revision of the charm to deploy. During the update phase, the charm revision should be update before config update, to avoid issues with config parameters parsing.
    series String
    The series on which to deploy.

    Deprecated: Deprecated

    name string
    base string
    channel string
    The channel to use when deploying a charm. Specified as //.
    revision number
    The revision of the charm to deploy. During the update phase, the charm revision should be update before config update, to avoid issues with config parameters parsing.
    series string
    The series on which to deploy.

    Deprecated: Deprecated

    name str
    base str
    channel str
    The channel to use when deploying a charm. Specified as //.
    revision float
    The revision of the charm to deploy. During the update phase, the charm revision should be update before config update, to avoid issues with config parameters parsing.
    series str
    The series on which to deploy.

    Deprecated: Deprecated

    name String
    base String
    channel String
    The channel to use when deploying a charm. Specified as //.
    revision Number
    The revision of the charm to deploy. During the update phase, the charm revision should be update before config update, to avoid issues with config parameters parsing.
    series String
    The series on which to deploy.

    Deprecated: Deprecated

    ApplicationEndpointBinding, ApplicationEndpointBindingArgs

    Space string
    Name of the space to bind the endpoint to.
    Endpoint string
    Name of the endpoint to bind to a space. Keep null (or undefined) to define default binding.
    Space string
    Name of the space to bind the endpoint to.
    Endpoint string
    Name of the endpoint to bind to a space. Keep null (or undefined) to define default binding.
    space String
    Name of the space to bind the endpoint to.
    endpoint String
    Name of the endpoint to bind to a space. Keep null (or undefined) to define default binding.
    space string
    Name of the space to bind the endpoint to.
    endpoint string
    Name of the endpoint to bind to a space. Keep null (or undefined) to define default binding.
    space str
    Name of the space to bind the endpoint to.
    endpoint str
    Name of the endpoint to bind to a space. Keep null (or undefined) to define default binding.
    space String
    Name of the space to bind the endpoint to.
    endpoint String
    Name of the endpoint to bind to a space. Keep null (or undefined) to define default binding.

    ApplicationExpose, ApplicationExposeArgs

    Cidrs string
    A comma-delimited list of CIDRs that should be able to access the application ports once exposed.
    Endpoints string
    Expose only the ports that charms have opened for this comma-delimited list of endpoints
    Spaces string
    A comma-delimited list of spaces that should be able to access the application ports once exposed.
    Cidrs string
    A comma-delimited list of CIDRs that should be able to access the application ports once exposed.
    Endpoints string
    Expose only the ports that charms have opened for this comma-delimited list of endpoints
    Spaces string
    A comma-delimited list of spaces that should be able to access the application ports once exposed.
    cidrs String
    A comma-delimited list of CIDRs that should be able to access the application ports once exposed.
    endpoints String
    Expose only the ports that charms have opened for this comma-delimited list of endpoints
    spaces String
    A comma-delimited list of spaces that should be able to access the application ports once exposed.
    cidrs string
    A comma-delimited list of CIDRs that should be able to access the application ports once exposed.
    endpoints string
    Expose only the ports that charms have opened for this comma-delimited list of endpoints
    spaces string
    A comma-delimited list of spaces that should be able to access the application ports once exposed.
    cidrs str
    A comma-delimited list of CIDRs that should be able to access the application ports once exposed.
    endpoints str
    Expose only the ports that charms have opened for this comma-delimited list of endpoints
    spaces str
    A comma-delimited list of spaces that should be able to access the application ports once exposed.
    cidrs String
    A comma-delimited list of CIDRs that should be able to access the application ports once exposed.
    endpoints String
    Expose only the ports that charms have opened for this comma-delimited list of endpoints
    spaces String
    A comma-delimited list of spaces that should be able to access the application ports once exposed.

    ApplicationStorage, ApplicationStorageArgs

    Count double
    The number of volumes.
    Label string
    The specific storage option defined in the charm.
    Pool string
    Name of the storage pool.
    Size string
    The size of each volume.
    Count float64
    The number of volumes.
    Label string
    The specific storage option defined in the charm.
    Pool string
    Name of the storage pool.
    Size string
    The size of each volume.
    count Double
    The number of volumes.
    label String
    The specific storage option defined in the charm.
    pool String
    Name of the storage pool.
    size String
    The size of each volume.
    count number
    The number of volumes.
    label string
    The specific storage option defined in the charm.
    pool string
    Name of the storage pool.
    size string
    The size of each volume.
    count float
    The number of volumes.
    label str
    The specific storage option defined in the charm.
    pool str
    Name of the storage pool.
    size str
    The size of each volume.
    count Number
    The number of volumes.
    label String
    The specific storage option defined in the charm.
    pool String
    Name of the storage pool.
    size String
    The size of each volume.

    Import

    Applications can be imported using the format: model_name:application_name, for example:

    $ pulumi import juju:index/application:Application wordpress development:wordpress
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    juju juju/terraform-provider-juju
    License
    Notes
    This Pulumi package is based on the juju Terraform Provider.
    juju logo
    juju 0.19.0 published on Wednesday, Apr 30, 2025 by juju