cloudamqp.getVpcInfo
Explore with Pulumi AI
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:
- 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 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 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 Integer 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 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 number 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 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)
- instance
Id Number 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 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
- Owner
Id string - Security
Group stringId - Vpc
Subnet string - Instance
Id int - Vpc
Id string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Owner
Id string - Security
Group stringId - Vpc
Subnet string - Instance
Id int - Vpc
Id string
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- owner
Id String - security
Group StringId - vpc
Subnet String - instance
Id Integer - vpc
Id String
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- owner
Id string - security
Group stringId - vpc
Subnet string - instance
Id number - vpc
Id string
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- owner_
id str - security_
group_ strid - vpc_
subnet str - instance_
id int - vpc_
id str
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- owner
Id String - security
Group StringId - vpc
Subnet String - instance
Id Number - vpc
Id String
Package Details
- Repository
- CloudAMQP pulumi/pulumi-cloudamqp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudamqp
Terraform Provider.