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

Remove mappings to aws classic resources #163

Merged
merged 5 commits into from
Sep 9, 2024

Conversation

corymhall
Copy link
Contributor

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

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
@corymhall corymhall force-pushed the corymhall/remove-classic-mappings branch from 3c75969 to da9f689 Compare September 6, 2024 12:40
Copy link
Contributor Author

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]);
Copy link
Contributor Author

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.
Copy link
Member

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': {
Copy link
Member

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?

Copy link
Contributor Author

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(
Copy link
Member

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.

@corymhall corymhall merged commit 2e63bde into main Sep 9, 2024
8 checks passed
@corymhall corymhall deleted the corymhall/remove-classic-mappings branch September 9, 2024 17:02
@mjeffryes mjeffryes added this to the 0.110 milestone Sep 12, 2024
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v1.0.0.

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.

4 participants