Skip to content

DNS checks should have hostname as attribute, not key #518

@sshipway

Description

@sshipway

Describe the feature:
Currently, DNS checks specify the hostname to resolve as a key. The server name to use for resolving is an attribute. However, if you want to test the same item resolving on multiple DNS servers you cannot do it as the resolving hostname is a unique key in the heira.

Describe the solution you'd like
As previously done with the exec resource, I would like to add a new attribute 'resolve' which optionally holds the hostname to resolve, overriding the key. This will allow structures such as:

dns:
  primaryserver:
    resolve: myhost.company.com
    server: ns0.company.com
    resolveable: yes
  secondaryserver:
    resolve: myhost.company.com
    server: ns1.company.com
    resolveable: yes

which will allow you to check correct name resolution from multiple DNS hosts, which is not currently possible.

I also believe that keeping the keys as symbolic only is a better way to work, with all the test definition held in the attributes, as this allows better control when merging.

Describe alternatives you've considered
It would be possible to use different resolution targets on different DNS servers, but this seems untidy, and may cause automation or scaling problems.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions