Alibaba Cloud
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
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var exampleNetwork = new AliCloud.Vpc.Network("exampleNetwork", new AliCloud.Vpc.NetworkArgs
{
VpcName = "test",
CidrBlock = "172.16.0.0/12",
});
var exampleDhcpOptionsSet = new AliCloud.Vpc.DhcpOptionsSet("exampleDhcpOptionsSet", new AliCloud.Vpc.DhcpOptionsSetArgs
{
DhcpOptionsSetName = "example_value",
DhcpOptionsSetDescription = "example_value",
DomainName = "example.com",
DomainNameServers = "100.100.2.136",
});
var exampleDhcpOptionsSetAttachment = new AliCloud.Vpc.DhcpOptionsSetAttachment("exampleDhcpOptionsSetAttachment", new AliCloud.Vpc.DhcpOptionsSetAttachmentArgs
{
VpcId = exampleNetwork.Id,
DhcpOptionsSetId = exampleDhcpOptionsSet.Id,
});
}
}
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleNetwork, err := vpc.NewNetwork(ctx, "exampleNetwork", &vpc.NetworkArgs{
VpcName: pulumi.String("test"),
CidrBlock: pulumi.String("172.16.0.0/12"),
})
if err != nil {
return err
}
exampleDhcpOptionsSet, err := vpc.NewDhcpOptionsSet(ctx, "exampleDhcpOptionsSet", &vpc.DhcpOptionsSetArgs{
DhcpOptionsSetName: pulumi.String("example_value"),
DhcpOptionsSetDescription: pulumi.String("example_value"),
DomainName: pulumi.String("example.com"),
DomainNameServers: pulumi.String("100.100.2.136"),
})
if err != nil {
return err
}
_, err = vpc.NewDhcpOptionsSetAttachment(ctx, "exampleDhcpOptionsSetAttachment", &vpc.DhcpOptionsSetAttachmentArgs{
VpcId: exampleNetwork.ID(),
DhcpOptionsSetId: exampleDhcpOptionsSet.ID(),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
example_network = alicloud.vpc.Network("exampleNetwork",
vpc_name="test",
cidr_block="172.16.0.0/12")
example_dhcp_options_set = alicloud.vpc.DhcpOptionsSet("exampleDhcpOptionsSet",
dhcp_options_set_name="example_value",
dhcp_options_set_description="example_value",
domain_name="example.com",
domain_name_servers="100.100.2.136")
example_dhcp_options_set_attachment = alicloud.vpc.DhcpOptionsSetAttachment("exampleDhcpOptionsSetAttachment",
vpc_id=example_network.id,
dhcp_options_set_id=example_dhcp_options_set.id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const exampleNetwork = new alicloud.vpc.Network("exampleNetwork", {
vpcName: "test",
cidrBlock: "172.16.0.0/12",
});
const exampleDhcpOptionsSet = new alicloud.vpc.DhcpOptionsSet("exampleDhcpOptionsSet", {
dhcpOptionsSetName: "example_value",
dhcpOptionsSetDescription: "example_value",
domainName: "example.com",
domainNameServers: "100.100.2.136",
});
const exampleDhcpOptionsSetAttachment = new alicloud.vpc.DhcpOptionsSetAttachment("exampleDhcpOptionsSetAttachment", {
vpcId: exampleNetwork.id,
dhcpOptionsSetId: exampleDhcpOptionsSet.id,
});
Coming soon!
Create a DhcpOptionsSetAttachment Resource
new DhcpOptionsSetAttachment(name: string, args: DhcpOptionsSetAttachmentArgs, opts?: CustomResourceOptions);
@overload
def DhcpOptionsSetAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
dhcp_options_set_id: Optional[str] = None,
dry_run: Optional[bool] = None,
vpc_id: Optional[str] = None)
@overload
def DhcpOptionsSetAttachment(resource_name: str,
args: DhcpOptionsSetAttachmentArgs,
opts: Optional[ResourceOptions] = None)
func NewDhcpOptionsSetAttachment(ctx *Context, name string, args DhcpOptionsSetAttachmentArgs, opts ...ResourceOption) (*DhcpOptionsSetAttachment, error)
public DhcpOptionsSetAttachment(string name, DhcpOptionsSetAttachmentArgs args, CustomResourceOptions? opts = null)
public DhcpOptionsSetAttachment(String name, DhcpOptionsSetAttachmentArgs args)
public DhcpOptionsSetAttachment(String name, DhcpOptionsSetAttachmentArgs args, CustomResourceOptions options)
type: alicloud:vpc:DhcpOptionsSetAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DhcpOptionsSetAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DhcpOptionsSetAttachmentArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DhcpOptionsSetAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DhcpOptionsSetAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DhcpOptionsSetAttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DhcpOptionsSetAttachment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The DhcpOptionsSetAttachment resource accepts the following input properties:
- Dhcp
Options stringSet Id The ID of the DHCP options set.
- Vpc
Id string The ID of the VPC network that is to be associated with the DHCP options set..
- Dry
Run bool Specifies whether to precheck this request only. Default values:
false
. Valid values:
- Dhcp
Options stringSet Id The ID of the DHCP options set.
- Vpc
Id string The ID of the VPC network that is to be associated with the DHCP options set..
- Dry
Run bool Specifies whether to precheck this request only. Default values:
false
. Valid values:
- dhcp
Options StringSet Id The ID of the DHCP options set.
- vpc
Id String The ID of the VPC network that is to be associated with the DHCP options set..
- dry
Run Boolean Specifies whether to precheck this request only. Default values:
false
. Valid values:
- dhcp
Options stringSet Id The ID of the DHCP options set.
- vpc
Id string The ID of the VPC network that is to be associated with the DHCP options set..
- dry
Run boolean Specifies whether to precheck this request only. Default values:
false
. Valid values:
- dhcp_
options_ strset_ id The ID of the DHCP options set.
- vpc_
id str The ID of the VPC network that is to be associated with the DHCP options set..
- dry_
run bool Specifies whether to precheck this request only. Default values:
false
. Valid values:
- dhcp
Options StringSet Id The ID of the DHCP options set.
- vpc
Id String The ID of the VPC network that is to be associated with the DHCP options set..
- dry
Run Boolean Specifies whether to precheck this request only. Default values:
false
. Valid values:
Outputs
All input properties are implicitly available as output properties. Additionally, the DhcpOptionsSetAttachment resource produces the following output properties:
Look up an Existing DhcpOptionsSetAttachment Resource
Get an existing DhcpOptionsSetAttachment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DhcpOptionsSetAttachmentState, opts?: CustomResourceOptions): DhcpOptionsSetAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dhcp_options_set_id: Optional[str] = None,
dry_run: Optional[bool] = None,
status: Optional[str] = None,
vpc_id: Optional[str] = None) -> DhcpOptionsSetAttachment
func GetDhcpOptionsSetAttachment(ctx *Context, name string, id IDInput, state *DhcpOptionsSetAttachmentState, opts ...ResourceOption) (*DhcpOptionsSetAttachment, error)
public static DhcpOptionsSetAttachment Get(string name, Input<string> id, DhcpOptionsSetAttachmentState? state, CustomResourceOptions? opts = null)
public static DhcpOptionsSetAttachment get(String name, Output<String> id, DhcpOptionsSetAttachmentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Dhcp
Options stringSet Id The ID of the DHCP options set.
- Dry
Run bool Specifies whether to precheck this request only. Default values:
false
. Valid values:- Status string
- Vpc
Id string The ID of the VPC network that is to be associated with the DHCP options set..
- Dhcp
Options stringSet Id The ID of the DHCP options set.
- Dry
Run bool Specifies whether to precheck this request only. Default values:
false
. Valid values:- Status string
- Vpc
Id string The ID of the VPC network that is to be associated with the DHCP options set..
- dhcp
Options StringSet Id The ID of the DHCP options set.
- dry
Run Boolean Specifies whether to precheck this request only. Default values:
false
. Valid values:- status String
- vpc
Id String The ID of the VPC network that is to be associated with the DHCP options set..
- dhcp
Options stringSet Id The ID of the DHCP options set.
- dry
Run boolean Specifies whether to precheck this request only. Default values:
false
. Valid values:- status string
- vpc
Id string The ID of the VPC network that is to be associated with the DHCP options set..
- dhcp_
options_ strset_ id The ID of the DHCP options set.
- dry_
run bool Specifies whether to precheck this request only. Default values:
false
. Valid values:- status str
- vpc_
id str The ID of the VPC network that is to be associated with the DHCP options set..
- dhcp
Options StringSet Id The ID of the DHCP options set.
- dry
Run Boolean Specifies whether to precheck this request only. Default values:
false
. Valid values:- status String
- vpc
Id String The ID of the VPC network that is to be associated with the DHCP options set..
Import
VPC Dhcp Options Set Attachment can be imported using the id, e.g.
$ pulumi import alicloud:vpc/dhcpOptionsSetAttachment:DhcpOptionsSetAttachment example <id>
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.