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

Docs: Example for additional cache behaviours #1301

Open
devmarwen opened this issue Oct 17, 2024 · 1 comment
Open

Docs: Example for additional cache behaviours #1301

devmarwen opened this issue Oct 17, 2024 · 1 comment
Assignees

Comments

@devmarwen
Copy link

On SST v2 we had this additionalBehaviors

const site = new NextjsSite(stack, "site", {
  // ... 
  cdk: {
    distribution: {
      // ...
      additionalBehaviors: {
        "/a/*": {
          origin: aOrigin,
        },
        "/b/*": {
          origin: bOrigin,
        },
        "/c/*": {
          origin: cOrigin,
        },
      },
    },
  },
});

How to migrate this to SST v3. Using transform.cdn did not help because it overridden orderedCacheBehaviors/origins SST had generated

const site = new sst.aws.Nextjs("ffd-nextfront-ion", {
  transform: {
    cdn: {
      orderedCacheBehaviors: [newCacheBehavior],
      origins: [googleOrigin],
    },
  },
});

If it's not supported at the moment, can we combine SST v3 (Pulumi) with CDK ? An example would be much appreciated.

@jayair jayair self-assigned this Oct 18, 2024
@jayair
Copy link
Contributor

jayair commented Oct 18, 2024

I'll add an example for this but here's a snippet from somebody in Discord https://discord.com/channels/983865673656705025/1227658579046174872/1228260750695465001

@jayair jayair changed the title Migrating additionalBehaviors from SST v2 to SST v3 Docs: Example for additional cache behaviours Oct 18, 2024
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

No branches or pull requests

2 participants