-
Notifications
You must be signed in to change notification settings - Fork 5
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
Create aws ccapi resources by using the SDK #217
Conversation
This PR updates our mapping to create resources using the SDK directly instead of creating a `pulumi.CustomResource`. By using a `pulumi.CustomResource` we were missing out on all the resource specific things from the generated SDK. (`replaceOnChanges`, required property validation, etc). closes #216
@@ -114,6 +114,7 @@ describe('App Converter', () => { | |||
examplebucketPolicyE09B485E: { | |||
Type: 'AWS::S3::BucketPolicy', | |||
Properties: { | |||
PolicyDocument: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These updates to the tests are required because it now validates required properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff!
const mName = moduleName(typeName).toLowerCase(); | ||
const pType = pulumiTypeName(typeName); | ||
const awsModule = aws as any; | ||
return new awsModule[mName][pType](logicalId, props, options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
This only works for resources that are nested in a module. Which is fine as there's only the ExtensionResource
on the root level, which we do not use, and all CFN resources are nested in a module!
This PR has been shipped in release v1.0.0. |
This PR updates our mapping to create resources using the SDK directly
instead of creating a
pulumi.CustomResource
. By using apulumi.CustomResource
we were missing out on all the resource specificthings from the generated SDK. (
replaceOnChanges
, required propertyvalidation, etc).
closes #216