https://pulumi.com logo
#typescript
Title
# typescript
b

blue-mouse-93986

01/05/2023, 3:13 PM
Hi Guys! I'm trying to add code to import an existing dynamo db table to a stack. This is the code that I'm trying to write - but I'm missing the ID for the import
Copy code
export const name = new aws.dynamodb.Table("name", {
  attributes: [
      {
          name: "sortKeyName",
          type: "S",
      },
      {
          name: "partionKeyName",
          type: "S",
      },
  ],
  hashKey: "partionKeyName",
  name: "tempTableDeleteThis",
  pointInTimeRecovery: {
      enabled: false,
  },
  rangeKey: "sortKeyName",
  readCapacity: 5,
  ttl: {
      attributeName: "",
  },
  writeCapacity: 5,
},
{import:"WHAT ID DO I PUT HERE !?!?!?!?!?!?!"}
)
This is the example and disclaimer from the official documentation: example -
Copy code
import * as aws from "@pulumi/aws";

let group = new aws.ec2.SecurityGroup("my-sg", {
    name: "my-sg-62a569b",
    ingress: [{ protocol: "tcp", fromPort: 80, toPort: 80, cidrBlocks: ["0.0.0.0/0"] }],
}, { import: "sg-04aeda9a214730248" });
disclaimer-
Copy code
Note: Import IDs are resource specific. The ID to use is the same as the ID that gets assigned when Pulumi has provisioned a resource of that type from scratch and can be found in the resource's API docs. We support import IDs for all generally available providers.
any help would be appreciated 🙂
b

billowy-army-68599

01/05/2023, 5:57 PM
@blue-mouse-93986 it should just be the name of the table
so
tempTableDeleteThis
b

blue-mouse-93986

01/08/2023, 11:45 AM
thx!