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

juju.Integration

Explore with Pulumi AI

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

    A resource that represents a Juju Integration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as juju from "@pulumi/juju";
    
    const _this = new juju.Integration("this", {
        model: juju_model.development.name,
        via: "10.0.0.0/24,10.0.1.0/24",
        applications: [
            {
                name: juju_application.wordpress.name,
                endpoint: "db",
            },
            {
                name: juju_application["percona-cluster"].name,
                endpoint: "server",
            },
        ],
    });
    
    import pulumi
    import pulumi_juju as juju
    
    this = juju.Integration("this",
        model=juju_model["development"]["name"],
        via="10.0.0.0/24,10.0.1.0/24",
        applications=[
            {
                "name": juju_application["wordpress"]["name"],
                "endpoint": "db",
            },
            {
                "name": juju_application["percona-cluster"]["name"],
                "endpoint": "server",
            },
        ])
    
    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.NewIntegration(ctx, "this", &juju.IntegrationArgs{
    			Model: pulumi.Any(juju_model.Development.Name),
    			Via:   pulumi.String("10.0.0.0/24,10.0.1.0/24"),
    			Applications: juju.IntegrationApplicationArray{
    				&juju.IntegrationApplicationArgs{
    					Name:     pulumi.Any(juju_application.Wordpress.Name),
    					Endpoint: pulumi.String("db"),
    				},
    				&juju.IntegrationApplicationArgs{
    					Name:     pulumi.Any(juju_application.PerconaCluster.Name),
    					Endpoint: pulumi.String("server"),
    				},
    			},
    		})
    		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.Integration("this", new()
        {
            Model = juju_model.Development.Name,
            Via = "10.0.0.0/24,10.0.1.0/24",
            Applications = new[]
            {
                new Juju.Inputs.IntegrationApplicationArgs
                {
                    Name = juju_application.Wordpress.Name,
                    Endpoint = "db",
                },
                new Juju.Inputs.IntegrationApplicationArgs
                {
                    Name = juju_application.Percona_cluster.Name,
                    Endpoint = "server",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.juju.Integration;
    import com.pulumi.juju.IntegrationArgs;
    import com.pulumi.juju.inputs.IntegrationApplicationArgs;
    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 Integration("this", IntegrationArgs.builder()
                .model(juju_model.development().name())
                .via("10.0.0.0/24,10.0.1.0/24")
                .applications(            
                    IntegrationApplicationArgs.builder()
                        .name(juju_application.wordpress().name())
                        .endpoint("db")
                        .build(),
                    IntegrationApplicationArgs.builder()
                        .name(juju_application.percona-cluster().name())
                        .endpoint("server")
                        .build())
                .build());
    
        }
    }
    
    resources:
      this:
        type: juju:Integration
        properties:
          model: ${juju_model.development.name}
          via: 10.0.0.0/24,10.0.1.0/24
          applications:
            - name: ${juju_application.wordpress.name}
              endpoint: db
            - name: ${juju_application"percona-cluster"[%!s(MISSING)].name}
              endpoint: server
    

    Create Integration Resource

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

    Constructor syntax

    new Integration(name: string, args: IntegrationArgs, opts?: CustomResourceOptions);
    @overload
    def Integration(resource_name: str,
                    args: IntegrationArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Integration(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    model: Optional[str] = None,
                    applications: Optional[Sequence[IntegrationApplicationArgs]] = None,
                    via: Optional[str] = None)
    func NewIntegration(ctx *Context, name string, args IntegrationArgs, opts ...ResourceOption) (*Integration, error)
    public Integration(string name, IntegrationArgs args, CustomResourceOptions? opts = null)
    public Integration(String name, IntegrationArgs args)
    public Integration(String name, IntegrationArgs args, CustomResourceOptions options)
    
    type: juju:Integration
    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 IntegrationArgs
    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 IntegrationArgs
    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 IntegrationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IntegrationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IntegrationArgs
    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 integrationResource = new Juju.Integration("integrationResource", new()
    {
        Model = "string",
        Applications = new[]
        {
            new Juju.Inputs.IntegrationApplicationArgs
            {
                Endpoint = "string",
                Name = "string",
                OfferUrl = "string",
            },
        },
        Via = "string",
    });
    
    example, err := juju.NewIntegration(ctx, "integrationResource", &juju.IntegrationArgs{
    	Model: pulumi.String("string"),
    	Applications: juju.IntegrationApplicationArray{
    		&juju.IntegrationApplicationArgs{
    			Endpoint: pulumi.String("string"),
    			Name:     pulumi.String("string"),
    			OfferUrl: pulumi.String("string"),
    		},
    	},
    	Via: pulumi.String("string"),
    })
    
    var integrationResource = new Integration("integrationResource", IntegrationArgs.builder()
        .model("string")
        .applications(IntegrationApplicationArgs.builder()
            .endpoint("string")
            .name("string")
            .offerUrl("string")
            .build())
        .via("string")
        .build());
    
    integration_resource = juju.Integration("integrationResource",
        model="string",
        applications=[{
            "endpoint": "string",
            "name": "string",
            "offer_url": "string",
        }],
        via="string")
    
    const integrationResource = new juju.Integration("integrationResource", {
        model: "string",
        applications: [{
            endpoint: "string",
            name: "string",
            offerUrl: "string",
        }],
        via: "string",
    });
    
    type: juju:Integration
    properties:
        applications:
            - endpoint: string
              name: string
              offerUrl: string
        model: string
        via: string
    

    Integration 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 Integration resource accepts the following input properties:

    Model string
    The name of the model to operate in.
    Applications List<IntegrationApplication>
    The two applications to integrate.
    Via string
    A comma separated list of CIDRs for outbound traffic.
    Model string
    The name of the model to operate in.
    Applications []IntegrationApplicationArgs
    The two applications to integrate.
    Via string
    A comma separated list of CIDRs for outbound traffic.
    model String
    The name of the model to operate in.
    applications List<IntegrationApplication>
    The two applications to integrate.
    via String
    A comma separated list of CIDRs for outbound traffic.
    model string
    The name of the model to operate in.
    applications IntegrationApplication[]
    The two applications to integrate.
    via string
    A comma separated list of CIDRs for outbound traffic.
    model str
    The name of the model to operate in.
    applications Sequence[IntegrationApplicationArgs]
    The two applications to integrate.
    via str
    A comma separated list of CIDRs for outbound traffic.
    model String
    The name of the model to operate in.
    applications List<Property Map>
    The two applications to integrate.
    via String
    A comma separated list of CIDRs for outbound traffic.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Integration Resource

    Get an existing Integration 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?: IntegrationState, opts?: CustomResourceOptions): Integration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            applications: Optional[Sequence[IntegrationApplicationArgs]] = None,
            model: Optional[str] = None,
            via: Optional[str] = None) -> Integration
    func GetIntegration(ctx *Context, name string, id IDInput, state *IntegrationState, opts ...ResourceOption) (*Integration, error)
    public static Integration Get(string name, Input<string> id, IntegrationState? state, CustomResourceOptions? opts = null)
    public static Integration get(String name, Output<String> id, IntegrationState state, CustomResourceOptions options)
    resources:  _:    type: juju:Integration    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:
    Applications List<IntegrationApplication>
    The two applications to integrate.
    Model string
    The name of the model to operate in.
    Via string
    A comma separated list of CIDRs for outbound traffic.
    Applications []IntegrationApplicationArgs
    The two applications to integrate.
    Model string
    The name of the model to operate in.
    Via string
    A comma separated list of CIDRs for outbound traffic.
    applications List<IntegrationApplication>
    The two applications to integrate.
    model String
    The name of the model to operate in.
    via String
    A comma separated list of CIDRs for outbound traffic.
    applications IntegrationApplication[]
    The two applications to integrate.
    model string
    The name of the model to operate in.
    via string
    A comma separated list of CIDRs for outbound traffic.
    applications Sequence[IntegrationApplicationArgs]
    The two applications to integrate.
    model str
    The name of the model to operate in.
    via str
    A comma separated list of CIDRs for outbound traffic.
    applications List<Property Map>
    The two applications to integrate.
    model String
    The name of the model to operate in.
    via String
    A comma separated list of CIDRs for outbound traffic.

    Supporting Types

    IntegrationApplication, IntegrationApplicationArgs

    Endpoint string
    The endpoint name. This attribute may not be used at the same time as the offer_url.
    Name string
    The name of the application. This attribute may not be used at the same time as the offer_url.
    OfferUrl string
    The URL of a remote application. This attribute may not be used at the same time as name and endpoint.
    Endpoint string
    The endpoint name. This attribute may not be used at the same time as the offer_url.
    Name string
    The name of the application. This attribute may not be used at the same time as the offer_url.
    OfferUrl string
    The URL of a remote application. This attribute may not be used at the same time as name and endpoint.
    endpoint String
    The endpoint name. This attribute may not be used at the same time as the offer_url.
    name String
    The name of the application. This attribute may not be used at the same time as the offer_url.
    offerUrl String
    The URL of a remote application. This attribute may not be used at the same time as name and endpoint.
    endpoint string
    The endpoint name. This attribute may not be used at the same time as the offer_url.
    name string
    The name of the application. This attribute may not be used at the same time as the offer_url.
    offerUrl string
    The URL of a remote application. This attribute may not be used at the same time as name and endpoint.
    endpoint str
    The endpoint name. This attribute may not be used at the same time as the offer_url.
    name str
    The name of the application. This attribute may not be used at the same time as the offer_url.
    offer_url str
    The URL of a remote application. This attribute may not be used at the same time as name and endpoint.
    endpoint String
    The endpoint name. This attribute may not be used at the same time as the offer_url.
    name String
    The name of the application. This attribute may not be used at the same time as the offer_url.
    offerUrl String
    The URL of a remote application. This attribute may not be used at the same time as name and endpoint.

    Import

    Integrations can be imported by using the format: model_name:provider_app_name:endpoint:requirer_app_name:endpoint, for example:

    $ pulumi import juju:index/integration:Integration wordpress_db development:percona-cluster:server:wordpress:db
    

    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