Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion moto/sns/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,7 @@ def get_config_resource(self, resource_id: str) -> dict[str, Any] | None:
"arn": topic.arn,
"awsRegion": self.region_name,
"availabilityZone": "Not Applicable",
"tags": dict(topic._tags),
"configuration": {
"topicArn": topic.arn,
"displayName": topic.display_name,
Expand All @@ -1284,7 +1285,7 @@ def get_config_resource(self, resource_id: str) -> dict[str, Any] | None:
},
"supplementaryConfiguration": {
"Tags": json.dumps(
[{"Key": k, "Value": v} for k, v in topic._tags.items()]
[{"key": k, "value": v} for k, v in topic._tags.items()]
)
},
"configurationItemMD5Hash": "",
Expand Down
7 changes: 6 additions & 1 deletion tests/test_sns/test_topics.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,12 @@ def test_get_config_resource():
assert configuration["fifoTopic"] is True
assert configuration["contentBasedDeduplication"] is True
tags = json.loads(config_item["supplementaryConfiguration"]["Tags"])
assert tags == [{"Key": "Environment", "Value": "Test"}]
assert tags == [{"key": "Environment", "value": "Test"}]

history = config_client.get_resource_config_history(
resourceType="AWS::SNS::Topic", resourceId=topic_arn
)
assert history["configurationItems"][0]["tags"] == {"Environment": "Test"}

response = config_client.batch_get_resource_config(
resourceKeys=[
Expand Down
Loading