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

Chalice & Cognito custom scope using API Gateway generated invoke_url #1860

Open
logachev opened this issue Dec 27, 2021 · 3 comments
Open
Labels

Comments

@logachev
Copy link

Hello,

I'm trying to create a Chalice app that supports custom scope from Cognito via Terraform.

I was looking at this example: https://aws.github.io/chalice/topics/authorizers.html
It is great, but it assumes that scope name is known before the deployment.

For test/dev deployments, I would like to just use API Gateway generated uri.

API Gateway Deployment cannot be created without the swagger, but swagger needs to know API Gateway invoke url to generate proper custom scope.. Is there any way to solve this issue?

@jamesls
Copy link
Member

jamesls commented Jan 5, 2022

Is terraform complaining about circular dependencies? I haven't tried to set this up myself, but can you use a terraform variable for a scope value? e.g scopes=["${aws_api_gateway_deployment.rest_api.invoke_url}/foobar.read"]

@no-response
Copy link

no-response bot commented Jan 12, 2022

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@no-response no-response bot closed this as completed Jan 12, 2022
@logachev
Copy link
Author

logachev commented Jan 13, 2022

@jamesls sorry, I missed your question.

Yes, it does complain about circular dependency.
The problem is that {aws_api_gateway_deployment.rest_api.invoke_url} is known when api_gateway is created, but it has a dependency on Chalice generated swagger. However, swagger includes all scopes, so that's where circular dep comes from

Can you reopen the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants