Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e611a0f

Browse files
committed
Update name
1 parent 6fc3bed commit e611a0f

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

‎localstack/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,9 @@ def populate_edge_configuration(
10191019
# Comma-separated list of regex patterns for DNS names to resolve locally.
10201020
# Any DNS name not matched against any of the patterns on this whitelist
10211021
# will resolve to the real DNS entry, rather than the local one.
1022-
DNS_SKIP_LOCAL_RESOLUTION = (os.environ.get("DNS_SKIP_LOCAL_RESOLUTION") or "").strip()
1022+
DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM = (
1023+
os.environ.get("DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM") or ""
1024+
).strip()
10231025
DNS_LOCAL_NAME_PATTERNS = (os.environ.get("DNS_LOCAL_NAME_PATTERNS") or "").strip() # deprecated
10241026

10251027
# IP address that AWS endpoints should resolve to in our local DNS server. By default,

‎localstack/deprecations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ def is_affected(self) -> bool:
272272
EnvVarDeprecation(
273273
"DNS_LOCAL_NAME_PATTERNS",
274274
"3.0.0",
275-
"This option was confusingly named. Please use DNS_SKIP_LOCAL_RESOLUTION instead.",
275+
"This option was confusingly named. Please use DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM "
276+
"instead.",
276277
),
277278
]
278279

‎localstack/dns/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,12 +828,12 @@ def start_server(upstream_dns: str, host: str, port: int = config.DNS_PORT):
828828
if config.LOCALSTACK_HOST.host != LOCALHOST_HOSTNAME:
829829
dns_server.add_host_pointing_to_localstack(f".*{config.LOCALSTACK_HOST.host}")
830830

831-
# support both DNS_SKIP_LOCAL_RESOLUTION and DNS_LOCAL_NAME_PATTERNS
831+
# support both DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM and DNS_LOCAL_NAME_PATTERNS
832832
# until the next major version change
833833
# TODO(srw): remove the usage of DNS_LOCAL_NAME_PATTERNS
834834
skip_local_resolution = " ".join(
835835
[
836-
config.DNS_SKIP_LOCAL_RESOLUTION,
836+
config.DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM,
837837
config.DNS_LOCAL_NAME_PATTERNS,
838838
]
839839
).strip()

‎tests/bootstrap/test_dns_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def test_skip_pattern(
8989
ContainerConfigurators.network(docker_network),
9090
ContainerConfigurators.env_vars(
9191
{
92-
"DNS_SKIP_LOCAL_RESOLUTION": r".*localhost.localstack.cloud",
92+
"DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM": r".*localhost.localstack.cloud",
9393
}
9494
),
9595
]

0 commit comments

Comments
 (0)