1. Packages
  2. CloudAMQP
  3. API Docs
  4. getVpcInfo
CloudAMQP v3.18.0 published on Thursday, Jun 13, 2024 by Pulumi

cloudamqp.getVpcInfo

Explore with Pulumi AI

cloudamqp logo
CloudAMQP v3.18.0 published on Thursday, Jun 13, 2024 by Pulumi

    Use this data source to retrieve information about VPC for a CloudAMQP instance.

    Only available for CloudAMQP instances hosted in AWS.

    Example Usage

    AWS VPC peering pre v1.16.0
    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const vpcInfo = cloudamqp.getVpcInfo({
        instanceId: instance.id,
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    vpc_info = cloudamqp.get_vpc_info(instance_id=instance["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudamqp.GetVpcInfo(ctx, &cloudamqp.GetVpcInfoArgs{
    			InstanceId: pulumi.IntRef(instance.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var vpcInfo = CloudAmqp.GetVpcInfo.Invoke(new()
        {
            InstanceId = instance.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.CloudamqpFunctions;
    import com.pulumi.cloudamqp.inputs.GetVpcInfoArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var vpcInfo = CloudamqpFunctions.getVpcInfo(GetVpcInfoArgs.builder()
                .instanceId(instance.id())
                .build());
    
        }
    }
    
    variables:
      vpcInfo:
        fn::invoke:
          Function: cloudamqp:getVpcInfo
          Arguments:
            instanceId: ${instance.id}
    
    AWS VPC peering post v1.16.0 (Managed VPC)
    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const vpcInfo = cloudamqp.getVpcInfo({
        vpcId: vpc.id,
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    vpc_info = cloudamqp.get_vpc_info(vpc_id=vpc["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudamqp.GetVpcInfo(ctx, &cloudamqp.GetVpcInfoArgs{
    			VpcId: pulumi.StringRef(vpc.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var vpcInfo = CloudAmqp.GetVpcInfo.Invoke(new()
        {
            VpcId = vpc.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.CloudamqpFunctions;
    import com.pulumi.cloudamqp.inputs.GetVpcInfoArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var vpcInfo = CloudamqpFunctions.getVpcInfo(GetVpcInfoArgs.builder()
                .vpcId(vpc.id())
                .build());
    
        }
    }
    
    variables:
      vpcInfo:
        fn::invoke:
          Function: cloudamqp:getVpcInfo
          Arguments:
            vpcId: ${vpc.id}
    

    Attributes reference

    All attributes reference are computed

    • id - The identifier for this resource.
    • name - The name of the CloudAMQP instance.
    • vpc_subnet - Dedicated VPC subnet.
    • owner_id - AWS account identifier.
    • security_group_id - AWS security group identifier.

    Dependency

    Pre v1.16.0 This resource depends on CloudAMQP instance identifier, cloudamqp_instance.instance.id.

    Post v1.16.0 This resource depends on CloudAMQP managed VPC identifier, cloudamqp_vpc.vpc.id or instance identifier, cloudamqp_instance.instance.id.

    Using getVpcInfo

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getVpcInfo(args: GetVpcInfoArgs, opts?: InvokeOptions): Promise<GetVpcInfoResult>
    function getVpcInfoOutput(args: GetVpcInfoOutputArgs, opts?: InvokeOptions): Output<GetVpcInfoResult>
    def get_vpc_info(instance_id: Optional[int] = None,
                     vpc_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetVpcInfoResult
    def get_vpc_info_output(instance_id: Optional[pulumi.Input[int]] = None,
                     vpc_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetVpcInfoResult]
    func GetVpcInfo(ctx *Context, args *GetVpcInfoArgs, opts ...InvokeOption) (*GetVpcInfoResult, error)
    func GetVpcInfoOutput(ctx *Context, args *GetVpcInfoOutputArgs, opts ...InvokeOption) GetVpcInfoResultOutput

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

    public static class GetVpcInfo 
    {
        public static Task<GetVpcInfoResult> InvokeAsync(GetVpcInfoArgs args, InvokeOptions? opts = null)
        public static Output<GetVpcInfoResult> Invoke(GetVpcInfoInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVpcInfoResult> getVpcInfo(GetVpcInfoArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: cloudamqp:index/getVpcInfo:getVpcInfo
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId int

    The CloudAMQP instance identifier.

    Deprecated: Changed from required to optional in v1.16.0 will be removed in next major version (v2.0)

    VpcId string

    The managed VPC identifier.

    Note: Added as optional in version v1.16.0 and will be required in next major version (v2.0)

    InstanceId int

    The CloudAMQP instance identifier.

    Deprecated: Changed from required to optional in v1.16.0 will be removed in next major version (v2.0)

    VpcId string

    The managed VPC identifier.

    Note: Added as optional in version v1.16.0 and will be required in next major version (v2.0)

    instanceId Integer

    The CloudAMQP instance identifier.

    Deprecated: Changed from required to optional in v1.16.0 will be removed in next major version (v2.0)

    vpcId String

    The managed VPC identifier.

    Note: Added as optional in version v1.16.0 and will be required in next major version (v2.0)

    instanceId number

    The CloudAMQP instance identifier.

    Deprecated: Changed from required to optional in v1.16.0 will be removed in next major version (v2.0)

    vpcId string

    The managed VPC identifier.

    Note: Added as optional in version v1.16.0 and will be required in next major version (v2.0)

    instance_id int

    The CloudAMQP instance identifier.

    Deprecated: Changed from required to optional in v1.16.0 will be removed in next major version (v2.0)

    vpc_id str

    The managed VPC identifier.

    Note: Added as optional in version v1.16.0 and will be required in next major version (v2.0)

    instanceId Number

    The CloudAMQP instance identifier.

    Deprecated: Changed from required to optional in v1.16.0 will be removed in next major version (v2.0)

    vpcId String

    The managed VPC identifier.

    Note: Added as optional in version v1.16.0 and will be required in next major version (v2.0)

    getVpcInfo Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    OwnerId string
    SecurityGroupId string
    VpcSubnet string
    InstanceId int
    VpcId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    OwnerId string
    SecurityGroupId string
    VpcSubnet string
    InstanceId int
    VpcId string
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    ownerId String
    securityGroupId String
    vpcSubnet String
    instanceId Integer
    vpcId String
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    ownerId string
    securityGroupId string
    vpcSubnet string
    instanceId number
    vpcId string
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    owner_id str
    security_group_id str
    vpc_subnet str
    instance_id int
    vpc_id str
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    ownerId String
    securityGroupId String
    vpcSubnet String
    instanceId Number
    vpcId String

    Package Details

    Repository
    CloudAMQP pulumi/pulumi-cloudamqp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudamqp Terraform Provider.
    cloudamqp logo
    CloudAMQP v3.18.0 published on Thursday, Jun 13, 2024 by Pulumi