-
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
Remove mappings to aws classic resources #163
Conversation
This PR removes the manual mappings to aws classic resources that now exist in aws-native. BREAKING CHANGE: resources that were previously deployed with the `aws` provider are now deployed with the `aws-native` provider. This will cause resource replacement re #142
3c75969
to
da9f689
Compare
tests/cdk-resource.test.ts
Outdated
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.
I'm not sure we need these types of tests, but I thought to try it out.
debug(`Fn::GetAtt(${params[0]}, ${firstToLower(params[1])})`); | ||
return this.resolveAtt(params[0], firstToLower(params[1])); | ||
debug(`Fn::GetAtt(${params[0]}, ${params[1]})`); | ||
return this.resolveAtt(params[0], params[1]); |
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.
Inside the resolveAtt
function we use the toSdkName
function which already handles name conversion. Using firstToLower
here messed it up.
@@ -40,6 +39,9 @@ function tags(tags: pulumi.Input<pulumi.Input<CfnTags>[]> | undefined): AwsTags | |||
); | |||
} | |||
|
|||
/** | |||
* Any resource that does not currently exist in CCAPI can be mapped to an aws classic resource. |
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.
👍
), | ||
); | ||
return target; | ||
} | ||
// IAM | ||
case 'AWS::IAM::Policy': { |
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.
Curious this is really not supported by Cloud Control API or is there another reason this maps to AWS classic?
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.
It's not fully supported in CCAPI (missing READ/LIST) so it is not supported by aws-native.
import { aws_ssm } from 'aws-cdk-lib'; | ||
|
||
function setMocks(assertFn: (args: MockResourceArgs) => void) { | ||
pulumi.runtime.setMocks( |
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.
Nice use of unit testing facility.
This PR has been shipped in release v1.0.0. |
This PR removes the manual mappings to aws classic resources that now
exist in aws-native.
BREAKING CHANGE: resources that were previously deployed with the
aws
provider are now deployed with the
aws-native
provider. This willcause resource replacement
re #142