DhcpOptionsSetAttachment

Provides a VPC Dhcp Options Set Attachment resource. For information about VPC Dhcp Options Set and how to use it, see What is Dhcp Options Set.

NOTE: Available in v1.153.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.DhcpOptionsSet;
import com.pulumi.alicloud.vpc.DhcpOptionsSetArgs;
import com.pulumi.alicloud.vpc.DhcpOptionsSetAttachment;
import com.pulumi.alicloud.vpc.DhcpOptionsSetAttachmentArgs;
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 exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
.vpcName("test")
.cidrBlock("172.16.0.0/12")
.build());
var exampleDhcpOptionsSet = new DhcpOptionsSet("exampleDhcpOptionsSet", DhcpOptionsSetArgs.builder()
.dhcpOptionsSetName("example_value")
.dhcpOptionsSetDescription("example_value")
.domainName("example.com")
.domainNameServers("100.100.2.136")
.build());
var exampleDhcpOptionsSetAttachment = new DhcpOptionsSetAttachment("exampleDhcpOptionsSetAttachment", DhcpOptionsSetAttachmentArgs.builder()
.vpcId(exampleNetwork.id())
.dhcpOptionsSetId(exampleDhcpOptionsSet.id())
.build());
}
}

Import

VPC Dhcp Options Set Attachment can be imported using the id, e.g.

$ pulumi import alicloud:vpc/dhcpOptionsSetAttachment:DhcpOptionsSetAttachment example <id>

Properties

Link copied to clipboard

The ID of the DHCP options set.

Link copied to clipboard
val dryRun: Output<Boolean>?

Specifies whether to precheck this request only. Default values: false. Valid values:

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: Output<String>

The status of the VPC network that is associated with the DHCP options set. Valid values: InUse or Pending.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpcId: Output<String>

The ID of the VPC network that is to be associated with the DHCP options set..