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

Correctly support apiKeySource in classic provider #1159

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

lukehoban
Copy link
Contributor

We were previously passing apiKeySource only via Swagger. Even though AWS API Gateway does include the API key source in the swagger on output, it apparently does not read it from the swagger on updates.

However, it does support passing it outside of the Swagger, so we just pass this along directly to the RestAPI constructor is specified.

We could in principle stop sending it in the Swagger as well (since I don't think it's read from there at all), but I am avoiding changing that in case it has other subtle impacts on behaviour.

Fixes #1057.

We were previously passing apiKeySource only via Swagger.  Even though AWS API Gateway does include the API key source in the swagger on output, it apparently does not read it from the swagger on updates.

However, it does support passing it outside of the Swagger, so we just pass this along directly to the RestAPI constructor is specified.

We could in principle *stop* sending it in the Swagger as well (since I don't think it's read from there at all), but I am avoiding changing that in case it has other subtle impacts on behaviour.
@lukehoban lukehoban force-pushed the lukehoban/apiKeySource-classic branch from 7a60bdb to 6df3adc Compare November 21, 2023 01:25
@thomas11
Copy link
Contributor

Thank you @lukehoban! Your PR description doesn't say, so I gotta ask, did you test this change manually?

It would be awesome to have a two-step test in examples/ that repros the issue submitter's issue with editing the apiKeySource after up but the effort might not be warranted for an uncommon issue in awsx-classic.

@lukehoban
Copy link
Contributor Author

It would be awesome to have a two-step test in examples/ that repros the issue submitter's issue with editing the apiKeySource after up but the effort might not be warranted for an uncommon issue in awsx-classic.

Agreed - I'll get a test added before we merge this.

@lukehoban
Copy link
Contributor Author

@thomas11 Test added - ready for review.

Copy link
Member

@mjeffryes mjeffryes left a comment

Choose a reason for hiding this comment

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

Thanks, Luke! I've filed an issue for us to port this fix into pulumi-aws-apigateway as well

@lukehoban
Copy link
Contributor Author

I've filed an issue for us to port this fix into pulumi-aws-apigateway as well

Great. I’ve got a PR nearly ready for that - so happy to finish that up once this is merged.

@lukehoban lukehoban merged commit cc3553a into master Nov 24, 2023
9 checks passed
@lukehoban lukehoban deleted the lukehoban/apiKeySource-classic branch November 24, 2023 18:23
@lukehoban
Copy link
Contributor Author

I’ve got a PR nearly ready for that - so happy to finish that up once this is merged.

Tracked in pulumi/pulumi-aws-apigateway#112.

lukehoban pushed a commit to pulumi/pulumi-aws-apigateway that referenced this pull request Nov 24, 2023
Ports the fix from pulumi/pulumi-awsx#1159 into this package.

Requires an awkward workaround for #111 (the workaround also takes a dependency on the currently broken behaviour, so this test will start failing when #111 is fixed).

Fixes #110.
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.

apiKeySource not updated in awsx.classic.apigateway.API
3 participants