On this page
aws_dhcp_options resource
Use the aws_dhcp_options InSpec audit resource to test properties of a single AWS DHCP Options.
Syntax
Ensure that an aws_dhcp_options exists
describe aws_dhcp_options('dopt-0123456789abcdefg') do
it { should exist }
end
describe aws_dhcp_options(dhcp_options_id: 'dopt-0123456789abcdefg') do
it { should exist }
end
Parameters
dhcp_options_id (required)
This resource accepts a single parameter, the DHCP Options ID which uniquely identifies the DHCP Options. This can be passed either as a string or as a dhcp_options_id: 'value' key-value entry in a hash.
See also the AWS documentation on EC2.
Properties
| Property | Description |
|---|---|
| dhcp_configurations | The list of dhcp configurations |
| domain_name_servers | The list of domain name servers in the dhcp configuration |
| ntp_servers | The list of ntp servers in the dhcp configuration |
| tags | The tags of the DHCP Options. |
Test tags on the DHCP Options
describe aws_dhcp_options('dopt-0123456789abcdefg') do
its('tags') { should include(:Environment => 'env-name',
:Name => 'dhcp-options-name')}
end
AWS Permissions
Your Principal will need the ec2:DescribeDhcpOptions action with Effect set to Allow.
You can find detailed documentation at Actions, Resources, and Condition Keys for Amazon EC2.
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/inspec/resources/aws_dhcp_options/