get Vpc Peering Connection
The VPC Peering Connection data source provides details about a specific VPC peering connection.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetVpcPeeringConnectionArgs;
import com.pulumi.aws.ec2.RouteTable;
import com.pulumi.aws.ec2.RouteTableArgs;
import com.pulumi.aws.ec2.Route;
import com.pulumi.aws.ec2.RouteArgs;
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 pc = Ec2Functions.getVpcPeeringConnection(GetVpcPeeringConnectionArgs.builder()
.vpcId(aws_vpc.foo().id())
.peerCidrBlock("10.0.1.0/22")
.build());
var rt = new RouteTable("rt", RouteTableArgs.builder()
.vpcId(aws_vpc.foo().id())
.build());
var route = new Route("route", RouteArgs.builder()
.routeTableId(rt.id())
.destinationCidrBlock(pc.applyValue(getVpcPeeringConnectionResult -> getVpcPeeringConnectionResult.peerCidrBlock()))
.vpcPeeringConnectionId(pc.applyValue(getVpcPeeringConnectionResult -> getVpcPeeringConnectionResult.id()))
.build());
}
}
Return
A collection of values returned by getVpcPeeringConnection.
Parameters
A collection of arguments for invoking getVpcPeeringConnection.
Return
A collection of values returned by getVpcPeeringConnection.
Parameters
Primary CIDR block of the requester VPC of the specific VPC Peering Connection to retrieve.
Custom filter block as described below.
ID of the specific VPC Peering Connection to retrieve.
AWS account ID of the owner of the requester VPC of the specific VPC Peering Connection to retrieve.
Primary CIDR block of the accepter VPC of the specific VPC Peering Connection to retrieve.
AWS account ID of the owner of the accepter VPC of the specific VPC Peering Connection to retrieve.
Region of the accepter VPC of the specific VPC Peering Connection to retrieve.
ID of the accepter VPC of the specific VPC Peering Connection to retrieve.
Region of the requester VPC of the specific VPC Peering Connection to retrieve.
Status of the specific VPC Peering Connection to retrieve.
Map of tags, each pair of which must exactly match a pair on the desired VPC Peering Connection. More complex filters can be expressed using one or more filter
sub-blocks, which take the following arguments:
ID of the requester VPC of the specific VPC Peering Connection to retrieve.
See also
Return
A collection of values returned by getVpcPeeringConnection.
Parameters
Builder for com.pulumi.aws.ec2.kotlin.inputs.GetVpcPeeringConnectionPlainArgs.