diff --git a/components/schemas/environments/services/discovery/DiscoveryConfig.yml b/components/schemas/environments/services/discovery/DiscoveryConfig.yml index cc0ebab2..c4d01b68 100644 --- a/components/schemas/environments/services/discovery/DiscoveryConfig.yml +++ b/components/schemas/environments/services/discovery/DiscoveryConfig.yml @@ -6,11 +6,6 @@ properties: anyOf: - $ref: ../../../Duration.yml - type: "null" - dual_stack_legacy: - description: When enabled, discovery will return both IPv6 and IPv4 when in legacy mode. Otherwise, only IPv4 will be returned. - anyOf: - - type: boolean - - type: "null" hosts: description: A mapping of hostnames to IP addresses for custom internal resolutions. Acts as a custom /etc/resolv.conf file that works environment wide. oneOf: @@ -40,3 +35,18 @@ properties: items: type: string - type: "null" + dual_stack_legacy: + description: When enabled, discovery will return both IPv6 and IPv4 when in legacy mode. Otherwise, only IPv4 will be returned. + anyOf: + - type: boolean + - type: "null" + external_resolution: + anyOf: + - type: object + required: + - preference + properties: + preference: + type: string + enum: [default, ipv4, ipv6] + - type: "null" diff --git a/stackspec/schema/services/discovery/StackSpecDiscoveryConfig.yml b/stackspec/schema/services/discovery/StackSpecDiscoveryConfig.yml index 53935298..d4a2292e 100644 --- a/stackspec/schema/services/discovery/StackSpecDiscoveryConfig.yml +++ b/stackspec/schema/services/discovery/StackSpecDiscoveryConfig.yml @@ -6,12 +6,6 @@ properties: - $ref: ../../../../components/schemas/Duration.yml - $ref: ../../StackVariable.yml - type: "null" - dual_stack_legacy: - description: When enabled, discovery will return both IPv6 and IPv4 when in legacy mode. Otherwise, only IPv4 will be returned. - anyOf: - - type: boolean - - $ref: ../../StackVariable.yml - - type: "null" hosts: description: A custom mapping of hosts - for forced resolution of specific IPs for a domain. oneOf: @@ -46,3 +40,20 @@ properties: type: string - $ref: ../../StackVariable.yml - type: "null" + dual_stack_legacy: + description: When enabled, discovery will return both IPv6 and IPv4 when in legacy mode. Otherwise, only IPv4 will be returned. + anyOf: + - type: boolean + - $ref: ../../StackVariable.yml + - type: "null" + external_resolution: + anyOf: + - type: object + required: + - preference + properties: + preference: + type: string + enum: [default, ipv4, ipv6] + - $ref: ../../StackVariable.yml + - type: "null"