Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added APIGW V2 Authorizer property mapping #5623

Closed
Closed
Changes from 1 commit
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
10 changes: 6 additions & 4 deletions tests/unit/hook_packages/terraform/hooks/prepare/prepare_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,14 +971,14 @@ def setUp(self) -> None:
self.tf_apigwv2_authorizer_resource: dict = {
**self.tf_apigwv2_authorizer_common_attributes,
"values": self.tf_apigwv2_authorizer_properties,
"address": f"aws_api_gateway_authorizer.{self.apigwv2_authorizer_name}",
"address": f"aws_apigatewayv2_authorizer.{self.apigwv2_authorizer_name}",
"name": self.apigwv2_authorizer_name,
}

self.expectedv2_cfn_apigw_authorizer: dict = {
self.expected_cfn_apigwv2_authorizer: dict = {
"Type": AWS_APIGATEWAY_V2_AUTHORIZER,
"Properties": self.expected_cfn_apigwv2_authorizer_properties,
"Metadata": {"SamResourceId": f"aws_api_gateway_authorizer.{self.apigwv2_authorizer_name}"},
"Metadata": {"SamResourceId": f"aws_apigatewayv2_authorizer.{self.apigwv2_authorizer_name}"},
}

self.tf_json_with_root_module_only: dict = {
Expand All @@ -1001,6 +1001,7 @@ def setUp(self) -> None:
self.tf_apigwv2_route_resource,
self.tf_apigwv2_stage_resource,
self.tf_apigwv2_integration_resource,
self.tf_apigwv2_authorizer_resource,
]
}
}
Expand All @@ -1022,9 +1023,10 @@ def setUp(self) -> None:
f"AwsApigatewayv2RouteMyApigwv2Route{self.mock_logical_id_hash}": self.expected_cfn_apigwv2_route,
f"AwsApigatewayv2StageMyApigwv2Stage{self.mock_logical_id_hash}": self.expected_cfn_apigwv2_stage,
f"AwsApigatewayv2IntegrationMyApigwv2Integration{self.mock_logical_id_hash}": self.expected_cfn_apigwv2_integration,
f"AwsApigatewayv2AuthorizerMyAuthorizerV2{self.mock_logical_id_hash}": self.expected_cfn_apigwv2_authorizer,
},
}

self.maxDiff = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to set this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, left over from debugging, will remove

self.tf_json_with_root_module_with_sam_metadata_resources: dict = {
"planned_values": {
"root_module": {
Expand Down