orange-zoo-84739
08/14/2025, 12:44 PMlemon-scooter-94063
08/14/2025, 2:43 PMconst rdsResourceId = <rds-instance-name>.resourceId
, Here is the link to the outputs supported: https://www.pulumi.com/registry/packages/aws/api-docs/rds/instance/#look-up
If your trying to get the resource id of an instance that exists already and wasn't created by Pulumi, you can use the get function that Pulumi provides: https://www.pulumi.com/registry/packages/aws/api-docs/rds/instance/#look-uporange-zoo-84739
08/14/2025, 2:52 PMlemon-scooter-94063
08/14/2025, 4:22 PMid
output and there is also a resourceId
output. The second one will get you the value that you're looking fororange-zoo-84739
08/15/2025, 8:00 AMlemon-scooter-94063
08/15/2025, 1:59 PMorange-zoo-84739
08/18/2025, 10:33 AM// auto creates a database in the rds server
const db = new sst.aws.Mysql("MetropolGuruDatabase", {
vpc,
version: "8.4.6",
storage: "20 GB",
transform: {
instance: (args, opts) => {
args.iamDatabaseAuthenticationEnabled = true // Client would need a way to calculate the correct tokens
}
},
// use your local docker db for strapi on dev mode
dev: {
host: "127.0.0.1",
port: 3306,
username: "strapi",
password: "strapi",
database: "strapi"
}
});
const strapiAndAstroWebServerDbAccess = new aws.iam.Policy("StrapiAndAstroWebServerDbAccess", {
name: "StrapiAndAstroWebServerDbAccess",
policy: aws.iam.getPolicyDocumentOutput({
statements: [
{
actions: [
"rds-db:connect"
],
resources: [$interpolate`arn:aws:rds-db:eu-central-1:${accountId}:dbuser:${db.nodes.instance?.resourceId}/strapi`]
}
]
}).json},
{
dependsOn: [db]
}
);