Skip to content

Conversation

@erastusndico
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings October 24, 2025 11:02
@erastusndico erastusndico requested a review from a team as a code owner October 24, 2025 11:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes API Gateway access issues in the staging environment by ensuring proper dependency management for Lambda permissions and temporarily disabling CloudFront access restrictions.

Key Changes:

  • Added Lambda permission dependencies to API Gateway deployment to prevent race conditions
  • Commented out CloudFront access restriction policy
  • Updated checkov pre-commit hook version

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
aws/non-prod-infra/staging/apigateway_core.tf Added Lambda permission dependencies to deployment and commented out CloudFront restriction policy
.pre-commit-config.yaml Updated checkov version from 3.2.484 to 3.2.487

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

}
# # Restricts API Gateway access to CloudFront in staging
# resource "aws_api_gateway_rest_api_policy" "restrict_to_cloudfront" {
# count = var.env == "staging" || var.env == "staging" ? 1 : 0
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

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

The condition var.env == \"staging\" || var.env == \"staging\" is redundant—it checks the same condition twice. This should likely be var.env == \"staging\" or compare against a different environment value.

Suggested change
# count = var.env == "staging" || var.env == "staging" ? 1 : 0
# count = var.env == "staging" ? 1 : 0

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants