1. Packages
  2. Juju Provider
  3. API Docs
  4. getOffer
juju 0.18.0 published on Monday, Apr 14, 2025 by juju

juju.getOffer

Explore with Pulumi AI

juju 0.18.0 published on Monday, Apr 14, 2025 by juju

A data source representing a Juju Offer.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as juju from "@pulumi/juju";

const _this = juju.getOffer({
    url: "admin/development.mysql",
});
Copy
import pulumi
import pulumi_juju as juju

this = juju.get_offer(url="admin/development.mysql")
Copy
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.LookupOffer(ctx, &juju.LookupOfferArgs{
			Url: "admin/development.mysql",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Juju = Pulumi.Juju;

return await Deployment.RunAsync(() => 
{
    var @this = Juju.GetOffer.Invoke(new()
    {
        Url = "admin/development.mysql",
    });

});
Copy
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.GetOfferArgs;
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.getOffer(GetOfferArgs.builder()
            .url("admin/development.mysql")
            .build());

    }
}
Copy
variables:
  this:
    fn::invoke:
      function: juju:getOffer
      arguments:
        url: admin/development.mysql
Copy

Using getOffer

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 getOffer(args: GetOfferArgs, opts?: InvokeOptions): Promise<GetOfferResult>
function getOfferOutput(args: GetOfferOutputArgs, opts?: InvokeOptions): Output<GetOfferResult>
Copy
def get_offer(url: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetOfferResult
def get_offer_output(url: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetOfferResult]
Copy
func LookupOffer(ctx *Context, args *LookupOfferArgs, opts ...InvokeOption) (*LookupOfferResult, error)
func LookupOfferOutput(ctx *Context, args *LookupOfferOutputArgs, opts ...InvokeOption) LookupOfferResultOutput
Copy

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

public static class GetOffer 
{
    public static Task<GetOfferResult> InvokeAsync(GetOfferArgs args, InvokeOptions? opts = null)
    public static Output<GetOfferResult> Invoke(GetOfferInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOfferResult> getOffer(GetOfferArgs args, InvokeOptions options)
public static Output<GetOfferResult> getOffer(GetOfferArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: juju:index/getOffer:getOffer
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Url This property is required. string
The offer URL.
Url This property is required. string
The offer URL.
url This property is required. String
The offer URL.
url This property is required. string
The offer URL.
url This property is required. str
The offer URL.
url This property is required. String
The offer URL.

getOffer Result

The following output properties are available:

ApplicationName string
The name of the application.
Endpoint string
The endpoint name.
Id string
The ID of this resource.
Model string
The name of the model to operate in.
Name string
The name of the offer.
Url string
The offer URL.
ApplicationName string
The name of the application.
Endpoint string
The endpoint name.
Id string
The ID of this resource.
Model string
The name of the model to operate in.
Name string
The name of the offer.
Url string
The offer URL.
applicationName String
The name of the application.
endpoint String
The endpoint name.
id String
The ID of this resource.
model String
The name of the model to operate in.
name String
The name of the offer.
url String
The offer URL.
applicationName string
The name of the application.
endpoint string
The endpoint name.
id string
The ID of this resource.
model string
The name of the model to operate in.
name string
The name of the offer.
url string
The offer URL.
application_name str
The name of the application.
endpoint str
The endpoint name.
id str
The ID of this resource.
model str
The name of the model to operate in.
name str
The name of the offer.
url str
The offer URL.
applicationName String
The name of the application.
endpoint String
The endpoint name.
id String
The ID of this resource.
model String
The name of the model to operate in.
name String
The name of the offer.
url String
The offer URL.

Package Details

Repository
juju juju/terraform-provider-juju
License
Notes
This Pulumi package is based on the juju Terraform Provider.
juju 0.18.0 published on Monday, Apr 14, 2025 by juju