Use the model data source to retrieve information about an existing Juju model. This is useful when you need to reference model attributes such as the model UUID in other resources.
Models can be looked up either by their UUID or a combination of name and owner e.g. admin/myModel. The owner is the user that created the model and can be found with the ‘juju show-model’ command.
Using getModel
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 getModel(args: GetModelArgs, opts?: InvokeOptions): Promise<GetModelResult>
function getModelOutput(args: GetModelOutputArgs, opts?: InvokeOptions): Output<GetModelResult>def get_model(name: Optional[str] = None,
owner: Optional[str] = None,
uuid: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetModelResult
def get_model_output(name: Optional[pulumi.Input[str]] = None,
owner: Optional[pulumi.Input[str]] = None,
uuid: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetModelResult]func LookupModel(ctx *Context, args *LookupModelArgs, opts ...InvokeOption) (*LookupModelResult, error)
func LookupModelOutput(ctx *Context, args *LookupModelOutputArgs, opts ...InvokeOption) LookupModelResultOutput> Note: This function is named LookupModel in the Go SDK.
public static class GetModel
{
public static Task<GetModelResult> InvokeAsync(GetModelArgs args, InvokeOptions? opts = null)
public static Output<GetModelResult> Invoke(GetModelInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetModelResult> getModel(GetModelArgs args, InvokeOptions options)
public static Output<GetModelResult> getModel(GetModelArgs args, InvokeOptions options)
fn::invoke:
function: juju:index/getModel:getModel
arguments:
# arguments dictionaryThe following arguments are supported:
getModel Result
The following output properties are available:
Package Details
- Repository
- juju juju/terraform-provider-juju
- License
- Notes
- This Pulumi package is based on the
jujuTerraform Provider.
