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

@aws-cdk/aws-appsync: missing IntrospectionConfig property #28429

Closed
grant-d opened this issue Dec 19, 2023 · 1 comment · Fixed by #28500
Closed

@aws-cdk/aws-appsync: missing IntrospectionConfig property #28429

grant-d opened this issue Dec 19, 2023 · 1 comment · Fixed by #28500
Labels
@aws-cdk/aws-appsync Related to AWS AppSync bug This issue is a bug. effort/medium Medium work item – several days of effort needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2

Comments

@grant-d
Copy link

grant-d commented Dec 19, 2023

Describe the bug

I am creating an Appsync API, and want to disable query introspection. This is useful for trimming the security surface-area of (any, but in this case, Appsync) GraphQL api.
(We can debate the pros/cons of doing this, but since the service exposes the switch in the UI, let's assume there's good reason for it)

Said property is in the UI (see screenshot below) and also surfaced in the AWS SDK
However, it is not available in CF or CDK, so I need to use an explicit property override to set it via the CDK.
Additionally, I had to figure this out via trial and error - there is no help that I could find online.

    import * as appsync from '@aws-cdk/aws-appsync-alpha' // 2.54.0-alpha.0
    import * as aps from 'aws-cdk-lib/aws-appsync' // 2.114.1

    const api = new appsync.GraphqlApi(this, 'Api', {...})
    const cfnApi = api.node.defaultChild as aps.CfnGraphQLApi
    cfnApi.addPropertyOverride('IntrospectionConfig', 'DISABLED') // <-- Hackery
image

Expected Behavior

The L1 or L2 constructs should expose said property directly

Current Behavior

Need to use a property override to set the property. This does have the desired effect, ie the UI changes accordingly

Reproduction Steps

Code shown above

Possible Solution

Expose said property

Additional Information/Context

Perhaps this is actually a CloudFormation bug, not specifically CDK

CDK CLI Version

2.110.0 (build c6471f2)

Framework Version

cdk/lib = 2.114.1, @aws-cdk/aws-appsync-alpha = 2.54.0-alpha.0

Node.js Version

v18.18.2

OS

Mac, 14.2 (23C64)

Language

TypeScript

Language Version

5.3.3

Other information

No response

@grant-d grant-d added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 19, 2023
@github-actions github-actions bot added the @aws-cdk/aws-appsync Related to AWS AppSync label Dec 19, 2023
@khushail khushail added needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Dec 20, 2023
cm-iwata added a commit to cm-iwata/aws-cdk that referenced this issue Dec 27, 2023
@mergify mergify bot closed this as completed in #28500 Dec 28, 2023
mergify bot pushed a commit that referenced this issue Dec 28, 2023
Add support for [IntrospectionConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html#cfn-appsync-graphqlapi-introspectionconfig)

Closes #28429.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

paulhcsun pushed a commit to paulhcsun/aws-cdk that referenced this issue Jan 5, 2024
Add support for [IntrospectionConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html#cfn-appsync-graphqlapi-introspectionconfig)

Closes aws#28429.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-appsync Related to AWS AppSync bug This issue is a bug. effort/medium Medium work item – several days of effort needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants