Skip to content

Commit 9043813

Browse files
authored
CFNV2: fix community issues after attempted pro fixes (#13101)
1 parent 5ffe691 commit 9043813

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/aws-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ jobs:
273273
events-v1:
274274
- 'tests/aws/services/events/**'
275275
cloudformation-v2:
276+
- 'localstack-core/localstack/services/cloudformation/**'
276277
- 'tests/aws/services/cloudformation/**'
277278
sns-v2:
278279
- 'tests/aws/services/sns/**' # todo: potentially add more locations (lambda/sqs tests?)

localstack-core/localstack/services/cloudformation/engine/v2/change_set_model_preproc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
from localstack.utils.strings import to_bytes
6161
from localstack.utils.urls import localstack_host
6262

63-
_AWS_URL_SUFFIX = localstack_host().host_and_port() # The value in AWS is "amazonaws.com"
63+
_AWS_URL_SUFFIX = localstack_host().host # The value in AWS is "amazonaws.com"
6464

6565
_PSEUDO_PARAMETERS: Final[set[str]] = {
6666
"AWS::Partition",
@@ -450,7 +450,8 @@ def _perform_static_replacements(value: str) -> str:
450450
prefix = api_match[1]
451451
host = api_match[2]
452452
path = api_match[3]
453-
value = f"{prefix}{host}/{path}"
453+
port = localstack_host().port
454+
value = f"{prefix}{host}:{port}/{path}"
454455
return value
455456

456457
return value

localstack-core/localstack/services/cloudformation/resource_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def execute_action(
563563
@staticmethod
564564
def try_load_resource_provider(resource_type: str) -> ResourceProvider | None:
565565
# TODO: unify namespace of plugins
566-
if resource_type.startswith("Custom"):
566+
if resource_type and resource_type.startswith("Custom"):
567567
resource_type = "AWS::CloudFormation::CustomResource"
568568

569569
# 1. try to load pro resource provider

0 commit comments

Comments
 (0)