Learn Idem

Learn Idem

Powered by Idem Project

aws.ec2.dhcp_option

**Autogenerated function**

Deletes the specified set of DHCP options. You must disassociate the set of DHCP options before you can delete
it. You can disassociate the set of DHCP options by associating either a new set of options or the default set
of options with the VPC.

Args:
    name(Text): An Idem name to identify the dhcp option resource.
    resource_id(Text, optional): AWS DHCP Option Set ID. Idem automatically considers this resource being
     absent if this field is not specified.

Request Syntax:
    [dhcp_option-name]:
      aws.ec2.dhcp_option.absent:
      - name: 'string'
      - resource_id: 'string'

Returns:
    Dict[str, Any]

Examples:

    .. code-block:: sls

        resource_is_absent:
          aws.ec2.dhcp_option.absent:
            - name: value
**Autogenerated function**

Describe the resource in a way that can be recreated/managed with the corresponding "present" function


Describes one or more of your DHCP options sets. For more information, see DHCP options sets in the Amazon
Virtual Private Cloud User Guide.


Returns:
    Dict[str, Any]

Examples:

    .. code-block:: bash

        $ idem describe aws.ec2.dhcp_option
**Autogenerated function**

Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing
all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the
individual DHCP options you can specify. For more information about the options, see RFC 2132.    domain-name-
servers - The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set
specifies AmazonProvidedDNS. If specifying more than one domain name server, specify the IP addresses in a
single parameter, separated by commas. To have your instance receive a custom DNS hostname as specified in
domain-name, you must set domain-name-servers to a custom DNS server.    domain-name - If you're using
AmazonProvidedDNS in us-east-1, specify ec2.internal. If you're using AmazonProvidedDNS in another Region,
specify region.compute.internal (for example, ap-northeast-1.compute.internal). Otherwise, specify a domain name
(for example, ExampleCompany.com). This value is used to complete unqualified DNS hostnames. Important: Some
Linux operating systems accept multiple domain names separated by spaces. However, Windows and other Linux
operating systems treat the value as a single domain, which results in unexpected behavior. If your DHCP options
set is associated with a VPC that has instances with multiple operating systems, specify only one domain name.
ntp-servers - The IP addresses of up to four Network Time Protocol (NTP) servers.    netbios-name-servers - The
IP addresses of up to four NetBIOS name servers.    netbios-node-type - The NetBIOS node type (1, 2, 4, or 8).
We recommend that you specify 2 (broadcast and multicast are not currently supported). For more information
about these node types, see RFC 2132.   Your VPC automatically starts out with a set of DHCP options that
includes only a DNS server that we provide (AmazonProvidedDNS). If you create a set of options, and if your VPC
has an internet gateway, make sure to set the domain-name-servers option either to AmazonProvidedDNS or to a
domain name server of your choice. For more information, see DHCP options sets in the Amazon Virtual Private
Cloud User Guide.

Args:
    name(Text): An Idem name to identify the dhcp option resource.
    dhcp_configurations (List): A DHCP configuration option.
        * Key (str, optional): The name of a DHCP option. Options are domain-name-servers|domain-name|ntp-servers|netbios-name-servers|netbios-node-type
        * Values (List[str], optional): One or more values for the DHCP option.
            * Value (string): The attribute value. The value is case-sensitive.
    resource_id(Text, optional): AWS DHCP Option Set ID.
    tags(Dict or List, optional): Dict in the format of {tag-key: tag-value} or List of tags in the format of
        [{"Key": tag-key, "Value": tag-value}] to associate with the dhcp option resource. Defaults to None.
        * Key (string) --  The key of the tag. Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .
        * Value (string) -- The value of the tag. Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
    vpc_id (List, optional): The list of AWS VPC ID that needs to be associated with dhcp options set.

Request Syntax:
    [dhcp_option-name]:
      aws.ec2.dhcp_option.present:
      - resource_id: 'string'
      - dhcp_configurations:
          - Key: 'string'
            Values: List
                - Value: 'string'
      - vpc_id: 'List'
      - tags:
          - Key: 'string'
            Value: 'string'

Returns:
    Dict[str, Any]

Examples:

    .. code-block:: sls

        my-dhcp-option:
          aws.ec2.dhcp_option.present:
            - dhcp_configurations:
                - Key: domain-name-servers
                  Values:
                        - Value : 10.2.5.1
                        - Value : 10.2.5.2
            - vpc_id:
              - vpc-76db75b8
            - tags:
                - Key: test_name
                  Value: test-dhcp

Full plugin documentation is available on the Idem documentation site - aws.ec2.dhcp_option .

Last updated on 20 Sep 2022
 Edit on GitHub