1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. memorystore
  5. InstanceDesiredUserCreatedEndpoints
Google Cloud v8.29.0 published on Thursday, May 1, 2025 by Pulumi

gcp.memorystore.InstanceDesiredUserCreatedEndpoints

Explore with Pulumi AI

gcp logo
Google Cloud v8.29.0 published on Thursday, May 1, 2025 by Pulumi

    Example Usage

    Memorystore Instance Desired User Created Endpoints

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const network1 = new gcp.compute.Network("network1", {
        name: "net1",
        autoCreateSubnetworks: false,
    });
    const subnetNetwork1 = new gcp.compute.Subnetwork("subnet_network1", {
        name: "subnet-net1",
        ipCidrRange: "10.0.0.248/29",
        region: "us-central1",
        network: network1.id,
    });
    const ip1Network1 = new gcp.compute.Address("ip1_network1", {
        name: "ip1-net1",
        region: "us-central1",
        subnetwork: subnetNetwork1.id,
        addressType: "INTERNAL",
        purpose: "GCE_ENDPOINT",
    });
    //Valkey instance without endpoints
    const instance_user_connInstance = new gcp.memorystore.Instance("instance-user-conn", {
        instanceId: "instance-user-conn",
        shardCount: 1,
        location: "us-central1",
        deletionProtectionEnabled: false,
    });
    const forwardingRule1Network1 = new gcp.compute.ForwardingRule("forwarding_rule1_network1", {
        name: "fwd1-net1",
        region: "us-central1",
        ipAddress: ip1Network1.id,
        loadBalancingScheme: "",
        network: network1.id,
        target: instance_user_connInstance.pscAttachmentDetails.apply(pscAttachmentDetails => pscAttachmentDetails[0].serviceAttachment),
    });
    const ip2Network1 = new gcp.compute.Address("ip2_network1", {
        name: "ip2-net1",
        region: "us-central1",
        subnetwork: subnetNetwork1.id,
        addressType: "INTERNAL",
        purpose: "GCE_ENDPOINT",
    });
    const forwardingRule2Network1 = new gcp.compute.ForwardingRule("forwarding_rule2_network1", {
        name: "fwd2-net1",
        region: "us-central1",
        ipAddress: ip2Network1.id,
        loadBalancingScheme: "",
        network: network1.id,
        target: instance_user_connInstance.pscAttachmentDetails.apply(pscAttachmentDetails => pscAttachmentDetails[1].serviceAttachment),
    });
    const network2 = new gcp.compute.Network("network2", {
        name: "network2",
        autoCreateSubnetworks: false,
    });
    const subnetNetwork2 = new gcp.compute.Subnetwork("subnet_network2", {
        name: "subnet-net2",
        ipCidrRange: "10.0.0.248/29",
        region: "us-central1",
        network: network2.id,
    });
    const ip1Network2 = new gcp.compute.Address("ip1_network2", {
        name: "ip1-net2",
        region: "us-central1",
        subnetwork: subnetNetwork2.id,
        addressType: "INTERNAL",
        purpose: "GCE_ENDPOINT",
    });
    const forwardingRule1Network2 = new gcp.compute.ForwardingRule("forwarding_rule1_network2", {
        name: "fwd1-net2",
        region: "us-central1",
        ipAddress: ip1Network2.id,
        loadBalancingScheme: "",
        network: network2.id,
        target: instance_user_connInstance.pscAttachmentDetails.apply(pscAttachmentDetails => pscAttachmentDetails[0].serviceAttachment),
    });
    const ip2Network2 = new gcp.compute.Address("ip2_network2", {
        name: "ip2-net2",
        region: "us-central1",
        subnetwork: subnetNetwork2.id,
        addressType: "INTERNAL",
        purpose: "GCE_ENDPOINT",
    });
    const forwardingRule2Network2 = new gcp.compute.ForwardingRule("forwarding_rule2_network2", {
        name: "fwd2-net2",
        region: "us-central1",
        ipAddress: ip2Network2.id,
        loadBalancingScheme: "",
        network: network2.id,
        target: instance_user_connInstance.pscAttachmentDetails.apply(pscAttachmentDetails => pscAttachmentDetails[1].serviceAttachment),
    });
    const instance_user_conn = new gcp.memorystore.InstanceDesiredUserCreatedEndpoints("instance-user-conn", {
        name: "instance-user-conn",
        region: "us-central1",
        desiredUserCreatedEndpoints: [
            {
                connections: [
                    {
                        pscConnection: {
                            pscConnectionId: forwardingRule1Network1.pscConnectionId,
                            ipAddress: ip1Network1.address,
                            forwardingRule: forwardingRule1Network1.id,
                            network: network1.id,
                            serviceAttachment: instance_user_connInstance.pscAttachmentDetails.apply(pscAttachmentDetails => pscAttachmentDetails[0].serviceAttachment),
                        },
                    },
                    {
                        pscConnection: {
                            pscConnectionId: forwardingRule2Network1.pscConnectionId,
                            ipAddress: ip2Network1.address,
                            forwardingRule: forwardingRule2Network1.id,
                            network: network1.id,
                            serviceAttachment: instance_user_connInstance.pscAttachmentDetails.apply(pscAttachmentDetails => pscAttachmentDetails[1].serviceAttachment),
                        },
                    },
                ],
            },
            {
                connections: [
                    {
                        pscConnection: {
                            pscConnectionId: forwardingRule1Network2.pscConnectionId,
                            ipAddress: ip1Network2.address,
                            forwardingRule: forwardingRule1Network2.id,
                            network: network2.id,
                            serviceAttachment: instance_user_connInstance.pscAttachmentDetails.apply(pscAttachmentDetails => pscAttachmentDetails[0].serviceAttachment),
                        },
                    },
                    {
                        pscConnection: {
                            pscConnectionId: forwardingRule2Network2.pscConnectionId,
                            ipAddress: ip2Network2.address,
                            forwardingRule: forwardingRule2Network2.id,
                            network: network2.id,
                            serviceAttachment: instance_user_connInstance.pscAttachmentDetails.apply(pscAttachmentDetails => pscAttachmentDetails[1].serviceAttachment),
                        },
                    },
                ],
            },
        ],
    });
    const project = gcp.organizations.getProject({});
    
    import pulumi
    import pulumi_gcp as gcp
    
    network1 = gcp.compute.Network("network1",
        name="net1",
        auto_create_subnetworks=False)
    subnet_network1 = gcp.compute.Subnetwork("subnet_network1",
        name="subnet-net1",
        ip_cidr_range="10.0.0.248/29",
        region="us-central1",
        network=network1.id)
    ip1_network1 = gcp.compute.Address("ip1_network1",
        name="ip1-net1",
        region="us-central1",
        subnetwork=subnet_network1.id,
        address_type="INTERNAL",
        purpose="GCE_ENDPOINT")
    #Valkey instance without endpoints
    instance_user_conn_instance = gcp.memorystore.Instance("instance-user-conn",
        instance_id="instance-user-conn",
        shard_count=1,
        location="us-central1",
        deletion_protection_enabled=False)
    forwarding_rule1_network1 = gcp.compute.ForwardingRule("forwarding_rule1_network1",
        name="fwd1-net1",
        region="us-central1",
        ip_address=ip1_network1.id,
        load_balancing_scheme="",
        network=network1.id,
        target=instance_user_conn_instance.psc_attachment_details[0].service_attachment)
    ip2_network1 = gcp.compute.Address("ip2_network1",
        name="ip2-net1",
        region="us-central1",
        subnetwork=subnet_network1.id,
        address_type="INTERNAL",
        purpose="GCE_ENDPOINT")
    forwarding_rule2_network1 = gcp.compute.ForwardingRule("forwarding_rule2_network1",
        name="fwd2-net1",
        region="us-central1",
        ip_address=ip2_network1.id,
        load_balancing_scheme="",
        network=network1.id,
        target=instance_user_conn_instance.psc_attachment_details[1].service_attachment)
    network2 = gcp.compute.Network("network2",
        name="network2",
        auto_create_subnetworks=False)
    subnet_network2 = gcp.compute.Subnetwork("subnet_network2",
        name="subnet-net2",
        ip_cidr_range="10.0.0.248/29",
        region="us-central1",
        network=network2.id)
    ip1_network2 = gcp.compute.Address("ip1_network2",
        name="ip1-net2",
        region="us-central1",
        subnetwork=subnet_network2.id,
        address_type="INTERNAL",
        purpose="GCE_ENDPOINT")
    forwarding_rule1_network2 = gcp.compute.ForwardingRule("forwarding_rule1_network2",
        name="fwd1-net2",
        region="us-central1",
        ip_address=ip1_network2.id,
        load_balancing_scheme="",
        network=network2.id,
        target=instance_user_conn_instance.psc_attachment_details[0].service_attachment)
    ip2_network2 = gcp.compute.Address("ip2_network2",
        name="ip2-net2",
        region="us-central1",
        subnetwork=subnet_network2.id,
        address_type="INTERNAL",
        purpose="GCE_ENDPOINT")
    forwarding_rule2_network2 = gcp.compute.ForwardingRule("forwarding_rule2_network2",
        name="fwd2-net2",
        region="us-central1",
        ip_address=ip2_network2.id,
        load_balancing_scheme="",
        network=network2.id,
        target=instance_user_conn_instance.psc_attachment_details[1].service_attachment)
    instance_user_conn = gcp.memorystore.InstanceDesiredUserCreatedEndpoints("instance-user-conn",
        name="instance-user-conn",
        region="us-central1",
        desired_user_created_endpoints=[
            {
                "connections": [
                    {
                        "psc_connection": {
                            "psc_connection_id": forwarding_rule1_network1.psc_connection_id,
                            "ip_address": ip1_network1.address,
                            "forwarding_rule": forwarding_rule1_network1.id,
                            "network": network1.id,
                            "service_attachment": instance_user_conn_instance.psc_attachment_details[0].service_attachment,
                        },
                    },
                    {
                        "psc_connection": {
                            "psc_connection_id": forwarding_rule2_network1.psc_connection_id,
                            "ip_address": ip2_network1.address,
                            "forwarding_rule": forwarding_rule2_network1.id,
                            "network": network1.id,
                            "service_attachment": instance_user_conn_instance.psc_attachment_details[1].service_attachment,
                        },
                    },
                ],
            },
            {
                "connections": [
                    {
                        "psc_connection": {
                            "psc_connection_id": forwarding_rule1_network2.psc_connection_id,
                            "ip_address": ip1_network2.address,
                            "forwarding_rule": forwarding_rule1_network2.id,
                            "network": network2.id,
                            "service_attachment": instance_user_conn_instance.psc_attachment_details[0].service_attachment,
                        },
                    },
                    {
                        "psc_connection": {
                            "psc_connection_id": forwarding_rule2_network2.psc_connection_id,
                            "ip_address": ip2_network2.address,
                            "forwarding_rule": forwarding_rule2_network2.id,
                            "network": network2.id,
                            "service_attachment": instance_user_conn_instance.psc_attachment_details[1].service_attachment,
                        },
                    },
                ],
            },
        ])
    project = gcp.organizations.get_project()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/memorystore"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		network1, err := compute.NewNetwork(ctx, "network1", &compute.NetworkArgs{
    			Name:                  pulumi.String("net1"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		subnetNetwork1, err := compute.NewSubnetwork(ctx, "subnet_network1", &compute.SubnetworkArgs{
    			Name:        pulumi.String("subnet-net1"),
    			IpCidrRange: pulumi.String("10.0.0.248/29"),
    			Region:      pulumi.String("us-central1"),
    			Network:     network1.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		ip1Network1, err := compute.NewAddress(ctx, "ip1_network1", &compute.AddressArgs{
    			Name:        pulumi.String("ip1-net1"),
    			Region:      pulumi.String("us-central1"),
    			Subnetwork:  subnetNetwork1.ID(),
    			AddressType: pulumi.String("INTERNAL"),
    			Purpose:     pulumi.String("GCE_ENDPOINT"),
    		})
    		if err != nil {
    			return err
    		}
    		// Valkey instance without endpoints
    		instance_user_connInstance, err := memorystore.NewInstance(ctx, "instance-user-conn", &memorystore.InstanceArgs{
    			InstanceId:                pulumi.String("instance-user-conn"),
    			ShardCount:                pulumi.Int(1),
    			Location:                  pulumi.String("us-central1"),
    			DeletionProtectionEnabled: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		forwardingRule1Network1, err := compute.NewForwardingRule(ctx, "forwarding_rule1_network1", &compute.ForwardingRuleArgs{
    			Name:                pulumi.String("fwd1-net1"),
    			Region:              pulumi.String("us-central1"),
    			IpAddress:           ip1Network1.ID(),
    			LoadBalancingScheme: pulumi.String(""),
    			Network:             network1.ID(),
    			Target: pulumi.String(instance_user_connInstance.PscAttachmentDetails.ApplyT(func(pscAttachmentDetails []memorystore.InstancePscAttachmentDetail) (*string, error) {
    				return &pscAttachmentDetails[0].ServiceAttachment, nil
    			}).(pulumi.StringPtrOutput)),
    		})
    		if err != nil {
    			return err
    		}
    		ip2Network1, err := compute.NewAddress(ctx, "ip2_network1", &compute.AddressArgs{
    			Name:        pulumi.String("ip2-net1"),
    			Region:      pulumi.String("us-central1"),
    			Subnetwork:  subnetNetwork1.ID(),
    			AddressType: pulumi.String("INTERNAL"),
    			Purpose:     pulumi.String("GCE_ENDPOINT"),
    		})
    		if err != nil {
    			return err
    		}
    		forwardingRule2Network1, err := compute.NewForwardingRule(ctx, "forwarding_rule2_network1", &compute.ForwardingRuleArgs{
    			Name:                pulumi.String("fwd2-net1"),
    			Region:              pulumi.String("us-central1"),
    			IpAddress:           ip2Network1.ID(),
    			LoadBalancingScheme: pulumi.String(""),
    			Network:             network1.ID(),
    			Target: pulumi.String(instance_user_connInstance.PscAttachmentDetails.ApplyT(func(pscAttachmentDetails []memorystore.InstancePscAttachmentDetail) (*string, error) {
    				return &pscAttachmentDetails[1].ServiceAttachment, nil
    			}).(pulumi.StringPtrOutput)),
    		})
    		if err != nil {
    			return err
    		}
    		network2, err := compute.NewNetwork(ctx, "network2", &compute.NetworkArgs{
    			Name:                  pulumi.String("network2"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		subnetNetwork2, err := compute.NewSubnetwork(ctx, "subnet_network2", &compute.SubnetworkArgs{
    			Name:        pulumi.String("subnet-net2"),
    			IpCidrRange: pulumi.String("10.0.0.248/29"),
    			Region:      pulumi.String("us-central1"),
    			Network:     network2.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		ip1Network2, err := compute.NewAddress(ctx, "ip1_network2", &compute.AddressArgs{
    			Name:        pulumi.String("ip1-net2"),
    			Region:      pulumi.String("us-central1"),
    			Subnetwork:  subnetNetwork2.ID(),
    			AddressType: pulumi.String("INTERNAL"),
    			Purpose:     pulumi.String("GCE_ENDPOINT"),
    		})
    		if err != nil {
    			return err
    		}
    		forwardingRule1Network2, err := compute.NewForwardingRule(ctx, "forwarding_rule1_network2", &compute.ForwardingRuleArgs{
    			Name:                pulumi.String("fwd1-net2"),
    			Region:              pulumi.String("us-central1"),
    			IpAddress:           ip1Network2.ID(),
    			LoadBalancingScheme: pulumi.String(""),
    			Network:             network2.ID(),
    			Target: pulumi.String(instance_user_connInstance.PscAttachmentDetails.ApplyT(func(pscAttachmentDetails []memorystore.InstancePscAttachmentDetail) (*string, error) {
    				return &pscAttachmentDetails[0].ServiceAttachment, nil
    			}).(pulumi.StringPtrOutput)),
    		})
    		if err != nil {
    			return err
    		}
    		ip2Network2, err := compute.NewAddress(ctx, "ip2_network2", &compute.AddressArgs{
    			Name:        pulumi.String("ip2-net2"),
    			Region:      pulumi.String("us-central1"),
    			Subnetwork:  subnetNetwork2.ID(),
    			AddressType: pulumi.String("INTERNAL"),
    			Purpose:     pulumi.String("GCE_ENDPOINT"),
    		})
    		if err != nil {
    			return err
    		}
    		forwardingRule2Network2, err := compute.NewForwardingRule(ctx, "forwarding_rule2_network2", &compute.ForwardingRuleArgs{
    			Name:                pulumi.String("fwd2-net2"),
    			Region:              pulumi.String("us-central1"),
    			IpAddress:           ip2Network2.ID(),
    			LoadBalancingScheme: pulumi.String(""),
    			Network:             network2.ID(),
    			Target: pulumi.String(instance_user_connInstance.PscAttachmentDetails.ApplyT(func(pscAttachmentDetails []memorystore.InstancePscAttachmentDetail) (*string, error) {
    				return &pscAttachmentDetails[1].ServiceAttachment, nil
    			}).(pulumi.StringPtrOutput)),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = memorystore.NewInstanceDesiredUserCreatedEndpoints(ctx, "instance-user-conn", &memorystore.InstanceDesiredUserCreatedEndpointsArgs{
    			Name:   pulumi.String("instance-user-conn"),
    			Region: pulumi.String("us-central1"),
    			DesiredUserCreatedEndpoints: memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArray{
    				&memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs{
    					Connections: memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArray{
    						&memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs{
    							PscConnection: &memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs{
    								PscConnectionId: forwardingRule1Network1.PscConnectionId,
    								IpAddress:       ip1Network1.Address,
    								ForwardingRule:  forwardingRule1Network1.ID(),
    								Network:         network1.ID(),
    								ServiceAttachment: instance_user_connInstance.PscAttachmentDetails.ApplyT(func(pscAttachmentDetails []memorystore.InstancePscAttachmentDetail) (*string, error) {
    									return &pscAttachmentDetails[0].ServiceAttachment, nil
    								}).(pulumi.StringPtrOutput),
    							},
    						},
    						&memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs{
    							PscConnection: &memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs{
    								PscConnectionId: forwardingRule2Network1.PscConnectionId,
    								IpAddress:       ip2Network1.Address,
    								ForwardingRule:  forwardingRule2Network1.ID(),
    								Network:         network1.ID(),
    								ServiceAttachment: instance_user_connInstance.PscAttachmentDetails.ApplyT(func(pscAttachmentDetails []memorystore.InstancePscAttachmentDetail) (*string, error) {
    									return &pscAttachmentDetails[1].ServiceAttachment, nil
    								}).(pulumi.StringPtrOutput),
    							},
    						},
    					},
    				},
    				&memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs{
    					Connections: memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArray{
    						&memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs{
    							PscConnection: &memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs{
    								PscConnectionId: forwardingRule1Network2.PscConnectionId,
    								IpAddress:       ip1Network2.Address,
    								ForwardingRule:  forwardingRule1Network2.ID(),
    								Network:         network2.ID(),
    								ServiceAttachment: instance_user_connInstance.PscAttachmentDetails.ApplyT(func(pscAttachmentDetails []memorystore.InstancePscAttachmentDetail) (*string, error) {
    									return &pscAttachmentDetails[0].ServiceAttachment, nil
    								}).(pulumi.StringPtrOutput),
    							},
    						},
    						&memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs{
    							PscConnection: &memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs{
    								PscConnectionId: forwardingRule2Network2.PscConnectionId,
    								IpAddress:       ip2Network2.Address,
    								ForwardingRule:  forwardingRule2Network2.ID(),
    								Network:         network2.ID(),
    								ServiceAttachment: instance_user_connInstance.PscAttachmentDetails.ApplyT(func(pscAttachmentDetails []memorystore.InstancePscAttachmentDetail) (*string, error) {
    									return &pscAttachmentDetails[1].ServiceAttachment, nil
    								}).(pulumi.StringPtrOutput),
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var network1 = new Gcp.Compute.Network("network1", new()
        {
            Name = "net1",
            AutoCreateSubnetworks = false,
        });
    
        var subnetNetwork1 = new Gcp.Compute.Subnetwork("subnet_network1", new()
        {
            Name = "subnet-net1",
            IpCidrRange = "10.0.0.248/29",
            Region = "us-central1",
            Network = network1.Id,
        });
    
        var ip1Network1 = new Gcp.Compute.Address("ip1_network1", new()
        {
            Name = "ip1-net1",
            Region = "us-central1",
            Subnetwork = subnetNetwork1.Id,
            AddressType = "INTERNAL",
            Purpose = "GCE_ENDPOINT",
        });
    
        //Valkey instance without endpoints
        var instance_user_connInstance = new Gcp.MemoryStore.Instance("instance-user-conn", new()
        {
            InstanceId = "instance-user-conn",
            ShardCount = 1,
            Location = "us-central1",
            DeletionProtectionEnabled = false,
        });
    
        var forwardingRule1Network1 = new Gcp.Compute.ForwardingRule("forwarding_rule1_network1", new()
        {
            Name = "fwd1-net1",
            Region = "us-central1",
            IpAddress = ip1Network1.Id,
            LoadBalancingScheme = "",
            Network = network1.Id,
            Target = instance_user_connInstance.PscAttachmentDetails.Apply(pscAttachmentDetails => pscAttachmentDetails[0].ServiceAttachment),
        });
    
        var ip2Network1 = new Gcp.Compute.Address("ip2_network1", new()
        {
            Name = "ip2-net1",
            Region = "us-central1",
            Subnetwork = subnetNetwork1.Id,
            AddressType = "INTERNAL",
            Purpose = "GCE_ENDPOINT",
        });
    
        var forwardingRule2Network1 = new Gcp.Compute.ForwardingRule("forwarding_rule2_network1", new()
        {
            Name = "fwd2-net1",
            Region = "us-central1",
            IpAddress = ip2Network1.Id,
            LoadBalancingScheme = "",
            Network = network1.Id,
            Target = instance_user_connInstance.PscAttachmentDetails.Apply(pscAttachmentDetails => pscAttachmentDetails[1].ServiceAttachment),
        });
    
        var network2 = new Gcp.Compute.Network("network2", new()
        {
            Name = "network2",
            AutoCreateSubnetworks = false,
        });
    
        var subnetNetwork2 = new Gcp.Compute.Subnetwork("subnet_network2", new()
        {
            Name = "subnet-net2",
            IpCidrRange = "10.0.0.248/29",
            Region = "us-central1",
            Network = network2.Id,
        });
    
        var ip1Network2 = new Gcp.Compute.Address("ip1_network2", new()
        {
            Name = "ip1-net2",
            Region = "us-central1",
            Subnetwork = subnetNetwork2.Id,
            AddressType = "INTERNAL",
            Purpose = "GCE_ENDPOINT",
        });
    
        var forwardingRule1Network2 = new Gcp.Compute.ForwardingRule("forwarding_rule1_network2", new()
        {
            Name = "fwd1-net2",
            Region = "us-central1",
            IpAddress = ip1Network2.Id,
            LoadBalancingScheme = "",
            Network = network2.Id,
            Target = instance_user_connInstance.PscAttachmentDetails.Apply(pscAttachmentDetails => pscAttachmentDetails[0].ServiceAttachment),
        });
    
        var ip2Network2 = new Gcp.Compute.Address("ip2_network2", new()
        {
            Name = "ip2-net2",
            Region = "us-central1",
            Subnetwork = subnetNetwork2.Id,
            AddressType = "INTERNAL",
            Purpose = "GCE_ENDPOINT",
        });
    
        var forwardingRule2Network2 = new Gcp.Compute.ForwardingRule("forwarding_rule2_network2", new()
        {
            Name = "fwd2-net2",
            Region = "us-central1",
            IpAddress = ip2Network2.Id,
            LoadBalancingScheme = "",
            Network = network2.Id,
            Target = instance_user_connInstance.PscAttachmentDetails.Apply(pscAttachmentDetails => pscAttachmentDetails[1].ServiceAttachment),
        });
    
        var instance_user_conn = new Gcp.MemoryStore.InstanceDesiredUserCreatedEndpoints("instance-user-conn", new()
        {
            Name = "instance-user-conn",
            Region = "us-central1",
            DesiredUserCreatedEndpoints = new[]
            {
                new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs
                {
                    Connections = new[]
                    {
                        new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs
                        {
                            PscConnection = new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs
                            {
                                PscConnectionId = forwardingRule1Network1.PscConnectionId,
                                IpAddress = ip1Network1.IPAddress,
                                ForwardingRule = forwardingRule1Network1.Id,
                                Network = network1.Id,
                                ServiceAttachment = instance_user_connInstance.PscAttachmentDetails.Apply(pscAttachmentDetails => pscAttachmentDetails[0].ServiceAttachment),
                            },
                        },
                        new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs
                        {
                            PscConnection = new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs
                            {
                                PscConnectionId = forwardingRule2Network1.PscConnectionId,
                                IpAddress = ip2Network1.IPAddress,
                                ForwardingRule = forwardingRule2Network1.Id,
                                Network = network1.Id,
                                ServiceAttachment = instance_user_connInstance.PscAttachmentDetails.Apply(pscAttachmentDetails => pscAttachmentDetails[1].ServiceAttachment),
                            },
                        },
                    },
                },
                new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs
                {
                    Connections = new[]
                    {
                        new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs
                        {
                            PscConnection = new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs
                            {
                                PscConnectionId = forwardingRule1Network2.PscConnectionId,
                                IpAddress = ip1Network2.IPAddress,
                                ForwardingRule = forwardingRule1Network2.Id,
                                Network = network2.Id,
                                ServiceAttachment = instance_user_connInstance.PscAttachmentDetails.Apply(pscAttachmentDetails => pscAttachmentDetails[0].ServiceAttachment),
                            },
                        },
                        new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs
                        {
                            PscConnection = new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs
                            {
                                PscConnectionId = forwardingRule2Network2.PscConnectionId,
                                IpAddress = ip2Network2.IPAddress,
                                ForwardingRule = forwardingRule2Network2.Id,
                                Network = network2.Id,
                                ServiceAttachment = instance_user_connInstance.PscAttachmentDetails.Apply(pscAttachmentDetails => pscAttachmentDetails[1].ServiceAttachment),
                            },
                        },
                    },
                },
            },
        });
    
        var project = Gcp.Organizations.GetProject.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.compute.Subnetwork;
    import com.pulumi.gcp.compute.SubnetworkArgs;
    import com.pulumi.gcp.compute.Address;
    import com.pulumi.gcp.compute.AddressArgs;
    import com.pulumi.gcp.memorystore.Instance;
    import com.pulumi.gcp.memorystore.InstanceArgs;
    import com.pulumi.gcp.compute.ForwardingRule;
    import com.pulumi.gcp.compute.ForwardingRuleArgs;
    import com.pulumi.gcp.memorystore.InstanceDesiredUserCreatedEndpoints;
    import com.pulumi.gcp.memorystore.InstanceDesiredUserCreatedEndpointsArgs;
    import com.pulumi.gcp.memorystore.inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs;
    import com.pulumi.gcp.organizations.OrganizationsFunctions;
    import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
    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 network1 = new Network("network1", NetworkArgs.builder()
                .name("net1")
                .autoCreateSubnetworks(false)
                .build());
    
            var subnetNetwork1 = new Subnetwork("subnetNetwork1", SubnetworkArgs.builder()
                .name("subnet-net1")
                .ipCidrRange("10.0.0.248/29")
                .region("us-central1")
                .network(network1.id())
                .build());
    
            var ip1Network1 = new Address("ip1Network1", AddressArgs.builder()
                .name("ip1-net1")
                .region("us-central1")
                .subnetwork(subnetNetwork1.id())
                .addressType("INTERNAL")
                .purpose("GCE_ENDPOINT")
                .build());
    
            //Valkey instance without endpoints
            var instance_user_connInstance = new Instance("instance-user-connInstance", InstanceArgs.builder()
                .instanceId("instance-user-conn")
                .shardCount(1)
                .location("us-central1")
                .deletionProtectionEnabled(false)
                .build());
    
            var forwardingRule1Network1 = new ForwardingRule("forwardingRule1Network1", ForwardingRuleArgs.builder()
                .name("fwd1-net1")
                .region("us-central1")
                .ipAddress(ip1Network1.id())
                .loadBalancingScheme("")
                .network(network1.id())
                .target(instance_user_connInstance.pscAttachmentDetails().applyValue(_pscAttachmentDetails -> _pscAttachmentDetails[0].serviceAttachment()))
                .build());
    
            var ip2Network1 = new Address("ip2Network1", AddressArgs.builder()
                .name("ip2-net1")
                .region("us-central1")
                .subnetwork(subnetNetwork1.id())
                .addressType("INTERNAL")
                .purpose("GCE_ENDPOINT")
                .build());
    
            var forwardingRule2Network1 = new ForwardingRule("forwardingRule2Network1", ForwardingRuleArgs.builder()
                .name("fwd2-net1")
                .region("us-central1")
                .ipAddress(ip2Network1.id())
                .loadBalancingScheme("")
                .network(network1.id())
                .target(instance_user_connInstance.pscAttachmentDetails().applyValue(_pscAttachmentDetails -> _pscAttachmentDetails[1].serviceAttachment()))
                .build());
    
            var network2 = new Network("network2", NetworkArgs.builder()
                .name("network2")
                .autoCreateSubnetworks(false)
                .build());
    
            var subnetNetwork2 = new Subnetwork("subnetNetwork2", SubnetworkArgs.builder()
                .name("subnet-net2")
                .ipCidrRange("10.0.0.248/29")
                .region("us-central1")
                .network(network2.id())
                .build());
    
            var ip1Network2 = new Address("ip1Network2", AddressArgs.builder()
                .name("ip1-net2")
                .region("us-central1")
                .subnetwork(subnetNetwork2.id())
                .addressType("INTERNAL")
                .purpose("GCE_ENDPOINT")
                .build());
    
            var forwardingRule1Network2 = new ForwardingRule("forwardingRule1Network2", ForwardingRuleArgs.builder()
                .name("fwd1-net2")
                .region("us-central1")
                .ipAddress(ip1Network2.id())
                .loadBalancingScheme("")
                .network(network2.id())
                .target(instance_user_connInstance.pscAttachmentDetails().applyValue(_pscAttachmentDetails -> _pscAttachmentDetails[0].serviceAttachment()))
                .build());
    
            var ip2Network2 = new Address("ip2Network2", AddressArgs.builder()
                .name("ip2-net2")
                .region("us-central1")
                .subnetwork(subnetNetwork2.id())
                .addressType("INTERNAL")
                .purpose("GCE_ENDPOINT")
                .build());
    
            var forwardingRule2Network2 = new ForwardingRule("forwardingRule2Network2", ForwardingRuleArgs.builder()
                .name("fwd2-net2")
                .region("us-central1")
                .ipAddress(ip2Network2.id())
                .loadBalancingScheme("")
                .network(network2.id())
                .target(instance_user_connInstance.pscAttachmentDetails().applyValue(_pscAttachmentDetails -> _pscAttachmentDetails[1].serviceAttachment()))
                .build());
    
            var instance_user_conn = new InstanceDesiredUserCreatedEndpoints("instance-user-conn", InstanceDesiredUserCreatedEndpointsArgs.builder()
                .name("instance-user-conn")
                .region("us-central1")
                .desiredUserCreatedEndpoints(            
                    InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs.builder()
                        .connections(                    
                            InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs.builder()
                                .pscConnection(InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs.builder()
                                    .pscConnectionId(forwardingRule1Network1.pscConnectionId())
                                    .ipAddress(ip1Network1.address())
                                    .forwardingRule(forwardingRule1Network1.id())
                                    .network(network1.id())
                                    .serviceAttachment(instance_user_connInstance.pscAttachmentDetails().applyValue(_pscAttachmentDetails -> _pscAttachmentDetails[0].serviceAttachment()))
                                    .build())
                                .build(),
                            InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs.builder()
                                .pscConnection(InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs.builder()
                                    .pscConnectionId(forwardingRule2Network1.pscConnectionId())
                                    .ipAddress(ip2Network1.address())
                                    .forwardingRule(forwardingRule2Network1.id())
                                    .network(network1.id())
                                    .serviceAttachment(instance_user_connInstance.pscAttachmentDetails().applyValue(_pscAttachmentDetails -> _pscAttachmentDetails[1].serviceAttachment()))
                                    .build())
                                .build())
                        .build(),
                    InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs.builder()
                        .connections(                    
                            InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs.builder()
                                .pscConnection(InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs.builder()
                                    .pscConnectionId(forwardingRule1Network2.pscConnectionId())
                                    .ipAddress(ip1Network2.address())
                                    .forwardingRule(forwardingRule1Network2.id())
                                    .network(network2.id())
                                    .serviceAttachment(instance_user_connInstance.pscAttachmentDetails().applyValue(_pscAttachmentDetails -> _pscAttachmentDetails[0].serviceAttachment()))
                                    .build())
                                .build(),
                            InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs.builder()
                                .pscConnection(InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs.builder()
                                    .pscConnectionId(forwardingRule2Network2.pscConnectionId())
                                    .ipAddress(ip2Network2.address())
                                    .forwardingRule(forwardingRule2Network2.id())
                                    .network(network2.id())
                                    .serviceAttachment(instance_user_connInstance.pscAttachmentDetails().applyValue(_pscAttachmentDetails -> _pscAttachmentDetails[1].serviceAttachment()))
                                    .build())
                                .build())
                        .build())
                .build());
    
            final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
                .build());
    
        }
    }
    
    resources:
      instance-user-conn:
        type: gcp:memorystore:InstanceDesiredUserCreatedEndpoints
        properties:
          name: instance-user-conn
          region: us-central1
          desiredUserCreatedEndpoints:
            - connections:
                - pscConnection:
                    pscConnectionId: ${forwardingRule1Network1.pscConnectionId}
                    ipAddress: ${ip1Network1.address}
                    forwardingRule: ${forwardingRule1Network1.id}
                    network: ${network1.id}
                    serviceAttachment: ${["instance-user-connInstance"].pscAttachmentDetails[0].serviceAttachment}
                - pscConnection:
                    pscConnectionId: ${forwardingRule2Network1.pscConnectionId}
                    ipAddress: ${ip2Network1.address}
                    forwardingRule: ${forwardingRule2Network1.id}
                    network: ${network1.id}
                    serviceAttachment: ${["instance-user-connInstance"].pscAttachmentDetails[1].serviceAttachment}
            - connections:
                - pscConnection:
                    pscConnectionId: ${forwardingRule1Network2.pscConnectionId}
                    ipAddress: ${ip1Network2.address}
                    forwardingRule: ${forwardingRule1Network2.id}
                    network: ${network2.id}
                    serviceAttachment: ${["instance-user-connInstance"].pscAttachmentDetails[0].serviceAttachment}
                - pscConnection:
                    pscConnectionId: ${forwardingRule2Network2.pscConnectionId}
                    ipAddress: ${ip2Network2.address}
                    forwardingRule: ${forwardingRule2Network2.id}
                    network: ${network2.id}
                    serviceAttachment: ${["instance-user-connInstance"].pscAttachmentDetails[1].serviceAttachment}
      forwardingRule1Network1:
        type: gcp:compute:ForwardingRule
        name: forwarding_rule1_network1
        properties:
          name: fwd1-net1
          region: us-central1
          ipAddress: ${ip1Network1.id}
          loadBalancingScheme: ""
          network: ${network1.id}
          target: ${["instance-user-connInstance"].pscAttachmentDetails[0].serviceAttachment}
      forwardingRule2Network1:
        type: gcp:compute:ForwardingRule
        name: forwarding_rule2_network1
        properties:
          name: fwd2-net1
          region: us-central1
          ipAddress: ${ip2Network1.id}
          loadBalancingScheme: ""
          network: ${network1.id}
          target: ${["instance-user-connInstance"].pscAttachmentDetails[1].serviceAttachment}
      ip1Network1:
        type: gcp:compute:Address
        name: ip1_network1
        properties:
          name: ip1-net1
          region: us-central1
          subnetwork: ${subnetNetwork1.id}
          addressType: INTERNAL
          purpose: GCE_ENDPOINT
      ip2Network1:
        type: gcp:compute:Address
        name: ip2_network1
        properties:
          name: ip2-net1
          region: us-central1
          subnetwork: ${subnetNetwork1.id}
          addressType: INTERNAL
          purpose: GCE_ENDPOINT
      subnetNetwork1:
        type: gcp:compute:Subnetwork
        name: subnet_network1
        properties:
          name: subnet-net1
          ipCidrRange: 10.0.0.248/29
          region: us-central1
          network: ${network1.id}
      network1:
        type: gcp:compute:Network
        properties:
          name: net1
          autoCreateSubnetworks: false
      forwardingRule1Network2:
        type: gcp:compute:ForwardingRule
        name: forwarding_rule1_network2
        properties:
          name: fwd1-net2
          region: us-central1
          ipAddress: ${ip1Network2.id}
          loadBalancingScheme: ""
          network: ${network2.id}
          target: ${["instance-user-connInstance"].pscAttachmentDetails[0].serviceAttachment}
      forwardingRule2Network2:
        type: gcp:compute:ForwardingRule
        name: forwarding_rule2_network2
        properties:
          name: fwd2-net2
          region: us-central1
          ipAddress: ${ip2Network2.id}
          loadBalancingScheme: ""
          network: ${network2.id}
          target: ${["instance-user-connInstance"].pscAttachmentDetails[1].serviceAttachment}
      ip1Network2:
        type: gcp:compute:Address
        name: ip1_network2
        properties:
          name: ip1-net2
          region: us-central1
          subnetwork: ${subnetNetwork2.id}
          addressType: INTERNAL
          purpose: GCE_ENDPOINT
      ip2Network2:
        type: gcp:compute:Address
        name: ip2_network2
        properties:
          name: ip2-net2
          region: us-central1
          subnetwork: ${subnetNetwork2.id}
          addressType: INTERNAL
          purpose: GCE_ENDPOINT
      # Valkey instance without endpoints
      instance-user-connInstance:
        type: gcp:memorystore:Instance
        name: instance-user-conn
        properties:
          instanceId: instance-user-conn
          shardCount: 1
          location: us-central1
          deletionProtectionEnabled: false
      subnetNetwork2:
        type: gcp:compute:Subnetwork
        name: subnet_network2
        properties:
          name: subnet-net2
          ipCidrRange: 10.0.0.248/29
          region: us-central1
          network: ${network2.id}
      network2:
        type: gcp:compute:Network
        properties:
          name: network2
          autoCreateSubnetworks: false
    variables:
      project:
        fn::invoke:
          function: gcp:organizations:getProject
          arguments: {}
    

    Memorystore Instance Desired User And Auto Created Endpoints

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const network2 = new gcp.compute.Network("network2", {
        name: "network2",
        autoCreateSubnetworks: false,
    });
    const subnetNetwork2 = new gcp.compute.Subnetwork("subnet_network2", {
        name: "subnet-net2",
        ipCidrRange: "10.0.0.248/29",
        region: "us-central1",
        network: network2.id,
    });
    const ip1Network2 = new gcp.compute.Address("ip1_network2", {
        name: "ip1-net2",
        region: "us-central1",
        subnetwork: subnetNetwork2.id,
        addressType: "INTERNAL",
        purpose: "GCE_ENDPOINT",
    });
    const network1 = new gcp.compute.Network("network1", {
        name: "net1",
        autoCreateSubnetworks: false,
    });
    const subnetNetwork1 = new gcp.compute.Subnetwork("subnet_network1", {
        name: "subnet-net1",
        ipCidrRange: "10.0.0.248/29",
        region: "us-central1",
        network: network1.id,
    });
    const _default = new gcp.networkconnectivity.ServiceConnectionPolicy("default", {
        name: "scpolicy",
        location: "us-central1",
        serviceClass: "gcp-memorystore",
        description: "my basic service connection policy",
        network: network1.id,
        pscConfig: {
            subnetworks: [subnetNetwork1.id],
        },
    });
    const project = gcp.organizations.getProject({});
    //valkey instance with endpoints
    const instance_user_auto_connInstance = new gcp.memorystore.Instance("instance-user-auto-conn", {
        instanceId: "instance-user-auto-conn",
        shardCount: 1,
        desiredPscAutoConnections: [{
            network: network1.id,
            projectId: project.then(project => project.projectId),
        }],
        location: "us-central1",
        deletionProtectionEnabled: false,
    }, {
        dependsOn: [_default],
    });
    const forwardingRule1Network2 = new gcp.compute.ForwardingRule("forwarding_rule1_network2", {
        name: "fwd1-net2",
        region: "us-central1",
        ipAddress: ip1Network2.id,
        loadBalancingScheme: "",
        network: network2.id,
        target: instance_user_auto_connInstance.pscAttachmentDetails.apply(pscAttachmentDetails => pscAttachmentDetails[0].serviceAttachment),
    });
    const ip2Network2 = new gcp.compute.Address("ip2_network2", {
        name: "ip2-net2",
        region: "us-central1",
        subnetwork: subnetNetwork2.id,
        addressType: "INTERNAL",
        purpose: "GCE_ENDPOINT",
    });
    const forwardingRule2Network2 = new gcp.compute.ForwardingRule("forwarding_rule2_network2", {
        name: "fwd2-net2",
        region: "us-central1",
        ipAddress: ip2Network2.id,
        loadBalancingScheme: "",
        network: network2.id,
        target: instance_user_auto_connInstance.pscAttachmentDetails.apply(pscAttachmentDetails => pscAttachmentDetails[1].serviceAttachment),
    });
    const instance_user_auto_conn = new gcp.memorystore.InstanceDesiredUserCreatedEndpoints("instance-user-auto-conn", {
        name: "instance-user-auto-conn",
        region: "us-central1",
        desiredUserCreatedEndpoints: [{
            connections: [
                {
                    pscConnection: {
                        pscConnectionId: forwardingRule1Network2.pscConnectionId,
                        ipAddress: ip1Network2.address,
                        forwardingRule: forwardingRule1Network2.id,
                        network: network2.id,
                        serviceAttachment: instance_user_auto_connInstance.pscAttachmentDetails.apply(pscAttachmentDetails => pscAttachmentDetails[0].serviceAttachment),
                    },
                },
                {
                    pscConnection: {
                        pscConnectionId: forwardingRule2Network2.pscConnectionId,
                        ipAddress: ip2Network2.address,
                        forwardingRule: forwardingRule2Network2.id,
                        network: network2.id,
                        serviceAttachment: instance_user_auto_connInstance.pscAttachmentDetails.apply(pscAttachmentDetails => pscAttachmentDetails[1].serviceAttachment),
                    },
                },
            ],
        }],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    network2 = gcp.compute.Network("network2",
        name="network2",
        auto_create_subnetworks=False)
    subnet_network2 = gcp.compute.Subnetwork("subnet_network2",
        name="subnet-net2",
        ip_cidr_range="10.0.0.248/29",
        region="us-central1",
        network=network2.id)
    ip1_network2 = gcp.compute.Address("ip1_network2",
        name="ip1-net2",
        region="us-central1",
        subnetwork=subnet_network2.id,
        address_type="INTERNAL",
        purpose="GCE_ENDPOINT")
    network1 = gcp.compute.Network("network1",
        name="net1",
        auto_create_subnetworks=False)
    subnet_network1 = gcp.compute.Subnetwork("subnet_network1",
        name="subnet-net1",
        ip_cidr_range="10.0.0.248/29",
        region="us-central1",
        network=network1.id)
    default = gcp.networkconnectivity.ServiceConnectionPolicy("default",
        name="scpolicy",
        location="us-central1",
        service_class="gcp-memorystore",
        description="my basic service connection policy",
        network=network1.id,
        psc_config={
            "subnetworks": [subnet_network1.id],
        })
    project = gcp.organizations.get_project()
    #valkey instance with endpoints
    instance_user_auto_conn_instance = gcp.memorystore.Instance("instance-user-auto-conn",
        instance_id="instance-user-auto-conn",
        shard_count=1,
        desired_psc_auto_connections=[{
            "network": network1.id,
            "project_id": project.project_id,
        }],
        location="us-central1",
        deletion_protection_enabled=False,
        opts = pulumi.ResourceOptions(depends_on=[default]))
    forwarding_rule1_network2 = gcp.compute.ForwardingRule("forwarding_rule1_network2",
        name="fwd1-net2",
        region="us-central1",
        ip_address=ip1_network2.id,
        load_balancing_scheme="",
        network=network2.id,
        target=instance_user_auto_conn_instance.psc_attachment_details[0].service_attachment)
    ip2_network2 = gcp.compute.Address("ip2_network2",
        name="ip2-net2",
        region="us-central1",
        subnetwork=subnet_network2.id,
        address_type="INTERNAL",
        purpose="GCE_ENDPOINT")
    forwarding_rule2_network2 = gcp.compute.ForwardingRule("forwarding_rule2_network2",
        name="fwd2-net2",
        region="us-central1",
        ip_address=ip2_network2.id,
        load_balancing_scheme="",
        network=network2.id,
        target=instance_user_auto_conn_instance.psc_attachment_details[1].service_attachment)
    instance_user_auto_conn = gcp.memorystore.InstanceDesiredUserCreatedEndpoints("instance-user-auto-conn",
        name="instance-user-auto-conn",
        region="us-central1",
        desired_user_created_endpoints=[{
            "connections": [
                {
                    "psc_connection": {
                        "psc_connection_id": forwarding_rule1_network2.psc_connection_id,
                        "ip_address": ip1_network2.address,
                        "forwarding_rule": forwarding_rule1_network2.id,
                        "network": network2.id,
                        "service_attachment": instance_user_auto_conn_instance.psc_attachment_details[0].service_attachment,
                    },
                },
                {
                    "psc_connection": {
                        "psc_connection_id": forwarding_rule2_network2.psc_connection_id,
                        "ip_address": ip2_network2.address,
                        "forwarding_rule": forwarding_rule2_network2.id,
                        "network": network2.id,
                        "service_attachment": instance_user_auto_conn_instance.psc_attachment_details[1].service_attachment,
                    },
                },
            ],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/memorystore"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkconnectivity"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		network2, err := compute.NewNetwork(ctx, "network2", &compute.NetworkArgs{
    			Name:                  pulumi.String("network2"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		subnetNetwork2, err := compute.NewSubnetwork(ctx, "subnet_network2", &compute.SubnetworkArgs{
    			Name:        pulumi.String("subnet-net2"),
    			IpCidrRange: pulumi.String("10.0.0.248/29"),
    			Region:      pulumi.String("us-central1"),
    			Network:     network2.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		ip1Network2, err := compute.NewAddress(ctx, "ip1_network2", &compute.AddressArgs{
    			Name:        pulumi.String("ip1-net2"),
    			Region:      pulumi.String("us-central1"),
    			Subnetwork:  subnetNetwork2.ID(),
    			AddressType: pulumi.String("INTERNAL"),
    			Purpose:     pulumi.String("GCE_ENDPOINT"),
    		})
    		if err != nil {
    			return err
    		}
    		network1, err := compute.NewNetwork(ctx, "network1", &compute.NetworkArgs{
    			Name:                  pulumi.String("net1"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		subnetNetwork1, err := compute.NewSubnetwork(ctx, "subnet_network1", &compute.SubnetworkArgs{
    			Name:        pulumi.String("subnet-net1"),
    			IpCidrRange: pulumi.String("10.0.0.248/29"),
    			Region:      pulumi.String("us-central1"),
    			Network:     network1.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_default, err := networkconnectivity.NewServiceConnectionPolicy(ctx, "default", &networkconnectivity.ServiceConnectionPolicyArgs{
    			Name:         pulumi.String("scpolicy"),
    			Location:     pulumi.String("us-central1"),
    			ServiceClass: pulumi.String("gcp-memorystore"),
    			Description:  pulumi.String("my basic service connection policy"),
    			Network:      network1.ID(),
    			PscConfig: &networkconnectivity.ServiceConnectionPolicyPscConfigArgs{
    				Subnetworks: pulumi.StringArray{
    					subnetNetwork1.ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		// valkey instance with endpoints
    		instance_user_auto_connInstance, err := memorystore.NewInstance(ctx, "instance-user-auto-conn", &memorystore.InstanceArgs{
    			InstanceId: pulumi.String("instance-user-auto-conn"),
    			ShardCount: pulumi.Int(1),
    			DesiredPscAutoConnections: memorystore.InstanceDesiredPscAutoConnectionArray{
    				&memorystore.InstanceDesiredPscAutoConnectionArgs{
    					Network:   network1.ID(),
    					ProjectId: pulumi.String(project.ProjectId),
    				},
    			},
    			Location:                  pulumi.String("us-central1"),
    			DeletionProtectionEnabled: pulumi.Bool(false),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			_default,
    		}))
    		if err != nil {
    			return err
    		}
    		forwardingRule1Network2, err := compute.NewForwardingRule(ctx, "forwarding_rule1_network2", &compute.ForwardingRuleArgs{
    			Name:                pulumi.String("fwd1-net2"),
    			Region:              pulumi.String("us-central1"),
    			IpAddress:           ip1Network2.ID(),
    			LoadBalancingScheme: pulumi.String(""),
    			Network:             network2.ID(),
    			Target: pulumi.String(instance_user_auto_connInstance.PscAttachmentDetails.ApplyT(func(pscAttachmentDetails []memorystore.InstancePscAttachmentDetail) (*string, error) {
    				return &pscAttachmentDetails[0].ServiceAttachment, nil
    			}).(pulumi.StringPtrOutput)),
    		})
    		if err != nil {
    			return err
    		}
    		ip2Network2, err := compute.NewAddress(ctx, "ip2_network2", &compute.AddressArgs{
    			Name:        pulumi.String("ip2-net2"),
    			Region:      pulumi.String("us-central1"),
    			Subnetwork:  subnetNetwork2.ID(),
    			AddressType: pulumi.String("INTERNAL"),
    			Purpose:     pulumi.String("GCE_ENDPOINT"),
    		})
    		if err != nil {
    			return err
    		}
    		forwardingRule2Network2, err := compute.NewForwardingRule(ctx, "forwarding_rule2_network2", &compute.ForwardingRuleArgs{
    			Name:                pulumi.String("fwd2-net2"),
    			Region:              pulumi.String("us-central1"),
    			IpAddress:           ip2Network2.ID(),
    			LoadBalancingScheme: pulumi.String(""),
    			Network:             network2.ID(),
    			Target: pulumi.String(instance_user_auto_connInstance.PscAttachmentDetails.ApplyT(func(pscAttachmentDetails []memorystore.InstancePscAttachmentDetail) (*string, error) {
    				return &pscAttachmentDetails[1].ServiceAttachment, nil
    			}).(pulumi.StringPtrOutput)),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = memorystore.NewInstanceDesiredUserCreatedEndpoints(ctx, "instance-user-auto-conn", &memorystore.InstanceDesiredUserCreatedEndpointsArgs{
    			Name:   pulumi.String("instance-user-auto-conn"),
    			Region: pulumi.String("us-central1"),
    			DesiredUserCreatedEndpoints: memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArray{
    				&memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs{
    					Connections: memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArray{
    						&memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs{
    							PscConnection: &memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs{
    								PscConnectionId: forwardingRule1Network2.PscConnectionId,
    								IpAddress:       ip1Network2.Address,
    								ForwardingRule:  forwardingRule1Network2.ID(),
    								Network:         network2.ID(),
    								ServiceAttachment: instance_user_auto_connInstance.PscAttachmentDetails.ApplyT(func(pscAttachmentDetails []memorystore.InstancePscAttachmentDetail) (*string, error) {
    									return &pscAttachmentDetails[0].ServiceAttachment, nil
    								}).(pulumi.StringPtrOutput),
    							},
    						},
    						&memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs{
    							PscConnection: &memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs{
    								PscConnectionId: forwardingRule2Network2.PscConnectionId,
    								IpAddress:       ip2Network2.Address,
    								ForwardingRule:  forwardingRule2Network2.ID(),
    								Network:         network2.ID(),
    								ServiceAttachment: instance_user_auto_connInstance.PscAttachmentDetails.ApplyT(func(pscAttachmentDetails []memorystore.InstancePscAttachmentDetail) (*string, error) {
    									return &pscAttachmentDetails[1].ServiceAttachment, nil
    								}).(pulumi.StringPtrOutput),
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var network2 = new Gcp.Compute.Network("network2", new()
        {
            Name = "network2",
            AutoCreateSubnetworks = false,
        });
    
        var subnetNetwork2 = new Gcp.Compute.Subnetwork("subnet_network2", new()
        {
            Name = "subnet-net2",
            IpCidrRange = "10.0.0.248/29",
            Region = "us-central1",
            Network = network2.Id,
        });
    
        var ip1Network2 = new Gcp.Compute.Address("ip1_network2", new()
        {
            Name = "ip1-net2",
            Region = "us-central1",
            Subnetwork = subnetNetwork2.Id,
            AddressType = "INTERNAL",
            Purpose = "GCE_ENDPOINT",
        });
    
        var network1 = new Gcp.Compute.Network("network1", new()
        {
            Name = "net1",
            AutoCreateSubnetworks = false,
        });
    
        var subnetNetwork1 = new Gcp.Compute.Subnetwork("subnet_network1", new()
        {
            Name = "subnet-net1",
            IpCidrRange = "10.0.0.248/29",
            Region = "us-central1",
            Network = network1.Id,
        });
    
        var @default = new Gcp.NetworkConnectivity.ServiceConnectionPolicy("default", new()
        {
            Name = "scpolicy",
            Location = "us-central1",
            ServiceClass = "gcp-memorystore",
            Description = "my basic service connection policy",
            Network = network1.Id,
            PscConfig = new Gcp.NetworkConnectivity.Inputs.ServiceConnectionPolicyPscConfigArgs
            {
                Subnetworks = new[]
                {
                    subnetNetwork1.Id,
                },
            },
        });
    
        var project = Gcp.Organizations.GetProject.Invoke();
    
        //valkey instance with endpoints
        var instance_user_auto_connInstance = new Gcp.MemoryStore.Instance("instance-user-auto-conn", new()
        {
            InstanceId = "instance-user-auto-conn",
            ShardCount = 1,
            DesiredPscAutoConnections = new[]
            {
                new Gcp.MemoryStore.Inputs.InstanceDesiredPscAutoConnectionArgs
                {
                    Network = network1.Id,
                    ProjectId = project.Apply(getProjectResult => getProjectResult.ProjectId),
                },
            },
            Location = "us-central1",
            DeletionProtectionEnabled = false,
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                @default,
            },
        });
    
        var forwardingRule1Network2 = new Gcp.Compute.ForwardingRule("forwarding_rule1_network2", new()
        {
            Name = "fwd1-net2",
            Region = "us-central1",
            IpAddress = ip1Network2.Id,
            LoadBalancingScheme = "",
            Network = network2.Id,
            Target = instance_user_auto_connInstance.PscAttachmentDetails.Apply(pscAttachmentDetails => pscAttachmentDetails[0].ServiceAttachment),
        });
    
        var ip2Network2 = new Gcp.Compute.Address("ip2_network2", new()
        {
            Name = "ip2-net2",
            Region = "us-central1",
            Subnetwork = subnetNetwork2.Id,
            AddressType = "INTERNAL",
            Purpose = "GCE_ENDPOINT",
        });
    
        var forwardingRule2Network2 = new Gcp.Compute.ForwardingRule("forwarding_rule2_network2", new()
        {
            Name = "fwd2-net2",
            Region = "us-central1",
            IpAddress = ip2Network2.Id,
            LoadBalancingScheme = "",
            Network = network2.Id,
            Target = instance_user_auto_connInstance.PscAttachmentDetails.Apply(pscAttachmentDetails => pscAttachmentDetails[1].ServiceAttachment),
        });
    
        var instance_user_auto_conn = new Gcp.MemoryStore.InstanceDesiredUserCreatedEndpoints("instance-user-auto-conn", new()
        {
            Name = "instance-user-auto-conn",
            Region = "us-central1",
            DesiredUserCreatedEndpoints = new[]
            {
                new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs
                {
                    Connections = new[]
                    {
                        new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs
                        {
                            PscConnection = new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs
                            {
                                PscConnectionId = forwardingRule1Network2.PscConnectionId,
                                IpAddress = ip1Network2.IPAddress,
                                ForwardingRule = forwardingRule1Network2.Id,
                                Network = network2.Id,
                                ServiceAttachment = instance_user_auto_connInstance.PscAttachmentDetails.Apply(pscAttachmentDetails => pscAttachmentDetails[0].ServiceAttachment),
                            },
                        },
                        new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs
                        {
                            PscConnection = new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs
                            {
                                PscConnectionId = forwardingRule2Network2.PscConnectionId,
                                IpAddress = ip2Network2.IPAddress,
                                ForwardingRule = forwardingRule2Network2.Id,
                                Network = network2.Id,
                                ServiceAttachment = instance_user_auto_connInstance.PscAttachmentDetails.Apply(pscAttachmentDetails => pscAttachmentDetails[1].ServiceAttachment),
                            },
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.compute.Subnetwork;
    import com.pulumi.gcp.compute.SubnetworkArgs;
    import com.pulumi.gcp.compute.Address;
    import com.pulumi.gcp.compute.AddressArgs;
    import com.pulumi.gcp.networkconnectivity.ServiceConnectionPolicy;
    import com.pulumi.gcp.networkconnectivity.ServiceConnectionPolicyArgs;
    import com.pulumi.gcp.networkconnectivity.inputs.ServiceConnectionPolicyPscConfigArgs;
    import com.pulumi.gcp.organizations.OrganizationsFunctions;
    import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
    import com.pulumi.gcp.memorystore.Instance;
    import com.pulumi.gcp.memorystore.InstanceArgs;
    import com.pulumi.gcp.memorystore.inputs.InstanceDesiredPscAutoConnectionArgs;
    import com.pulumi.gcp.compute.ForwardingRule;
    import com.pulumi.gcp.compute.ForwardingRuleArgs;
    import com.pulumi.gcp.memorystore.InstanceDesiredUserCreatedEndpoints;
    import com.pulumi.gcp.memorystore.InstanceDesiredUserCreatedEndpointsArgs;
    import com.pulumi.gcp.memorystore.inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs;
    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) {
            var network2 = new Network("network2", NetworkArgs.builder()
                .name("network2")
                .autoCreateSubnetworks(false)
                .build());
    
            var subnetNetwork2 = new Subnetwork("subnetNetwork2", SubnetworkArgs.builder()
                .name("subnet-net2")
                .ipCidrRange("10.0.0.248/29")
                .region("us-central1")
                .network(network2.id())
                .build());
    
            var ip1Network2 = new Address("ip1Network2", AddressArgs.builder()
                .name("ip1-net2")
                .region("us-central1")
                .subnetwork(subnetNetwork2.id())
                .addressType("INTERNAL")
                .purpose("GCE_ENDPOINT")
                .build());
    
            var network1 = new Network("network1", NetworkArgs.builder()
                .name("net1")
                .autoCreateSubnetworks(false)
                .build());
    
            var subnetNetwork1 = new Subnetwork("subnetNetwork1", SubnetworkArgs.builder()
                .name("subnet-net1")
                .ipCidrRange("10.0.0.248/29")
                .region("us-central1")
                .network(network1.id())
                .build());
    
            var default_ = new ServiceConnectionPolicy("default", ServiceConnectionPolicyArgs.builder()
                .name("scpolicy")
                .location("us-central1")
                .serviceClass("gcp-memorystore")
                .description("my basic service connection policy")
                .network(network1.id())
                .pscConfig(ServiceConnectionPolicyPscConfigArgs.builder()
                    .subnetworks(subnetNetwork1.id())
                    .build())
                .build());
    
            final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
                .build());
    
            //valkey instance with endpoints
            var instance_user_auto_connInstance = new Instance("instance-user-auto-connInstance", InstanceArgs.builder()
                .instanceId("instance-user-auto-conn")
                .shardCount(1)
                .desiredPscAutoConnections(InstanceDesiredPscAutoConnectionArgs.builder()
                    .network(network1.id())
                    .projectId(project.projectId())
                    .build())
                .location("us-central1")
                .deletionProtectionEnabled(false)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(default_)
                    .build());
    
            var forwardingRule1Network2 = new ForwardingRule("forwardingRule1Network2", ForwardingRuleArgs.builder()
                .name("fwd1-net2")
                .region("us-central1")
                .ipAddress(ip1Network2.id())
                .loadBalancingScheme("")
                .network(network2.id())
                .target(instance_user_auto_connInstance.pscAttachmentDetails().applyValue(_pscAttachmentDetails -> _pscAttachmentDetails[0].serviceAttachment()))
                .build());
    
            var ip2Network2 = new Address("ip2Network2", AddressArgs.builder()
                .name("ip2-net2")
                .region("us-central1")
                .subnetwork(subnetNetwork2.id())
                .addressType("INTERNAL")
                .purpose("GCE_ENDPOINT")
                .build());
    
            var forwardingRule2Network2 = new ForwardingRule("forwardingRule2Network2", ForwardingRuleArgs.builder()
                .name("fwd2-net2")
                .region("us-central1")
                .ipAddress(ip2Network2.id())
                .loadBalancingScheme("")
                .network(network2.id())
                .target(instance_user_auto_connInstance.pscAttachmentDetails().applyValue(_pscAttachmentDetails -> _pscAttachmentDetails[1].serviceAttachment()))
                .build());
    
            var instance_user_auto_conn = new InstanceDesiredUserCreatedEndpoints("instance-user-auto-conn", InstanceDesiredUserCreatedEndpointsArgs.builder()
                .name("instance-user-auto-conn")
                .region("us-central1")
                .desiredUserCreatedEndpoints(InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs.builder()
                    .connections(                
                        InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs.builder()
                            .pscConnection(InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs.builder()
                                .pscConnectionId(forwardingRule1Network2.pscConnectionId())
                                .ipAddress(ip1Network2.address())
                                .forwardingRule(forwardingRule1Network2.id())
                                .network(network2.id())
                                .serviceAttachment(instance_user_auto_connInstance.pscAttachmentDetails().applyValue(_pscAttachmentDetails -> _pscAttachmentDetails[0].serviceAttachment()))
                                .build())
                            .build(),
                        InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs.builder()
                            .pscConnection(InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs.builder()
                                .pscConnectionId(forwardingRule2Network2.pscConnectionId())
                                .ipAddress(ip2Network2.address())
                                .forwardingRule(forwardingRule2Network2.id())
                                .network(network2.id())
                                .serviceAttachment(instance_user_auto_connInstance.pscAttachmentDetails().applyValue(_pscAttachmentDetails -> _pscAttachmentDetails[1].serviceAttachment()))
                                .build())
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      instance-user-auto-conn:
        type: gcp:memorystore:InstanceDesiredUserCreatedEndpoints
        properties:
          name: instance-user-auto-conn
          region: us-central1
          desiredUserCreatedEndpoints:
            - connections:
                - pscConnection:
                    pscConnectionId: ${forwardingRule1Network2.pscConnectionId}
                    ipAddress: ${ip1Network2.address}
                    forwardingRule: ${forwardingRule1Network2.id}
                    network: ${network2.id}
                    serviceAttachment: ${["instance-user-auto-connInstance"].pscAttachmentDetails[0].serviceAttachment}
                - pscConnection:
                    pscConnectionId: ${forwardingRule2Network2.pscConnectionId}
                    ipAddress: ${ip2Network2.address}
                    forwardingRule: ${forwardingRule2Network2.id}
                    network: ${network2.id}
                    serviceAttachment: ${["instance-user-auto-connInstance"].pscAttachmentDetails[1].serviceAttachment}
      forwardingRule1Network2:
        type: gcp:compute:ForwardingRule
        name: forwarding_rule1_network2
        properties:
          name: fwd1-net2
          region: us-central1
          ipAddress: ${ip1Network2.id}
          loadBalancingScheme: ""
          network: ${network2.id}
          target: ${["instance-user-auto-connInstance"].pscAttachmentDetails[0].serviceAttachment}
      forwardingRule2Network2:
        type: gcp:compute:ForwardingRule
        name: forwarding_rule2_network2
        properties:
          name: fwd2-net2
          region: us-central1
          ipAddress: ${ip2Network2.id}
          loadBalancingScheme: ""
          network: ${network2.id}
          target: ${["instance-user-auto-connInstance"].pscAttachmentDetails[1].serviceAttachment}
      ip1Network2:
        type: gcp:compute:Address
        name: ip1_network2
        properties:
          name: ip1-net2
          region: us-central1
          subnetwork: ${subnetNetwork2.id}
          addressType: INTERNAL
          purpose: GCE_ENDPOINT
      ip2Network2:
        type: gcp:compute:Address
        name: ip2_network2
        properties:
          name: ip2-net2
          region: us-central1
          subnetwork: ${subnetNetwork2.id}
          addressType: INTERNAL
          purpose: GCE_ENDPOINT
      subnetNetwork2:
        type: gcp:compute:Subnetwork
        name: subnet_network2
        properties:
          name: subnet-net2
          ipCidrRange: 10.0.0.248/29
          region: us-central1
          network: ${network2.id}
      network2:
        type: gcp:compute:Network
        properties:
          name: network2
          autoCreateSubnetworks: false
      # valkey instance with endpoints
      instance-user-auto-connInstance:
        type: gcp:memorystore:Instance
        name: instance-user-auto-conn
        properties:
          instanceId: instance-user-auto-conn
          shardCount: 1
          desiredPscAutoConnections:
            - network: ${network1.id}
              projectId: ${project.projectId}
          location: us-central1
          deletionProtectionEnabled: false
        options:
          dependsOn:
            - ${default}
      default:
        type: gcp:networkconnectivity:ServiceConnectionPolicy
        properties:
          name: scpolicy
          location: us-central1
          serviceClass: gcp-memorystore
          description: my basic service connection policy
          network: ${network1.id}
          pscConfig:
            subnetworks:
              - ${subnetNetwork1.id}
      subnetNetwork1:
        type: gcp:compute:Subnetwork
        name: subnet_network1
        properties:
          name: subnet-net1
          ipCidrRange: 10.0.0.248/29
          region: us-central1
          network: ${network1.id}
      network1:
        type: gcp:compute:Network
        properties:
          name: net1
          autoCreateSubnetworks: false
    variables:
      project:
        fn::invoke:
          function: gcp:organizations:getProject
          arguments: {}
    

    Create InstanceDesiredUserCreatedEndpoints Resource

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

    Constructor syntax

    new InstanceDesiredUserCreatedEndpoints(name: string, args: InstanceDesiredUserCreatedEndpointsArgs, opts?: CustomResourceOptions);
    @overload
    def InstanceDesiredUserCreatedEndpoints(resource_name: str,
                                            args: InstanceDesiredUserCreatedEndpointsArgs,
                                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def InstanceDesiredUserCreatedEndpoints(resource_name: str,
                                            opts: Optional[ResourceOptions] = None,
                                            region: Optional[str] = None,
                                            desired_user_created_endpoints: Optional[Sequence[InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs]] = None,
                                            name: Optional[str] = None,
                                            project: Optional[str] = None)
    func NewInstanceDesiredUserCreatedEndpoints(ctx *Context, name string, args InstanceDesiredUserCreatedEndpointsArgs, opts ...ResourceOption) (*InstanceDesiredUserCreatedEndpoints, error)
    public InstanceDesiredUserCreatedEndpoints(string name, InstanceDesiredUserCreatedEndpointsArgs args, CustomResourceOptions? opts = null)
    public InstanceDesiredUserCreatedEndpoints(String name, InstanceDesiredUserCreatedEndpointsArgs args)
    public InstanceDesiredUserCreatedEndpoints(String name, InstanceDesiredUserCreatedEndpointsArgs args, CustomResourceOptions options)
    
    type: gcp:memorystore:InstanceDesiredUserCreatedEndpoints
    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 InstanceDesiredUserCreatedEndpointsArgs
    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 InstanceDesiredUserCreatedEndpointsArgs
    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 InstanceDesiredUserCreatedEndpointsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceDesiredUserCreatedEndpointsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceDesiredUserCreatedEndpointsArgs
    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 instanceDesiredUserCreatedEndpointsResource = new Gcp.MemoryStore.InstanceDesiredUserCreatedEndpoints("instanceDesiredUserCreatedEndpointsResource", new()
    {
        Region = "string",
        DesiredUserCreatedEndpoints = new[]
        {
            new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs
            {
                Connections = new[]
                {
                    new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs
                    {
                        PscConnection = new Gcp.MemoryStore.Inputs.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs
                        {
                            ForwardingRule = "string",
                            IpAddress = "string",
                            Network = "string",
                            PscConnectionId = "string",
                            ServiceAttachment = "string",
                            ConnectionType = "string",
                            ProjectId = "string",
                            PscConnectionStatus = "string",
                        },
                    },
                },
            },
        },
        Name = "string",
        Project = "string",
    });
    
    example, err := memorystore.NewInstanceDesiredUserCreatedEndpoints(ctx, "instanceDesiredUserCreatedEndpointsResource", &memorystore.InstanceDesiredUserCreatedEndpointsArgs{
    	Region: pulumi.String("string"),
    	DesiredUserCreatedEndpoints: memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArray{
    		&memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs{
    			Connections: memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArray{
    				&memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs{
    					PscConnection: &memorystore.InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs{
    						ForwardingRule:      pulumi.String("string"),
    						IpAddress:           pulumi.String("string"),
    						Network:             pulumi.String("string"),
    						PscConnectionId:     pulumi.String("string"),
    						ServiceAttachment:   pulumi.String("string"),
    						ConnectionType:      pulumi.String("string"),
    						ProjectId:           pulumi.String("string"),
    						PscConnectionStatus: pulumi.String("string"),
    					},
    				},
    			},
    		},
    	},
    	Name:    pulumi.String("string"),
    	Project: pulumi.String("string"),
    })
    
    var instanceDesiredUserCreatedEndpointsResource = new InstanceDesiredUserCreatedEndpoints("instanceDesiredUserCreatedEndpointsResource", InstanceDesiredUserCreatedEndpointsArgs.builder()
        .region("string")
        .desiredUserCreatedEndpoints(InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs.builder()
            .connections(InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs.builder()
                .pscConnection(InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs.builder()
                    .forwardingRule("string")
                    .ipAddress("string")
                    .network("string")
                    .pscConnectionId("string")
                    .serviceAttachment("string")
                    .connectionType("string")
                    .projectId("string")
                    .pscConnectionStatus("string")
                    .build())
                .build())
            .build())
        .name("string")
        .project("string")
        .build());
    
    instance_desired_user_created_endpoints_resource = gcp.memorystore.InstanceDesiredUserCreatedEndpoints("instanceDesiredUserCreatedEndpointsResource",
        region="string",
        desired_user_created_endpoints=[{
            "connections": [{
                "psc_connection": {
                    "forwarding_rule": "string",
                    "ip_address": "string",
                    "network": "string",
                    "psc_connection_id": "string",
                    "service_attachment": "string",
                    "connection_type": "string",
                    "project_id": "string",
                    "psc_connection_status": "string",
                },
            }],
        }],
        name="string",
        project="string")
    
    const instanceDesiredUserCreatedEndpointsResource = new gcp.memorystore.InstanceDesiredUserCreatedEndpoints("instanceDesiredUserCreatedEndpointsResource", {
        region: "string",
        desiredUserCreatedEndpoints: [{
            connections: [{
                pscConnection: {
                    forwardingRule: "string",
                    ipAddress: "string",
                    network: "string",
                    pscConnectionId: "string",
                    serviceAttachment: "string",
                    connectionType: "string",
                    projectId: "string",
                    pscConnectionStatus: "string",
                },
            }],
        }],
        name: "string",
        project: "string",
    });
    
    type: gcp:memorystore:InstanceDesiredUserCreatedEndpoints
    properties:
        desiredUserCreatedEndpoints:
            - connections:
                - pscConnection:
                    connectionType: string
                    forwardingRule: string
                    ipAddress: string
                    network: string
                    projectId: string
                    pscConnectionId: string
                    pscConnectionStatus: string
                    serviceAttachment: string
        name: string
        project: string
        region: string
    

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

    Region string
    The name of the region of the Memorystore instance these endpoints should be added to.


    DesiredUserCreatedEndpoints List<InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpoint>
    A list of desired user endpoints Structure is documented below.
    Name string
    The name of the Memorystore instance these endpoints should be added to.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    The name of the region of the Memorystore instance these endpoints should be added to.


    DesiredUserCreatedEndpoints []InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs
    A list of desired user endpoints Structure is documented below.
    Name string
    The name of the Memorystore instance these endpoints should be added to.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    The name of the region of the Memorystore instance these endpoints should be added to.


    desiredUserCreatedEndpoints List<InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpoint>
    A list of desired user endpoints Structure is documented below.
    name String
    The name of the Memorystore instance these endpoints should be added to.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region string
    The name of the region of the Memorystore instance these endpoints should be added to.


    desiredUserCreatedEndpoints InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpoint[]
    A list of desired user endpoints Structure is documented below.
    name string
    The name of the Memorystore instance these endpoints should be added to.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region str
    The name of the region of the Memorystore instance these endpoints should be added to.


    desired_user_created_endpoints Sequence[InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs]
    A list of desired user endpoints Structure is documented below.
    name str
    The name of the Memorystore instance these endpoints should be added to.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    The name of the region of the Memorystore instance these endpoints should be added to.


    desiredUserCreatedEndpoints List<Property Map>
    A list of desired user endpoints Structure is documented below.
    name String
    The name of the Memorystore instance these endpoints should be added to.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the InstanceDesiredUserCreatedEndpoints 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 InstanceDesiredUserCreatedEndpoints Resource

    Get an existing InstanceDesiredUserCreatedEndpoints 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?: InstanceDesiredUserCreatedEndpointsState, opts?: CustomResourceOptions): InstanceDesiredUserCreatedEndpoints
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            desired_user_created_endpoints: Optional[Sequence[InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs]] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            region: Optional[str] = None) -> InstanceDesiredUserCreatedEndpoints
    func GetInstanceDesiredUserCreatedEndpoints(ctx *Context, name string, id IDInput, state *InstanceDesiredUserCreatedEndpointsState, opts ...ResourceOption) (*InstanceDesiredUserCreatedEndpoints, error)
    public static InstanceDesiredUserCreatedEndpoints Get(string name, Input<string> id, InstanceDesiredUserCreatedEndpointsState? state, CustomResourceOptions? opts = null)
    public static InstanceDesiredUserCreatedEndpoints get(String name, Output<String> id, InstanceDesiredUserCreatedEndpointsState state, CustomResourceOptions options)
    resources:  _:    type: gcp:memorystore:InstanceDesiredUserCreatedEndpoints    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:
    DesiredUserCreatedEndpoints List<InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpoint>
    A list of desired user endpoints Structure is documented below.
    Name string
    The name of the Memorystore instance these endpoints should be added to.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    The name of the region of the Memorystore instance these endpoints should be added to.


    DesiredUserCreatedEndpoints []InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs
    A list of desired user endpoints Structure is documented below.
    Name string
    The name of the Memorystore instance these endpoints should be added to.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    The name of the region of the Memorystore instance these endpoints should be added to.


    desiredUserCreatedEndpoints List<InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpoint>
    A list of desired user endpoints Structure is documented below.
    name String
    The name of the Memorystore instance these endpoints should be added to.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    The name of the region of the Memorystore instance these endpoints should be added to.


    desiredUserCreatedEndpoints InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpoint[]
    A list of desired user endpoints Structure is documented below.
    name string
    The name of the Memorystore instance these endpoints should be added to.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region string
    The name of the region of the Memorystore instance these endpoints should be added to.


    desired_user_created_endpoints Sequence[InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs]
    A list of desired user endpoints Structure is documented below.
    name str
    The name of the Memorystore instance these endpoints should be added to.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region str
    The name of the region of the Memorystore instance these endpoints should be added to.


    desiredUserCreatedEndpoints List<Property Map>
    A list of desired user endpoints Structure is documented below.
    name String
    The name of the Memorystore instance these endpoints should be added to.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    The name of the region of the Memorystore instance these endpoints should be added to.


    Supporting Types

    InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpoint, InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointArgs

    connections List<Property Map>
    Structure is documented below.

    InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnection, InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionArgs

    PscConnection InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnection
    Detailed information of a PSC connection that is created by the customer who owns the cluster. Structure is documented below.
    PscConnection InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnection
    Detailed information of a PSC connection that is created by the customer who owns the cluster. Structure is documented below.
    pscConnection InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnection
    Detailed information of a PSC connection that is created by the customer who owns the cluster. Structure is documented below.
    pscConnection InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnection
    Detailed information of a PSC connection that is created by the customer who owns the cluster. Structure is documented below.
    psc_connection InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnection
    Detailed information of a PSC connection that is created by the customer who owns the cluster. Structure is documented below.
    pscConnection Property Map
    Detailed information of a PSC connection that is created by the customer who owns the cluster. Structure is documented below.

    InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnection, InstanceDesiredUserCreatedEndpointsDesiredUserCreatedEndpointConnectionPscConnectionArgs

    ForwardingRule string
    The URI of the consumer side forwarding rule. Format: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}
    IpAddress string
    The IP allocated on the consumer network for the PSC forwarding rule.
    Network string
    The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.
    PscConnectionId string
    The PSC connection id of the forwarding rule connected to the service attachment.
    ServiceAttachment string
    The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.
    ConnectionType string
    (Output) Output Only. Type of a PSC Connection. Possible values: CONNECTION_TYPE_DISCOVERY CONNECTION_TYPE_PRIMARY CONNECTION_TYPE_READER
    ProjectId string
    The consumer project_id where the forwarding rule is created from.
    PscConnectionStatus string
    (Output) Output Only. The status of the PSC connection: whether a connection exists and ACTIVE or it no longer exists. Possible values: ACTIVE NOT_FOUND
    ForwardingRule string
    The URI of the consumer side forwarding rule. Format: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}
    IpAddress string
    The IP allocated on the consumer network for the PSC forwarding rule.
    Network string
    The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.
    PscConnectionId string
    The PSC connection id of the forwarding rule connected to the service attachment.
    ServiceAttachment string
    The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.
    ConnectionType string
    (Output) Output Only. Type of a PSC Connection. Possible values: CONNECTION_TYPE_DISCOVERY CONNECTION_TYPE_PRIMARY CONNECTION_TYPE_READER
    ProjectId string
    The consumer project_id where the forwarding rule is created from.
    PscConnectionStatus string
    (Output) Output Only. The status of the PSC connection: whether a connection exists and ACTIVE or it no longer exists. Possible values: ACTIVE NOT_FOUND
    forwardingRule String
    The URI of the consumer side forwarding rule. Format: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}
    ipAddress String
    The IP allocated on the consumer network for the PSC forwarding rule.
    network String
    The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.
    pscConnectionId String
    The PSC connection id of the forwarding rule connected to the service attachment.
    serviceAttachment String
    The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.
    connectionType String
    (Output) Output Only. Type of a PSC Connection. Possible values: CONNECTION_TYPE_DISCOVERY CONNECTION_TYPE_PRIMARY CONNECTION_TYPE_READER
    projectId String
    The consumer project_id where the forwarding rule is created from.
    pscConnectionStatus String
    (Output) Output Only. The status of the PSC connection: whether a connection exists and ACTIVE or it no longer exists. Possible values: ACTIVE NOT_FOUND
    forwardingRule string
    The URI of the consumer side forwarding rule. Format: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}
    ipAddress string
    The IP allocated on the consumer network for the PSC forwarding rule.
    network string
    The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.
    pscConnectionId string
    The PSC connection id of the forwarding rule connected to the service attachment.
    serviceAttachment string
    The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.
    connectionType string
    (Output) Output Only. Type of a PSC Connection. Possible values: CONNECTION_TYPE_DISCOVERY CONNECTION_TYPE_PRIMARY CONNECTION_TYPE_READER
    projectId string
    The consumer project_id where the forwarding rule is created from.
    pscConnectionStatus string
    (Output) Output Only. The status of the PSC connection: whether a connection exists and ACTIVE or it no longer exists. Possible values: ACTIVE NOT_FOUND
    forwarding_rule str
    The URI of the consumer side forwarding rule. Format: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}
    ip_address str
    The IP allocated on the consumer network for the PSC forwarding rule.
    network str
    The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.
    psc_connection_id str
    The PSC connection id of the forwarding rule connected to the service attachment.
    service_attachment str
    The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.
    connection_type str
    (Output) Output Only. Type of a PSC Connection. Possible values: CONNECTION_TYPE_DISCOVERY CONNECTION_TYPE_PRIMARY CONNECTION_TYPE_READER
    project_id str
    The consumer project_id where the forwarding rule is created from.
    psc_connection_status str
    (Output) Output Only. The status of the PSC connection: whether a connection exists and ACTIVE or it no longer exists. Possible values: ACTIVE NOT_FOUND
    forwardingRule String
    The URI of the consumer side forwarding rule. Format: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}
    ipAddress String
    The IP allocated on the consumer network for the PSC forwarding rule.
    network String
    The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.
    pscConnectionId String
    The PSC connection id of the forwarding rule connected to the service attachment.
    serviceAttachment String
    The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.
    connectionType String
    (Output) Output Only. Type of a PSC Connection. Possible values: CONNECTION_TYPE_DISCOVERY CONNECTION_TYPE_PRIMARY CONNECTION_TYPE_READER
    projectId String
    The consumer project_id where the forwarding rule is created from.
    pscConnectionStatus String
    (Output) Output Only. The status of the PSC connection: whether a connection exists and ACTIVE or it no longer exists. Possible values: ACTIVE NOT_FOUND

    Import

    InstanceDesiredUserCreatedEndpoints can be imported using any of these accepted formats:

    • projects/{{project}}/locations/{{region}}/instances/{{name}}

    • {{project}}/{{region}}/{{name}}

    • {{region}}/{{name}}

    • {{name}}

    When using the pulumi import command, InstanceDesiredUserCreatedEndpoints can be imported using one of the formats above. For example:

    $ pulumi import gcp:memorystore/instanceDesiredUserCreatedEndpoints:InstanceDesiredUserCreatedEndpoints default projects/{{project}}/locations/{{region}}/instances/{{name}}
    
    $ pulumi import gcp:memorystore/instanceDesiredUserCreatedEndpoints:InstanceDesiredUserCreatedEndpoints default {{project}}/{{region}}/{{name}}
    
    $ pulumi import gcp:memorystore/instanceDesiredUserCreatedEndpoints:InstanceDesiredUserCreatedEndpoints default {{region}}/{{name}}
    
    $ pulumi import gcp:memorystore/instanceDesiredUserCreatedEndpoints:InstanceDesiredUserCreatedEndpoints default {{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 v8.29.0 published on Thursday, May 1, 2025 by Pulumi