pulumi / pulumi-policy-aws

A policy pack of rules to enforce AWS best practices for security, reliability, cost, and more!
https://www.pulumi.com
Apache License 2.0
35 stars 7 forks source link

Expose ApiGatewayEndpointTypeArgs interface #60

Closed rsclarke-vgw closed 4 years ago

rsclarke-vgw commented 4 years ago

Attempting to compile the simple example given resulted in the following error from the typescript compiler.

import {AwsGuard} from '@pulumi/awsguard';
new AwsGuard({all: 'advisory'});
node_modules/@pulumi/awsguard/apiGateway.d.ts:7:54 - error TS2304: Cannot find name 'ApiGatewayEndpointTypeArgs'.

7         apiGatewayEndpointType?: EnforcementLevel | (ApiGatewayEndpointTypeArgs & PolicyArgs);

I believe this is due to ApiGatewayEndpointTypeArgs being marked as @internal unlike other argument declarations. This PR simply removes the @internal decoration on the interface.

rsclarke-vgw commented 4 years ago

Integration tests fail due to error: unable to discover AWS AccessKeyID and/or SecretAccessKey perhaps as I'm external?

Changelog updates needed? Unsure on release process.

justinvp commented 4 years ago

Thanks for the fix, @rsclarke-vgw! The reason our tests didn't catch this is because we generate a JavaScript policy pack rather than TypeScript policy pack. I've opened https://github.com/pulumi/pulumi-policy-aws/issues/62 to track adding some TypeScript coverage.

Integration tests fail due to error: unable to discover AWS AccessKeyID and/or SecretAccessKey perhaps as I'm external?

Yes, this is just because you're external. I've run your change locally and it looks good! Thanks again!