1. Packages
  2. Juju Provider
  3. API Docs
  4. getCharm
Viewing docs for juju 1.4.0-rc1
published on Tuesday, Mar 24, 2026 by juju
juju logo
Viewing docs for juju 1.4.0-rc1
published on Tuesday, Mar 24, 2026 by juju

    A data source that fetches charm metadata from CharmHub, including the resolved revision, the names and interfaces of all integrations the charm provides or requires.

    Using getCharm

    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 getCharm(args: GetCharmArgs, opts?: InvokeOptions): Promise<GetCharmResult>
    function getCharmOutput(args: GetCharmOutputArgs, opts?: InvokeOptions): Output<GetCharmResult>
    def get_charm(architecture: Optional[str] = None,
                  base: Optional[str] = None,
                  channel: Optional[str] = None,
                  charm: Optional[str] = None,
                  revision: Optional[float] = None,
                  store_url: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetCharmResult
    def get_charm_output(architecture: Optional[pulumi.Input[str]] = None,
                  base: Optional[pulumi.Input[str]] = None,
                  channel: Optional[pulumi.Input[str]] = None,
                  charm: Optional[pulumi.Input[str]] = None,
                  revision: Optional[pulumi.Input[float]] = None,
                  store_url: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetCharmResult]
    func GetCharm(ctx *Context, args *GetCharmArgs, opts ...InvokeOption) (*GetCharmResult, error)
    func GetCharmOutput(ctx *Context, args *GetCharmOutputArgs, opts ...InvokeOption) GetCharmResultOutput

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

    public static class GetCharm 
    {
        public static Task<GetCharmResult> InvokeAsync(GetCharmArgs args, InvokeOptions? opts = null)
        public static Output<GetCharmResult> Invoke(GetCharmInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCharmResult> getCharm(GetCharmArgs args, InvokeOptions options)
    public static Output<GetCharmResult> getCharm(GetCharmArgs args, InvokeOptions options)
    
    fn::invoke:
      function: juju:index/getCharm:getCharm
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Charm string
    The name of the charm to look up.
    Architecture string
    The architecture of the charm, e.g. "amd64". Defaults to "amd64" when not set.
    Base string
    The OS base for the charm in the form os@channel, e.g. "ubuntu@22.04".
    Channel string
    The channel to resolve, e.g. "3/stable". Required when revision is set.
    Revision double
    The revision of the charm to fetch.
    StoreUrl string
    Base URL of the charm store. Defaults to https://charmhub.io/.
    Charm string
    The name of the charm to look up.
    Architecture string
    The architecture of the charm, e.g. "amd64". Defaults to "amd64" when not set.
    Base string
    The OS base for the charm in the form os@channel, e.g. "ubuntu@22.04".
    Channel string
    The channel to resolve, e.g. "3/stable". Required when revision is set.
    Revision float64
    The revision of the charm to fetch.
    StoreUrl string
    Base URL of the charm store. Defaults to https://charmhub.io/.
    charm String
    The name of the charm to look up.
    architecture String
    The architecture of the charm, e.g. "amd64". Defaults to "amd64" when not set.
    base String
    The OS base for the charm in the form os@channel, e.g. "ubuntu@22.04".
    channel String
    The channel to resolve, e.g. "3/stable". Required when revision is set.
    revision Double
    The revision of the charm to fetch.
    storeUrl String
    Base URL of the charm store. Defaults to https://charmhub.io/.
    charm string
    The name of the charm to look up.
    architecture string
    The architecture of the charm, e.g. "amd64". Defaults to "amd64" when not set.
    base string
    The OS base for the charm in the form os@channel, e.g. "ubuntu@22.04".
    channel string
    The channel to resolve, e.g. "3/stable". Required when revision is set.
    revision number
    The revision of the charm to fetch.
    storeUrl string
    Base URL of the charm store. Defaults to https://charmhub.io/.
    charm str
    The name of the charm to look up.
    architecture str
    The architecture of the charm, e.g. "amd64". Defaults to "amd64" when not set.
    base str
    The OS base for the charm in the form os@channel, e.g. "ubuntu@22.04".
    channel str
    The channel to resolve, e.g. "3/stable". Required when revision is set.
    revision float
    The revision of the charm to fetch.
    store_url str
    Base URL of the charm store. Defaults to https://charmhub.io/.
    charm String
    The name of the charm to look up.
    architecture String
    The architecture of the charm, e.g. "amd64". Defaults to "amd64" when not set.
    base String
    The OS base for the charm in the form os@channel, e.g. "ubuntu@22.04".
    channel String
    The channel to resolve, e.g. "3/stable". Required when revision is set.
    revision Number
    The revision of the charm to fetch.
    storeUrl String
    Base URL of the charm store. Defaults to https://charmhub.io/.

    getCharm Result

    The following output properties are available:

    Base string
    The OS base for the charm in the form os@channel, e.g. "ubuntu@22.04".
    Channel string
    The channel to resolve, e.g. "3/stable". Required when revision is set.
    Charm string
    The name of the charm to look up.
    Id string
    The provider-assigned unique ID for this managed resource.
    Provides Dictionary<string, string>
    Integrations provided by the charm. Key is the endpoint name, value is the interface name.
    Requires Dictionary<string, string>
    Integrations required by the charm. Key is the endpoint name, value is the interface name.
    Resources Dictionary<string, string>
    OCI/file resources for the charm. Key is the resource name, value is the revision number.
    Revision double
    The revision of the charm to fetch.
    Architecture string
    The architecture of the charm, e.g. "amd64". Defaults to "amd64" when not set.
    StoreUrl string
    Base URL of the charm store. Defaults to https://charmhub.io/.
    Base string
    The OS base for the charm in the form os@channel, e.g. "ubuntu@22.04".
    Channel string
    The channel to resolve, e.g. "3/stable". Required when revision is set.
    Charm string
    The name of the charm to look up.
    Id string
    The provider-assigned unique ID for this managed resource.
    Provides map[string]string
    Integrations provided by the charm. Key is the endpoint name, value is the interface name.
    Requires map[string]string
    Integrations required by the charm. Key is the endpoint name, value is the interface name.
    Resources map[string]string
    OCI/file resources for the charm. Key is the resource name, value is the revision number.
    Revision float64
    The revision of the charm to fetch.
    Architecture string
    The architecture of the charm, e.g. "amd64". Defaults to "amd64" when not set.
    StoreUrl string
    Base URL of the charm store. Defaults to https://charmhub.io/.
    base String
    The OS base for the charm in the form os@channel, e.g. "ubuntu@22.04".
    channel String
    The channel to resolve, e.g. "3/stable". Required when revision is set.
    charm String
    The name of the charm to look up.
    id String
    The provider-assigned unique ID for this managed resource.
    provides Map<String,String>
    Integrations provided by the charm. Key is the endpoint name, value is the interface name.
    requires Map<String,String>
    Integrations required by the charm. Key is the endpoint name, value is the interface name.
    resources Map<String,String>
    OCI/file resources for the charm. Key is the resource name, value is the revision number.
    revision Double
    The revision of the charm to fetch.
    architecture String
    The architecture of the charm, e.g. "amd64". Defaults to "amd64" when not set.
    storeUrl String
    Base URL of the charm store. Defaults to https://charmhub.io/.
    base string
    The OS base for the charm in the form os@channel, e.g. "ubuntu@22.04".
    channel string
    The channel to resolve, e.g. "3/stable". Required when revision is set.
    charm string
    The name of the charm to look up.
    id string
    The provider-assigned unique ID for this managed resource.
    provides {[key: string]: string}
    Integrations provided by the charm. Key is the endpoint name, value is the interface name.
    requires {[key: string]: string}
    Integrations required by the charm. Key is the endpoint name, value is the interface name.
    resources {[key: string]: string}
    OCI/file resources for the charm. Key is the resource name, value is the revision number.
    revision number
    The revision of the charm to fetch.
    architecture string
    The architecture of the charm, e.g. "amd64". Defaults to "amd64" when not set.
    storeUrl string
    Base URL of the charm store. Defaults to https://charmhub.io/.
    base str
    The OS base for the charm in the form os@channel, e.g. "ubuntu@22.04".
    channel str
    The channel to resolve, e.g. "3/stable". Required when revision is set.
    charm str
    The name of the charm to look up.
    id str
    The provider-assigned unique ID for this managed resource.
    provides Mapping[str, str]
    Integrations provided by the charm. Key is the endpoint name, value is the interface name.
    requires Mapping[str, str]
    Integrations required by the charm. Key is the endpoint name, value is the interface name.
    resources Mapping[str, str]
    OCI/file resources for the charm. Key is the resource name, value is the revision number.
    revision float
    The revision of the charm to fetch.
    architecture str
    The architecture of the charm, e.g. "amd64". Defaults to "amd64" when not set.
    store_url str
    Base URL of the charm store. Defaults to https://charmhub.io/.
    base String
    The OS base for the charm in the form os@channel, e.g. "ubuntu@22.04".
    channel String
    The channel to resolve, e.g. "3/stable". Required when revision is set.
    charm String
    The name of the charm to look up.
    id String
    The provider-assigned unique ID for this managed resource.
    provides Map<String>
    Integrations provided by the charm. Key is the endpoint name, value is the interface name.
    requires Map<String>
    Integrations required by the charm. Key is the endpoint name, value is the interface name.
    resources Map<String>
    OCI/file resources for the charm. Key is the resource name, value is the revision number.
    revision Number
    The revision of the charm to fetch.
    architecture String
    The architecture of the charm, e.g. "amd64". Defaults to "amd64" when not set.
    storeUrl String
    Base URL of the charm store. Defaults to https://charmhub.io/.

    Package Details

    Repository
    juju juju/terraform-provider-juju
    License
    Notes
    This Pulumi package is based on the juju Terraform Provider.
    juju logo
    Viewing docs for juju 1.4.0-rc1
    published on Tuesday, Mar 24, 2026 by juju
      Try Pulumi Cloud free. Your team will thank you.