Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created May 1, 2023 01:22
Show Gist options
  • Select an option

  • Save KyMidd/c98b8c9b3f57a9ee5f9b289e29ab9d51 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/c98b8c9b3f57a9ee5f9b289e29ab9d51 to your computer and use it in GitHub Desktop.
resource "aws_api_gateway_deployment" "github_cop_api_gateway_deployment" {
depends_on = [
aws_api_gateway_integration.github_cop_api_gateway_lambda_integration,
aws_api_gateway_integration.github_cop_api_gateway_lambda_root,
]
rest_api_id = aws_api_gateway_rest_api.github_cop_api_gateway.id
stage_name = "cop"
}
resource "aws_lambda_permission" "lambda_permission" {
statement_id = "APIGatewayToGitHubCopNewRepoTriggerLambda"
action = "lambda:InvokeFunction"
function_name = "GitHubCopRepoTrigger"
principal = "apigateway.amazonaws.com"
source_arn = "${aws_api_gateway_rest_api.github_cop_api_gateway.execution_arn}/*"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment