1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. apigee
  5. EndpointAttachment
Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi

gcp.apigee.EndpointAttachment

Explore with Pulumi AI

gcp logo
Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi

    Apigee Endpoint Attachment.

    To get more information about EndpointAttachment, see:

    Example Usage

    Apigee Endpoint Attachment Basic

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Gcp.Organizations.GetClientConfig.Invoke();
    
        var apigeeNetwork = new Gcp.Compute.Network("apigeeNetwork");
    
        var apigeeRange = new Gcp.Compute.GlobalAddress("apigeeRange", new()
        {
            Purpose = "VPC_PEERING",
            AddressType = "INTERNAL",
            PrefixLength = 16,
            Network = apigeeNetwork.Id,
        });
    
        var apigeeVpcConnection = new Gcp.ServiceNetworking.Connection("apigeeVpcConnection", new()
        {
            Network = apigeeNetwork.Id,
            Service = "servicenetworking.googleapis.com",
            ReservedPeeringRanges = new[]
            {
                apigeeRange.Name,
            },
        });
    
        var apigeeOrg = new Gcp.Apigee.Organization("apigeeOrg", new()
        {
            AnalyticsRegion = "us-central1",
            ProjectId = current.Apply(getClientConfigResult => getClientConfigResult.Project),
            AuthorizedNetwork = apigeeNetwork.Id,
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                apigeeVpcConnection,
            },
        });
    
        var apigeeEndpointAttachment = new Gcp.Apigee.EndpointAttachment("apigeeEndpointAttachment", new()
        {
            OrgId = apigeeOrg.Id,
            EndpointAttachmentId = "test1",
            Location = "{google_compute_service_attachment location}",
            ServiceAttachment = "{google_compute_service_attachment id}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/apigee"
    	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
    	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicenetworking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		current, err := organizations.GetClientConfig(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		apigeeNetwork, err := compute.NewNetwork(ctx, "apigeeNetwork", nil)
    		if err != nil {
    			return err
    		}
    		apigeeRange, err := compute.NewGlobalAddress(ctx, "apigeeRange", &compute.GlobalAddressArgs{
    			Purpose:      pulumi.String("VPC_PEERING"),
    			AddressType:  pulumi.String("INTERNAL"),
    			PrefixLength: pulumi.Int(16),
    			Network:      apigeeNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		apigeeVpcConnection, err := servicenetworking.NewConnection(ctx, "apigeeVpcConnection", &servicenetworking.ConnectionArgs{
    			Network: apigeeNetwork.ID(),
    			Service: pulumi.String("servicenetworking.googleapis.com"),
    			ReservedPeeringRanges: pulumi.StringArray{
    				apigeeRange.Name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		apigeeOrg, err := apigee.NewOrganization(ctx, "apigeeOrg", &apigee.OrganizationArgs{
    			AnalyticsRegion:   pulumi.String("us-central1"),
    			ProjectId:         *pulumi.String(current.Project),
    			AuthorizedNetwork: apigeeNetwork.ID(),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			apigeeVpcConnection,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = apigee.NewEndpointAttachment(ctx, "apigeeEndpointAttachment", &apigee.EndpointAttachmentArgs{
    			OrgId:                apigeeOrg.ID(),
    			EndpointAttachmentId: pulumi.String("test1"),
    			Location:             pulumi.String("{google_compute_service_attachment location}"),
    			ServiceAttachment:    pulumi.String("{google_compute_service_attachment id}"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.organizations.OrganizationsFunctions;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.GlobalAddress;
    import com.pulumi.gcp.compute.GlobalAddressArgs;
    import com.pulumi.gcp.servicenetworking.Connection;
    import com.pulumi.gcp.servicenetworking.ConnectionArgs;
    import com.pulumi.gcp.apigee.Organization;
    import com.pulumi.gcp.apigee.OrganizationArgs;
    import com.pulumi.gcp.apigee.EndpointAttachment;
    import com.pulumi.gcp.apigee.EndpointAttachmentArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 current = OrganizationsFunctions.getClientConfig();
    
            var apigeeNetwork = new Network("apigeeNetwork");
    
            var apigeeRange = new GlobalAddress("apigeeRange", GlobalAddressArgs.builder()        
                .purpose("VPC_PEERING")
                .addressType("INTERNAL")
                .prefixLength(16)
                .network(apigeeNetwork.id())
                .build());
    
            var apigeeVpcConnection = new Connection("apigeeVpcConnection", ConnectionArgs.builder()        
                .network(apigeeNetwork.id())
                .service("servicenetworking.googleapis.com")
                .reservedPeeringRanges(apigeeRange.name())
                .build());
    
            var apigeeOrg = new Organization("apigeeOrg", OrganizationArgs.builder()        
                .analyticsRegion("us-central1")
                .projectId(current.applyValue(getClientConfigResult -> getClientConfigResult.project()))
                .authorizedNetwork(apigeeNetwork.id())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(apigeeVpcConnection)
                    .build());
    
            var apigeeEndpointAttachment = new EndpointAttachment("apigeeEndpointAttachment", EndpointAttachmentArgs.builder()        
                .orgId(apigeeOrg.id())
                .endpointAttachmentId("test1")
                .location("{google_compute_service_attachment location}")
                .serviceAttachment("{google_compute_service_attachment id}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    current = gcp.organizations.get_client_config()
    apigee_network = gcp.compute.Network("apigeeNetwork")
    apigee_range = gcp.compute.GlobalAddress("apigeeRange",
        purpose="VPC_PEERING",
        address_type="INTERNAL",
        prefix_length=16,
        network=apigee_network.id)
    apigee_vpc_connection = gcp.servicenetworking.Connection("apigeeVpcConnection",
        network=apigee_network.id,
        service="servicenetworking.googleapis.com",
        reserved_peering_ranges=[apigee_range.name])
    apigee_org = gcp.apigee.Organization("apigeeOrg",
        analytics_region="us-central1",
        project_id=current.project,
        authorized_network=apigee_network.id,
        opts=pulumi.ResourceOptions(depends_on=[apigee_vpc_connection]))
    apigee_endpoint_attachment = gcp.apigee.EndpointAttachment("apigeeEndpointAttachment",
        org_id=apigee_org.id,
        endpoint_attachment_id="test1",
        location="{google_compute_service_attachment location}",
        service_attachment="{google_compute_service_attachment id}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const current = gcp.organizations.getClientConfig({});
    const apigeeNetwork = new gcp.compute.Network("apigeeNetwork", {});
    const apigeeRange = new gcp.compute.GlobalAddress("apigeeRange", {
        purpose: "VPC_PEERING",
        addressType: "INTERNAL",
        prefixLength: 16,
        network: apigeeNetwork.id,
    });
    const apigeeVpcConnection = new gcp.servicenetworking.Connection("apigeeVpcConnection", {
        network: apigeeNetwork.id,
        service: "servicenetworking.googleapis.com",
        reservedPeeringRanges: [apigeeRange.name],
    });
    const apigeeOrg = new gcp.apigee.Organization("apigeeOrg", {
        analyticsRegion: "us-central1",
        projectId: current.then(current => current.project),
        authorizedNetwork: apigeeNetwork.id,
    }, {
        dependsOn: [apigeeVpcConnection],
    });
    const apigeeEndpointAttachment = new gcp.apigee.EndpointAttachment("apigeeEndpointAttachment", {
        orgId: apigeeOrg.id,
        endpointAttachmentId: "test1",
        location: "{google_compute_service_attachment location}",
        serviceAttachment: "{google_compute_service_attachment id}",
    });
    
    resources:
      apigeeNetwork:
        type: gcp:compute:Network
      apigeeRange:
        type: gcp:compute:GlobalAddress
        properties:
          purpose: VPC_PEERING
          addressType: INTERNAL
          prefixLength: 16
          network: ${apigeeNetwork.id}
      apigeeVpcConnection:
        type: gcp:servicenetworking:Connection
        properties:
          network: ${apigeeNetwork.id}
          service: servicenetworking.googleapis.com
          reservedPeeringRanges:
            - ${apigeeRange.name}
      apigeeOrg:
        type: gcp:apigee:Organization
        properties:
          analyticsRegion: us-central1
          projectId: ${current.project}
          authorizedNetwork: ${apigeeNetwork.id}
        options:
          dependson:
            - ${apigeeVpcConnection}
      apigeeEndpointAttachment:
        type: gcp:apigee:EndpointAttachment
        properties:
          orgId: ${apigeeOrg.id}
          endpointAttachmentId: test1
          location: '{google_compute_service_attachment location}'
          serviceAttachment: '{google_compute_service_attachment id}'
    variables:
      current:
        fn::invoke:
          Function: gcp:organizations:getClientConfig
          Arguments: {}
    

    Create EndpointAttachment Resource

    new EndpointAttachment(name: string, args: EndpointAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def EndpointAttachment(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           endpoint_attachment_id: Optional[str] = None,
                           location: Optional[str] = None,
                           org_id: Optional[str] = None,
                           service_attachment: Optional[str] = None)
    @overload
    def EndpointAttachment(resource_name: str,
                           args: EndpointAttachmentArgs,
                           opts: Optional[ResourceOptions] = None)
    func NewEndpointAttachment(ctx *Context, name string, args EndpointAttachmentArgs, opts ...ResourceOption) (*EndpointAttachment, error)
    public EndpointAttachment(string name, EndpointAttachmentArgs args, CustomResourceOptions? opts = null)
    public EndpointAttachment(String name, EndpointAttachmentArgs args)
    public EndpointAttachment(String name, EndpointAttachmentArgs args, CustomResourceOptions options)
    
    type: gcp:apigee:EndpointAttachment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args EndpointAttachmentArgs
    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 EndpointAttachmentArgs
    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 EndpointAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EndpointAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EndpointAttachmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    EndpointAttachment Resource Properties

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

    Inputs

    The EndpointAttachment resource accepts the following input properties:

    EndpointAttachmentId string

    ID of the endpoint attachment.


    Location string

    Location of the endpoint attachment.

    OrgId string

    The Apigee Organization associated with the Apigee instance, in the format organizations/{{org_name}}.

    ServiceAttachment string

    Format: projects//regions//serviceAttachments/*

    EndpointAttachmentId string

    ID of the endpoint attachment.


    Location string

    Location of the endpoint attachment.

    OrgId string

    The Apigee Organization associated with the Apigee instance, in the format organizations/{{org_name}}.

    ServiceAttachment string

    Format: projects//regions//serviceAttachments/*

    endpointAttachmentId String

    ID of the endpoint attachment.


    location String

    Location of the endpoint attachment.

    orgId String

    The Apigee Organization associated with the Apigee instance, in the format organizations/{{org_name}}.

    serviceAttachment String

    Format: projects//regions//serviceAttachments/*

    endpointAttachmentId string

    ID of the endpoint attachment.


    location string

    Location of the endpoint attachment.

    orgId string

    The Apigee Organization associated with the Apigee instance, in the format organizations/{{org_name}}.

    serviceAttachment string

    Format: projects//regions//serviceAttachments/*

    endpoint_attachment_id str

    ID of the endpoint attachment.


    location str

    Location of the endpoint attachment.

    org_id str

    The Apigee Organization associated with the Apigee instance, in the format organizations/{{org_name}}.

    service_attachment str

    Format: projects//regions//serviceAttachments/*

    endpointAttachmentId String

    ID of the endpoint attachment.


    location String

    Location of the endpoint attachment.

    orgId String

    The Apigee Organization associated with the Apigee instance, in the format organizations/{{org_name}}.

    serviceAttachment String

    Format: projects//regions//serviceAttachments/*

    Outputs

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

    ConnectionState string

    State of the endpoint attachment connection to the service attachment.

    Host string

    Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string

    Name of the Endpoint Attachment in the following format: organizations/{organization}/endpointAttachments/{endpointAttachment}.

    ConnectionState string

    State of the endpoint attachment connection to the service attachment.

    Host string

    Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string

    Name of the Endpoint Attachment in the following format: organizations/{organization}/endpointAttachments/{endpointAttachment}.

    connectionState String

    State of the endpoint attachment connection to the service attachment.

    host String

    Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.

    id String

    The provider-assigned unique ID for this managed resource.

    name String

    Name of the Endpoint Attachment in the following format: organizations/{organization}/endpointAttachments/{endpointAttachment}.

    connectionState string

    State of the endpoint attachment connection to the service attachment.

    host string

    Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.

    id string

    The provider-assigned unique ID for this managed resource.

    name string

    Name of the Endpoint Attachment in the following format: organizations/{organization}/endpointAttachments/{endpointAttachment}.

    connection_state str

    State of the endpoint attachment connection to the service attachment.

    host str

    Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.

    id str

    The provider-assigned unique ID for this managed resource.

    name str

    Name of the Endpoint Attachment in the following format: organizations/{organization}/endpointAttachments/{endpointAttachment}.

    connectionState String

    State of the endpoint attachment connection to the service attachment.

    host String

    Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.

    id String

    The provider-assigned unique ID for this managed resource.

    name String

    Name of the Endpoint Attachment in the following format: organizations/{organization}/endpointAttachments/{endpointAttachment}.

    Look up Existing EndpointAttachment Resource

    Get an existing EndpointAttachment 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?: EndpointAttachmentState, opts?: CustomResourceOptions): EndpointAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connection_state: Optional[str] = None,
            endpoint_attachment_id: Optional[str] = None,
            host: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            service_attachment: Optional[str] = None) -> EndpointAttachment
    func GetEndpointAttachment(ctx *Context, name string, id IDInput, state *EndpointAttachmentState, opts ...ResourceOption) (*EndpointAttachment, error)
    public static EndpointAttachment Get(string name, Input<string> id, EndpointAttachmentState? state, CustomResourceOptions? opts = null)
    public static EndpointAttachment get(String name, Output<String> id, EndpointAttachmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    ConnectionState string

    State of the endpoint attachment connection to the service attachment.

    EndpointAttachmentId string

    ID of the endpoint attachment.


    Host string

    Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.

    Location string

    Location of the endpoint attachment.

    Name string

    Name of the Endpoint Attachment in the following format: organizations/{organization}/endpointAttachments/{endpointAttachment}.

    OrgId string

    The Apigee Organization associated with the Apigee instance, in the format organizations/{{org_name}}.

    ServiceAttachment string

    Format: projects//regions//serviceAttachments/*

    ConnectionState string

    State of the endpoint attachment connection to the service attachment.

    EndpointAttachmentId string

    ID of the endpoint attachment.


    Host string

    Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.

    Location string

    Location of the endpoint attachment.

    Name string

    Name of the Endpoint Attachment in the following format: organizations/{organization}/endpointAttachments/{endpointAttachment}.

    OrgId string

    The Apigee Organization associated with the Apigee instance, in the format organizations/{{org_name}}.

    ServiceAttachment string

    Format: projects//regions//serviceAttachments/*

    connectionState String

    State of the endpoint attachment connection to the service attachment.

    endpointAttachmentId String

    ID of the endpoint attachment.


    host String

    Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.

    location String

    Location of the endpoint attachment.

    name String

    Name of the Endpoint Attachment in the following format: organizations/{organization}/endpointAttachments/{endpointAttachment}.

    orgId String

    The Apigee Organization associated with the Apigee instance, in the format organizations/{{org_name}}.

    serviceAttachment String

    Format: projects//regions//serviceAttachments/*

    connectionState string

    State of the endpoint attachment connection to the service attachment.

    endpointAttachmentId string

    ID of the endpoint attachment.


    host string

    Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.

    location string

    Location of the endpoint attachment.

    name string

    Name of the Endpoint Attachment in the following format: organizations/{organization}/endpointAttachments/{endpointAttachment}.

    orgId string

    The Apigee Organization associated with the Apigee instance, in the format organizations/{{org_name}}.

    serviceAttachment string

    Format: projects//regions//serviceAttachments/*

    connection_state str

    State of the endpoint attachment connection to the service attachment.

    endpoint_attachment_id str

    ID of the endpoint attachment.


    host str

    Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.

    location str

    Location of the endpoint attachment.

    name str

    Name of the Endpoint Attachment in the following format: organizations/{organization}/endpointAttachments/{endpointAttachment}.

    org_id str

    The Apigee Organization associated with the Apigee instance, in the format organizations/{{org_name}}.

    service_attachment str

    Format: projects//regions//serviceAttachments/*

    connectionState String

    State of the endpoint attachment connection to the service attachment.

    endpointAttachmentId String

    ID of the endpoint attachment.


    host String

    Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.

    location String

    Location of the endpoint attachment.

    name String

    Name of the Endpoint Attachment in the following format: organizations/{organization}/endpointAttachments/{endpointAttachment}.

    orgId String

    The Apigee Organization associated with the Apigee instance, in the format organizations/{{org_name}}.

    serviceAttachment String

    Format: projects//regions//serviceAttachments/*

    Import

    EndpointAttachment can be imported using any of these accepted formats

     $ pulumi import gcp:apigee/endpointAttachment:EndpointAttachment default {{org_id}}/endpointAttachments/{{endpoint_attachment_id}}
    
     $ pulumi import gcp:apigee/endpointAttachment:EndpointAttachment default {{org_id}}/{{endpoint_attachment_id}}
    

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the google-beta Terraform Provider.

    gcp logo
    Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi