get Vpc Iam Pool
aws.ec2.VpcIpamPool
provides details about an IPAM pool. This resource can prove useful when an ipam pool was created in another root module and you need the pool's id as an input variable. For example, pools can be shared via RAM and used to create vpcs with CIDRs from that pool.
Example Usage
The following example shows an account that has only 1 pool, perhaps shared via RAM, and using that pool id to create a VPC with a CIDR derived from AWS IPAM.
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.GetVpcIamPoolArgs;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
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 testVpcIamPool = Ec2Functions.getVpcIamPool(GetVpcIamPoolArgs.builder()
.filters(
GetVpcIamPoolFilterArgs.builder()
.name("description")
.values("*test*")
.build(),
GetVpcIamPoolFilterArgs.builder()
.name("address-family")
.values("ipv4")
.build())
.build());
var testVpc = new Vpc("testVpc", VpcArgs.builder()
.ipv4IpamPoolId(testVpcIamPool.applyValue(getVpcIamPoolResult -> getVpcIamPoolResult.id()))
.ipv4NetmaskLength(28)
.build());
}
}
Return
A collection of values returned by getVpcIamPool.
Parameters
A collection of arguments for invoking getVpcIamPool.
Return
A collection of values returned by getVpcIamPool.
Parameters
Tags that are required to create resources in using this pool.
Custom filter block as described below.
ID of the IPAM pool.
ID of the IPAM pool you would like information on.
Map of tags to assigned to the resource.
See also
Return
A collection of values returned by getVpcIamPool.
Parameters
Builder for com.pulumi.aws.ec2.kotlin.inputs.GetVpcIamPoolPlainArgs.