Provides a VPC DHCP Options Association resource.
resource "aws_vpc_dhcp_options_association" "dns_resolver" {
vpc_id = aws_vpc.foo.id
dhcp_options_id = aws_vpc_dhcp_options.foo.id
}
This resource supports the following arguments:
vpc_id
- (Required) The ID of the VPC to which we would like to associate a DHCP Options Set.dhcp_options_id
- (Required) The ID of the DHCP Options Set to associate to the VPC.default
DHCP Options Set to the VPC.This resource exports the following attributes in addition to the arguments above:
id
- The ID of the DHCP Options Set Association.In Terraform v1.5.0 and later, use an import
block to import DHCP associations using the VPC ID associated with the options. For example:
import {
to = aws_vpc_dhcp_options_association.imported
id = "vpc-0f001273ec18911b1"
}
Using terraform import
, import DHCP associations using the VPC ID associated with the options. For example:
% terraform import aws_vpc_dhcp_options_association.imported vpc-0f001273ec18911b1