{"record":{"id":"b328e92096a29620","repo":"anomalyco/sst","slug":"you-are-using-the-vpc-v1-component-please-migra","errorCode":null,"errorMessage":"You are using the \"Vpc.v1\" component. Please migrate to the latest \"Vpc\" component.","messagePattern":"You are using the \"Vpc\\.v1\" component\\. Please migrate to the latest \"Vpc\" component\\.","errorType":"exception","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/aws/cluster.ts","lineNumber":268,"sourceCode":"            [\n              `There have been some minor changes to the \"Cluster\" component that's being referenced by \"${name}\".\\n`,\n              `To update, you'll need to redeploy the stage where the cluster was created. And then redeploy this stage.`,\n            ].join(\"\\n\"),\n          );\n        }\n\n        registerVersion(refVersion);\n\n        return cluster;\n      });\n\n      return { cluster: clusterValidated };\n    }\n\n    function normalizeVpc() {\n      // \"vpc\" is a Vpc.v1 component\n      if (args.vpc instanceof VpcV1) {\n        throw new VisibleError(\n          `You are using the \"Vpc.v1\" component. Please migrate to the latest \"Vpc\" component.`,\n        );\n      }\n\n      // \"vpc\" is a Vpc component\n      if (args.vpc instanceof Vpc) {\n        return args.vpc;\n      }\n\n      // \"vpc\" is object\n      return output(args.vpc).apply((vpc) => {\n        if (vpc.containerSubnets && vpc.serviceSubnets)\n          throw new VisibleError(\n            `You cannot provide both \"vpc.containerSubnets\" and \"vpc.serviceSubnets\" in the \"${name}\" Cluster component. The \"serviceSubnets\" property has been deprecated. Use \"containerSubnets\" instead.`,\n          );\n        if (!vpc.containerSubnets && !vpc.serviceSubnets)\n          throw new VisibleError(\n            `Missing \"vpc.containerSubnets\" for the \"${name}\" Cluster component.`,","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/aws/cluster.ts#L250-L286","documentation":"SST renamed and redesigned the VPC component; the old one remains importable as Vpc.v1. Cluster no longer accepts Vpc.v1 instances, so passing one produces a VisibleError instructing migration to the new Vpc component.","triggerScenarios":"new sst.aws.Cluster(...) with args.vpc set to an instance created by the legacy Vpc.v1 component (imported from sst.aws.VpcV1). Detected by instanceof VpcV1 in normalizeVpc.","commonSituations":"Upgrading SST across a breaking Vpc redesign: old vpc.v1.ts code still instantiates Vpc.v1 while Cluster was updated; copy-pasted examples from older SST docs.","solutions":["Replace new sst.aws.Vpc.v1('MyVpc', ...) with the new sst.aws.Vpc component and migrate its args (e.g. nat, subnets layout changes).","Point the Cluster's vpc arg at the new Vpc instance.","See the SST Vpc v1 migration guide for the argument mapping."],"exampleFix":"// before\nconst vpc = new sst.aws.Vpc.v1('MyVpc', { nat: 'auto' });\nconst cluster = new sst.aws.Cluster('MyCluster', { vpc });\n// after\nconst vpc = new sst.aws.Vpc('MyVpc', { nat: 'auto' });\nconst cluster = new sst.aws.Cluster('MyCluster', { vpc });","handlingStrategy":"type-guard","validationCode":"function assertNewVpc(vpc) {\n  if (vpc instanceof sst.aws.VpcV1)\n    throw new Error('Migrate to sst.aws.Vpc before passing to Cluster');\n}\nassertNewVpc(vpc);","typeGuard":"const isVpcV1 = (vpc) => vpc instanceof sst.aws.VpcV1;","tryCatchPattern":null,"preventionTips":["Search codebase for 'Vpc.v1' after SST upgrades and migrate.","Import Vpc only from the current sst.aws namespace.","Follow SST changelog/migration notes for breaking component renames."],"tags":["aws","vpc","deprecated-component","migration","sst-version"],"backgroundTag":"deprecated-component-migration-required","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}