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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support BucketDeployment #60

Open
Tracked by #111
PeterWhiteCL opened this issue Aug 23, 2022 · 4 comments
Open
Tracked by #111

Support BucketDeployment #60

PeterWhiteCL opened this issue Aug 23, 2022 · 4 comments
Labels
kind/enhancement Improvements or new features

Comments

@PeterWhiteCL
Copy link

Hello!

  • Vote on this issue by adding a 馃憤 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

I'm trying use CDK v2 to deploy files to a bucket via "aws-cdk-lib/aws-s3-deployment" and using BucketDeployment, but the resource type is Custom::CDKBucketDeployment and there is no direct mapping to it for Cloud Control API (https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/supported-resources.html). Even with manual mapping, it doesn't really seem to work.Looking for a fix or workaround Peter WhiteAug 10, 2022, 05:02 PDTm trying use CDK v2 to deploy files to a bucket via "aws-cdk-lib/aws-s3-deployment" and using BucketDeployment, but the resource type is Custom::CDKBucketDeployment and there is no direct mapping to it for Cloud Control API (https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/supported-resources.html). Even with manual mapping, it doesn't really seem to work .Looking for a fix or workaround
We are trying use CDK v2 to deploy files to a bucket via "aws-cdk-lib/aws-s3-deployment" and using BucketDeployment, but the resource type is Custom::CDKBucketDeployment and there is no direct mapping to it for Cloud Control API (https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/supported-resources.html). Even with manual mapping, it doesn't really seem to work.Looking for a fix or workaround

This is for an article commissioned by Pulumi. I have attached a link to a repository containing the code for the project from our author.

Affected area/feature

pulumi-cdk-static.zip

@PeterWhiteCL PeterWhiteCL added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Aug 23, 2022
@t0yv0 t0yv0 removed the needs-triage Needs attention from the triage team label Aug 23, 2022
@t0yv0
Copy link
Member

t0yv0 commented Aug 23, 2022

@PeterWhiteCL we use the GitHub issues for enhancement requests and/or bug reports against Pulumi components. Could you clarify if this request is one of those? Is Pulumi missing support for a Bucket Deployment?

@lukehoban lukehoban transferred this issue from pulumi/pulumi Aug 23, 2022
@lukehoban lukehoban changed the title Static site deployment to S3 Bucket Support BucketDeployment Aug 23, 2022
@lukehoban
Copy link
Member

We don鈥檛 currently have support for the custom resources BucketDeployment creates and uses.

We will likely need to polyfill this with a Pulumi-native solution.

In the meantime, users can polyfill themselves via use of https://github.com/pulumi/pulumi-cdk#remapcloudcontrolresource.

@robert-databooster
Copy link

@lukehoban I've been experimenting with CDK Custom Resources support this weekend. It's doable, but the Clouformation naming convention of "Custom::ExampleResource" is clashing with Pulumi's URN format. When the double colons (::) are in the Pulumi resource name, it throws an "invalid URN format".

I got around this by directly changing this line from interop.ts:

super(cdk:construct:${constructType}, constructName, {}, options);
to
super(cdk:construct:${constructType}.replace("::", ":"), constructName.replace("::", ":"), {}, options);

With this change, Pulumi doesn't throw the "invalid URN" error.

I realize this is just a "hack" and there's probably a better way to do it, but it's enough to confirm where the issue is.

@lukehoban
Copy link
Member

@robert-databooster great to hear! Yes - sounds like we鈥檒l need to escape the constructType and constructName given that CF naming requirements are different than Pulumi naming. I think the proposed transform makes sense. Can review more closely if you have a PR ready for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

4 participants