Any suggestions on how to create a mysql-provider ...
# aws
d
Any suggestions on how to create a mysql-provider for a rds-cluster inside a VPC? My current code looks like this but I guess I have to take my ip and add it to some rule maybe?
Copy code
const m2cluster = new aws.rds.Cluster(
  'magento2-cluster',
  {
    backupRetentionPeriod: 5,
    masterUsername: mysqlUser,
    masterPassword: mysqlPassword,
    preferredBackupWindow: '07:00-09:00',
    deletionProtection: !isDev,
    vpcSecurityGroupIds: [sg.id],
    dbSubnetGroupName: subnetGroup.name,
    tags: pulumiTags,
    clusterIdentifierPrefix: 'magento2-cluster',
    databaseName: 'MAGENTO',
    skipFinalSnapshot: isDev,
    // finalSnapshotIdentifier: 'magento2-cluster-snapshot',
    storageEncrypted: true,
  },
  {
    dependsOn: subnetGroup,
  },
);

const mysqlProvider = new mysql.Provider(
  'mysql',
  {
    endpoint: m2cluster.endpoint,
    username: m2cluster.masterUsername,
    password: m2cluster.masterPassword.apply((p) => p!.toString()),
  },
  {
    dependsOn: m2cluster,
  },
);
m
Ran into similar, and tried to solve it by creating a lambda that runs the provisioner… but then ran into a secret “feature” that strips out pulumi packages… So… I still think the correct route is to create an “operations microservice” in lambda that can run the pulumi provisioners, however, it will have to be deployed without pulumi, until pulumi removes that “feature”.
d
@millions-furniture-75402 I see, thanks!