rds-aurora-bootstrapper 0.4.4 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +1 -1
- package/.jsii +129 -95
- package/API.md +46 -16
- package/README.md +35 -10
- package/assets/funcs/create-migrator.lambda/index.js +73 -25
- package/assets/funcs/create-migrator.lambda/index.js.map +3 -3
- package/assets/funcs/{aurora-database-create-owner.lambda → create-owner.lambda}/index.js +49 -18
- package/assets/funcs/create-owner.lambda/index.js.map +7 -0
- package/assets/funcs/create-schema.lambda/index.js +48 -9
- package/assets/funcs/create-schema.lambda/index.js.map +3 -3
- package/assets/funcs/create-user.lambda/index.js +73 -25
- package/assets/funcs/create-user.lambda/index.js.map +3 -3
- package/lib/aurora-database-create-migrator.js +99 -0
- package/lib/{constructs/aurora-database-create-owner.d.ts → aurora-database-create-owner.d.ts} +2 -0
- package/lib/aurora-database-create-owner.js +87 -0
- package/lib/{constructs/aurora-database-create-schema.d.ts → aurora-database-create-schema.d.ts} +16 -2
- package/lib/aurora-database-create-schema.js +101 -0
- package/lib/aurora-database-create-user.js +99 -0
- package/lib/{constructs/libs/postgresql → funcs/core}/assert-identifier.d.ts +2 -3
- package/lib/funcs/core/assert-identifier.js +21 -0
- package/lib/funcs/core/escape-string-literal.d.ts +7 -0
- package/lib/funcs/core/escape-string-literal.js +12 -0
- package/lib/funcs/core/parse-user-credentials.d.ts +18 -0
- package/lib/funcs/core/parse-user-credentials.js +37 -0
- package/lib/funcs/{libs/postgresql → core}/quote-identifier.d.ts +3 -4
- package/lib/funcs/core/quote-identifier.js +17 -0
- package/lib/funcs/core/read-string-property.d.ts +11 -0
- package/lib/funcs/core/read-string-property.js +21 -0
- package/lib/funcs/core/validate-errors.d.ts +14 -0
- package/lib/funcs/core/validate-errors.js +26 -0
- package/lib/funcs/create-migrator.lambda.d.ts +1 -1
- package/lib/funcs/create-migrator.lambda.js +17 -44
- package/lib/funcs/create-owner-function.d.ts +13 -0
- package/lib/funcs/create-owner-function.js +56 -0
- package/lib/funcs/{aurora-database-create-owner.lambda.d.ts → create-owner.lambda.d.ts} +1 -1
- package/lib/funcs/create-owner.lambda.js +107 -0
- package/lib/funcs/create-schema.lambda.d.ts +5 -3
- package/lib/funcs/create-schema.lambda.js +21 -14
- package/lib/funcs/create-user.lambda.d.ts +1 -1
- package/lib/funcs/create-user.lambda.js +19 -45
- package/lib/index.d.ts +4 -4
- package/lib/index.js +5 -5
- package/lib/settings/consts.d.ts +36 -0
- package/lib/settings/consts.js +40 -0
- package/package.json +5 -4
- package/assets/funcs/aurora-database-create-owner.lambda/index.js.map +0 -7
- package/lib/constructs/aurora-database-create-migrator.js +0 -86
- package/lib/constructs/aurora-database-create-owner.js +0 -72
- package/lib/constructs/aurora-database-create-schema.js +0 -76
- package/lib/constructs/aurora-database-create-user.js +0 -86
- package/lib/constructs/libs/postgresql/assert-identifier.js +0 -20
- package/lib/constructs/libs/postgresql/identifier-pattern.d.ts +0 -7
- package/lib/constructs/libs/postgresql/identifier-pattern.js +0 -11
- package/lib/funcs/aurora-database-create-owner-function.d.ts +0 -13
- package/lib/funcs/aurora-database-create-owner-function.js +0 -56
- package/lib/funcs/aurora-database-create-owner.lambda.js +0 -105
- package/lib/funcs/libs/postgresql/quote-identifier.js +0 -18
- /package/lib/{constructs/aurora-database-create-migrator.d.ts → aurora-database-create-migrator.d.ts} +0 -0
- /package/lib/{constructs/aurora-database-create-user.d.ts → aurora-database-create-user.d.ts} +0 -0
package/.editorconfig
CHANGED
package/.jsii
CHANGED
|
@@ -8435,7 +8435,7 @@
|
|
|
8435
8435
|
}
|
|
8436
8436
|
}
|
|
8437
8437
|
},
|
|
8438
|
-
"description": "
|
|
8438
|
+
"description": "AWS CDK constructs for bootstrapping Aurora PostgreSQL databases via the RDS Data API.",
|
|
8439
8439
|
"docs": {
|
|
8440
8440
|
"stability": "stable"
|
|
8441
8441
|
},
|
|
@@ -8456,7 +8456,7 @@
|
|
|
8456
8456
|
},
|
|
8457
8457
|
"name": "rds-aurora-bootstrapper",
|
|
8458
8458
|
"readme": {
|
|
8459
|
-
"markdown": "# RDS Aurora Bootstrapper (
|
|
8459
|
+
"markdown": "# RDS Aurora Bootstrapper (CDK v2)\n\n[](https://www.npmjs.com/package/rds-aurora-bootstrapper)\n[](https://www.npmjs.com/package/rds-aurora-bootstrapper)\n[](https://www.npmjs.com/package/rds-aurora-bootstrapper)\n[](https://github.com/gammarers-aws-cdk-constructs/rds-aurora-bootstrapper/actions/workflows/build.yml)\n\n[](https://constructs.dev/packages/rds-aurora-bootstrapper)\n\nAWS CDK constructs for bootstrapping Aurora PostgreSQL databases via the RDS Data API.\n\n## Features\n\n- **`AuroraDatabaseCreateOwner`** — creates a `NOLOGIN NOINHERIT` owner role and grants it to the master user\n- **`AuroraDatabaseCreateSchema`** — creates a schema, assigns ownership to an existing owner role, and drops the `public` schema with `CASCADE` when `PublicSchema.DROP` is set\n- **`AuroraDatabaseCreateUser`** — creates a `LOGIN` application user from a Secrets Manager credential secret, grants `CONNECT` / schema `USAGE` / table DML, and sets default privileges for the owner role\n- **`AuroraDatabaseCreateMigrator`** — creates a `LOGIN` migrator user from a Secrets Manager credential secret, grants `CONNECT`, grants membership in the owner role, and sets `search_path` to the target schema\n- Idempotent owner, user, and migrator role creation — skips creation when the role already exists\n- Validates PostgreSQL identifiers at synthesis time (`ownerUsername`, `schemaName`)\n- Resolves the master username from the credentials secret through a CloudFormation dynamic reference\n\n## How it works\n\nAdd the constructs to a stack in order: owner role, schema, migrator user, then application user. On deploy, each construct calls the Aurora RDS Data API with the master credentials.\n\nThe owner construct creates a `NOLOGIN NOINHERIT` role and grants it to the master user. The schema construct creates the schema, assigns that owner, and either leaves or drops the `public` schema. The migrator construct creates a `LOGIN` role that belongs to the owner and uses the schema as `search_path`. The application user construct creates a `LOGIN` role with connect, schema usage, and table DML privileges. When a role already exists, creation is skipped.\n\n## Installation\n\n### npm\n\n```bash\nnpm install rds-aurora-bootstrapper\n```\n\n### yarn\n\n```bash\nyarn add rds-aurora-bootstrapper\n```\n\n### pnpm\n\n```bash\npnpm add rds-aurora-bootstrapper\n```\n\n## Usage\n\nProvision resources in order: owner role → schema → migrator user → application user.\n\n```typescript\nimport { Stack } from 'aws-cdk-lib';\nimport { Vpc } from 'aws-cdk-lib/aws-ec2';\nimport {\n AuroraPostgresEngineVersion,\n ClusterInstance,\n DatabaseCluster,\n DatabaseClusterEngine,\n} from 'aws-cdk-lib/aws-rds';\nimport { Secret } from 'aws-cdk-lib/aws-secretsmanager';\nimport { Construct } from 'constructs';\nimport {\n AuroraDatabaseCreateOwner,\n AuroraDatabaseCreateSchema,\n AuroraDatabaseCreateMigrator,\n AuroraDatabaseCreateUser,\n PublicSchema,\n} from 'rds-aurora-bootstrapper';\n\nexport class MyStack extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n const vpc = new Vpc(this, 'Vpc', { maxAzs: 2 });\n const cluster = new DatabaseCluster(this, 'Cluster', {\n engine: DatabaseClusterEngine.auroraPostgres({\n version: AuroraPostgresEngineVersion.VER_17_6,\n }),\n vpc,\n writer: ClusterInstance.provisioned('writer'),\n });\n const masterUserSecret = new Secret(this, 'MasterUserSecret');\n const migratorUserSecret = new Secret(this, 'MigratorUserSecret', {\n generateSecretString: {\n secretStringTemplate: JSON.stringify({ username: 'app_migrator' }),\n generateStringKey: 'password',\n excludePunctuation: true,\n },\n });\n const appUserSecret = new Secret(this, 'AppUserSecret', {\n generateSecretString: {\n secretStringTemplate: JSON.stringify({ username: 'app_user' }),\n generateStringKey: 'password',\n excludePunctuation: true,\n },\n });\n\n const createOwner = new AuroraDatabaseCreateOwner(this, 'CreateOwner', {\n dbMasterUserCredentials: masterUserSecret,\n dbCluster: cluster,\n dbName: 'appdb',\n ownerUsername: 'app_owner',\n });\n\n const createSchema = new AuroraDatabaseCreateSchema(this, 'CreateSchema', {\n dbMasterUserCredentials: masterUserSecret,\n dbCluster: cluster,\n dbName: 'appdb',\n ownerUsername: 'app_owner',\n schemaName: 'app_schema',\n publicSchema: PublicSchema.DROP,\n });\n createSchema.node.addDependency(createOwner);\n\n const createMigrator = new AuroraDatabaseCreateMigrator(this, 'CreateMigrator', {\n dbMasterUserCredentials: masterUserSecret,\n migratorUserCredentials: migratorUserSecret,\n dbCluster: cluster,\n dbName: 'appdb',\n ownerUsername: 'app_owner',\n schemaName: 'app_schema',\n });\n createMigrator.node.addDependency(createSchema);\n\n const createUser = new AuroraDatabaseCreateUser(this, 'CreateUser', {\n dbMasterUserCredentials: masterUserSecret,\n targetUserCredentials: appUserSecret,\n dbCluster: cluster,\n dbName: 'appdb',\n ownerUsername: 'app_owner',\n schemaName: 'app_schema',\n });\n createUser.node.addDependency(createSchema);\n }\n}\n```\n\nSet `publicSchema` to `PublicSchema.KEEP` to leave the `public` schema in place.\n\n## Options\n\n### `AuroraDatabaseCreateOwnerProps`\n\n| Property | Type | Description |\n| --- | --- | --- |\n| `dbMasterUserCredentials` | `Secret` | Secrets Manager secret with Aurora master credentials. The `username` field is passed to the custom resource via a dynamic reference. |\n| `dbCluster` | `DatabaseCluster` | Aurora database cluster where the owner role is created. |\n| `dbName` | `string` | PostgreSQL database name targeted by the custom resource. |\n| `ownerUsername` | `string` | Username of the owner role to create (`NOLOGIN`, `NOINHERIT`). Must match `^[a-zA-Z_][a-zA-Z0-9_-]*$`. |\n\n### `AuroraDatabaseCreateSchemaProps`\n\n| Property | Type | Description |\n| --- | --- | --- |\n| `dbMasterUserCredentials` | `Secret` | Secrets Manager secret with Aurora master credentials. The `username` field is passed to the custom resource via a dynamic reference. |\n| `dbCluster` | `DatabaseCluster` | Aurora database cluster where the schema is created. |\n| `dbName` | `string` | PostgreSQL database name targeted by the custom resource. |\n| `ownerUsername` | `string` | Username of the existing owner role that will own the new schema. Must match `^[a-zA-Z_][a-zA-Z0-9_-]*$`. |\n| `schemaName` | `string` | Name of the PostgreSQL schema to create. Must match `^[a-zA-Z_][a-zA-Z0-9_-]*$`. |\n| `publicSchema` | `PublicSchema` | `KEEP` leaves the `public` schema in place. `DROP` drops it with `CASCADE` after creating the target schema. |\n\n### `AuroraDatabaseCreateMigratorProps`\n\n| Property | Type | Description |\n| --- | --- | --- |\n| `dbMasterUserCredentials` | `Secret` | Secrets Manager secret with Aurora master credentials. The `username` field is passed to the custom resource via a dynamic reference. |\n| `migratorUserCredentials` | `Secret` | Secrets Manager secret with the migrator user credentials (`username` and `password`). Used at runtime to create the `LOGIN` role. |\n| `dbCluster` | `DatabaseCluster` | Aurora database cluster where the migrator role is created. |\n| `dbName` | `string` | PostgreSQL database name targeted by the custom resource. |\n| `ownerUsername` | `string` | Username of the existing owner role granted to the migrator. Must match `^[a-zA-Z_][a-zA-Z0-9_-]*$`. |\n| `schemaName` | `string` | Name of the PostgreSQL schema used as the migrator's `search_path`. Must match `^[a-zA-Z_][a-zA-Z0-9_-]*$`. |\n\n### `AuroraDatabaseCreateUserProps`\n\n| Property | Type | Description |\n| --- | --- | --- |\n| `dbMasterUserCredentials` | `Secret` | Secrets Manager secret with Aurora master credentials. The `username` field is passed to the custom resource via a dynamic reference. |\n| `targetUserCredentials` | `Secret` | Secrets Manager secret with the application user credentials (`username` and `password`). Used at runtime to create the `LOGIN` role. |\n| `dbCluster` | `DatabaseCluster` | Aurora database cluster where the user role is created. |\n| `dbName` | `string` | PostgreSQL database name targeted by the custom resource. |\n| `ownerUsername` | `string` | Username of the existing owner role used for default privileges. Must match `^[a-zA-Z_][a-zA-Z0-9_-]*$`. |\n| `schemaName` | `string` | Name of the PostgreSQL schema the new user is granted access to. Must match `^[a-zA-Z_][a-zA-Z0-9_-]*$`. |\n\n## API\n\nSee [API.md](API.md).\n\n## Requirements\n\n- Node.js `>= 20.0.0`\n- `aws-cdk-lib` `^2.232.0`\n- `constructs` `^10.5.1`\n- Aurora PostgreSQL cluster with the [RDS Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) enabled\n- Secrets Manager secrets containing `username` and `password` fields (master credentials, and application / migrator user credentials for `AuroraDatabaseCreateUser` / `AuroraDatabaseCreateMigrator`)\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n"
|
|
8460
8460
|
},
|
|
8461
8461
|
"repository": {
|
|
8462
8462
|
"type": "git",
|
|
@@ -8487,8 +8487,8 @@
|
|
|
8487
8487
|
"summary": "Creates the custom resource that provisions the migrator database user."
|
|
8488
8488
|
},
|
|
8489
8489
|
"locationInModule": {
|
|
8490
|
-
"filename": "src/
|
|
8491
|
-
"line":
|
|
8490
|
+
"filename": "src/aurora-database-create-migrator.ts",
|
|
8491
|
+
"line": 96
|
|
8492
8492
|
},
|
|
8493
8493
|
"parameters": [
|
|
8494
8494
|
{
|
|
@@ -8522,11 +8522,11 @@
|
|
|
8522
8522
|
},
|
|
8523
8523
|
"kind": "class",
|
|
8524
8524
|
"locationInModule": {
|
|
8525
|
-
"filename": "src/
|
|
8526
|
-
"line":
|
|
8525
|
+
"filename": "src/aurora-database-create-migrator.ts",
|
|
8526
|
+
"line": 87
|
|
8527
8527
|
},
|
|
8528
8528
|
"name": "AuroraDatabaseCreateMigrator",
|
|
8529
|
-
"symbolId": "src/
|
|
8529
|
+
"symbolId": "src/aurora-database-create-migrator:AuroraDatabaseCreateMigrator"
|
|
8530
8530
|
},
|
|
8531
8531
|
"rds-aurora-bootstrapper.AuroraDatabaseCreateMigratorProps": {
|
|
8532
8532
|
"assembly": "rds-aurora-bootstrapper",
|
|
@@ -8538,8 +8538,8 @@
|
|
|
8538
8538
|
"fqn": "rds-aurora-bootstrapper.AuroraDatabaseCreateMigratorProps",
|
|
8539
8539
|
"kind": "interface",
|
|
8540
8540
|
"locationInModule": {
|
|
8541
|
-
"filename": "src/
|
|
8542
|
-
"line":
|
|
8541
|
+
"filename": "src/aurora-database-create-migrator.ts",
|
|
8542
|
+
"line": 40
|
|
8543
8543
|
},
|
|
8544
8544
|
"name": "AuroraDatabaseCreateMigratorProps",
|
|
8545
8545
|
"properties": [
|
|
@@ -8551,8 +8551,8 @@
|
|
|
8551
8551
|
},
|
|
8552
8552
|
"immutable": true,
|
|
8553
8553
|
"locationInModule": {
|
|
8554
|
-
"filename": "src/
|
|
8555
|
-
"line":
|
|
8554
|
+
"filename": "src/aurora-database-create-migrator.ts",
|
|
8555
|
+
"line": 52
|
|
8556
8556
|
},
|
|
8557
8557
|
"name": "dbCluster",
|
|
8558
8558
|
"type": {
|
|
@@ -8568,8 +8568,8 @@
|
|
|
8568
8568
|
},
|
|
8569
8569
|
"immutable": true,
|
|
8570
8570
|
"locationInModule": {
|
|
8571
|
-
"filename": "src/
|
|
8572
|
-
"line":
|
|
8571
|
+
"filename": "src/aurora-database-create-migrator.ts",
|
|
8572
|
+
"line": 45
|
|
8573
8573
|
},
|
|
8574
8574
|
"name": "dbMasterUserCredentials",
|
|
8575
8575
|
"type": {
|
|
@@ -8584,8 +8584,8 @@
|
|
|
8584
8584
|
},
|
|
8585
8585
|
"immutable": true,
|
|
8586
8586
|
"locationInModule": {
|
|
8587
|
-
"filename": "src/
|
|
8588
|
-
"line":
|
|
8587
|
+
"filename": "src/aurora-database-create-migrator.ts",
|
|
8588
|
+
"line": 54
|
|
8589
8589
|
},
|
|
8590
8590
|
"name": "dbName",
|
|
8591
8591
|
"type": {
|
|
@@ -8601,8 +8601,8 @@
|
|
|
8601
8601
|
},
|
|
8602
8602
|
"immutable": true,
|
|
8603
8603
|
"locationInModule": {
|
|
8604
|
-
"filename": "src/
|
|
8605
|
-
"line":
|
|
8604
|
+
"filename": "src/aurora-database-create-migrator.ts",
|
|
8605
|
+
"line": 50
|
|
8606
8606
|
},
|
|
8607
8607
|
"name": "migratorUserCredentials",
|
|
8608
8608
|
"type": {
|
|
@@ -8612,14 +8612,14 @@
|
|
|
8612
8612
|
{
|
|
8613
8613
|
"abstract": true,
|
|
8614
8614
|
"docs": {
|
|
8615
|
-
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN
|
|
8615
|
+
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN}.",
|
|
8616
8616
|
"stability": "stable",
|
|
8617
8617
|
"summary": "Username of the existing owner role granted to the migrator."
|
|
8618
8618
|
},
|
|
8619
8619
|
"immutable": true,
|
|
8620
8620
|
"locationInModule": {
|
|
8621
|
-
"filename": "src/
|
|
8622
|
-
"line":
|
|
8621
|
+
"filename": "src/aurora-database-create-migrator.ts",
|
|
8622
|
+
"line": 59
|
|
8623
8623
|
},
|
|
8624
8624
|
"name": "ownerUsername",
|
|
8625
8625
|
"type": {
|
|
@@ -8629,14 +8629,14 @@
|
|
|
8629
8629
|
{
|
|
8630
8630
|
"abstract": true,
|
|
8631
8631
|
"docs": {
|
|
8632
|
-
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN
|
|
8632
|
+
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN}.",
|
|
8633
8633
|
"stability": "stable",
|
|
8634
8634
|
"summary": "Name of the PostgreSQL schema used as the migrator's `search_path`."
|
|
8635
8635
|
},
|
|
8636
8636
|
"immutable": true,
|
|
8637
8637
|
"locationInModule": {
|
|
8638
|
-
"filename": "src/
|
|
8639
|
-
"line":
|
|
8638
|
+
"filename": "src/aurora-database-create-migrator.ts",
|
|
8639
|
+
"line": 64
|
|
8640
8640
|
},
|
|
8641
8641
|
"name": "schemaName",
|
|
8642
8642
|
"type": {
|
|
@@ -8644,7 +8644,7 @@
|
|
|
8644
8644
|
}
|
|
8645
8645
|
}
|
|
8646
8646
|
],
|
|
8647
|
-
"symbolId": "src/
|
|
8647
|
+
"symbolId": "src/aurora-database-create-migrator:AuroraDatabaseCreateMigratorProps"
|
|
8648
8648
|
},
|
|
8649
8649
|
"rds-aurora-bootstrapper.AuroraDatabaseCreateOwner": {
|
|
8650
8650
|
"assembly": "rds-aurora-bootstrapper",
|
|
@@ -8660,11 +8660,12 @@
|
|
|
8660
8660
|
"custom": {
|
|
8661
8661
|
"throws": "Error when `ownerUsername` fails identifier validation."
|
|
8662
8662
|
},
|
|
8663
|
-
"stability": "stable"
|
|
8663
|
+
"stability": "stable",
|
|
8664
|
+
"summary": "Creates the custom resource that provisions the database owner role."
|
|
8664
8665
|
},
|
|
8665
8666
|
"locationInModule": {
|
|
8666
|
-
"filename": "src/
|
|
8667
|
-
"line":
|
|
8667
|
+
"filename": "src/aurora-database-create-owner.ts",
|
|
8668
|
+
"line": 72
|
|
8668
8669
|
},
|
|
8669
8670
|
"parameters": [
|
|
8670
8671
|
{
|
|
@@ -8698,11 +8699,11 @@
|
|
|
8698
8699
|
},
|
|
8699
8700
|
"kind": "class",
|
|
8700
8701
|
"locationInModule": {
|
|
8701
|
-
"filename": "src/
|
|
8702
|
-
"line":
|
|
8702
|
+
"filename": "src/aurora-database-create-owner.ts",
|
|
8703
|
+
"line": 63
|
|
8703
8704
|
},
|
|
8704
8705
|
"name": "AuroraDatabaseCreateOwner",
|
|
8705
|
-
"symbolId": "src/
|
|
8706
|
+
"symbolId": "src/aurora-database-create-owner:AuroraDatabaseCreateOwner"
|
|
8706
8707
|
},
|
|
8707
8708
|
"rds-aurora-bootstrapper.AuroraDatabaseCreateOwnerProps": {
|
|
8708
8709
|
"assembly": "rds-aurora-bootstrapper",
|
|
@@ -8714,8 +8715,8 @@
|
|
|
8714
8715
|
"fqn": "rds-aurora-bootstrapper.AuroraDatabaseCreateOwnerProps",
|
|
8715
8716
|
"kind": "interface",
|
|
8716
8717
|
"locationInModule": {
|
|
8717
|
-
"filename": "src/
|
|
8718
|
-
"line":
|
|
8718
|
+
"filename": "src/aurora-database-create-owner.ts",
|
|
8719
|
+
"line": 38
|
|
8719
8720
|
},
|
|
8720
8721
|
"name": "AuroraDatabaseCreateOwnerProps",
|
|
8721
8722
|
"properties": [
|
|
@@ -8727,8 +8728,8 @@
|
|
|
8727
8728
|
},
|
|
8728
8729
|
"immutable": true,
|
|
8729
8730
|
"locationInModule": {
|
|
8730
|
-
"filename": "src/
|
|
8731
|
-
"line":
|
|
8731
|
+
"filename": "src/aurora-database-create-owner.ts",
|
|
8732
|
+
"line": 45
|
|
8732
8733
|
},
|
|
8733
8734
|
"name": "dbCluster",
|
|
8734
8735
|
"type": {
|
|
@@ -8744,8 +8745,8 @@
|
|
|
8744
8745
|
},
|
|
8745
8746
|
"immutable": true,
|
|
8746
8747
|
"locationInModule": {
|
|
8747
|
-
"filename": "src/
|
|
8748
|
-
"line":
|
|
8748
|
+
"filename": "src/aurora-database-create-owner.ts",
|
|
8749
|
+
"line": 43
|
|
8749
8750
|
},
|
|
8750
8751
|
"name": "dbMasterUserCredentials",
|
|
8751
8752
|
"type": {
|
|
@@ -8760,8 +8761,8 @@
|
|
|
8760
8761
|
},
|
|
8761
8762
|
"immutable": true,
|
|
8762
8763
|
"locationInModule": {
|
|
8763
|
-
"filename": "src/
|
|
8764
|
-
"line":
|
|
8764
|
+
"filename": "src/aurora-database-create-owner.ts",
|
|
8765
|
+
"line": 47
|
|
8765
8766
|
},
|
|
8766
8767
|
"name": "dbName",
|
|
8767
8768
|
"type": {
|
|
@@ -8771,14 +8772,14 @@
|
|
|
8771
8772
|
{
|
|
8772
8773
|
"abstract": true,
|
|
8773
8774
|
"docs": {
|
|
8774
|
-
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN
|
|
8775
|
+
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN}.",
|
|
8775
8776
|
"stability": "stable",
|
|
8776
8777
|
"summary": "Username of the owner role to create (`NOLOGIN`, `NOINHERIT`)."
|
|
8777
8778
|
},
|
|
8778
8779
|
"immutable": true,
|
|
8779
8780
|
"locationInModule": {
|
|
8780
|
-
"filename": "src/
|
|
8781
|
-
"line":
|
|
8781
|
+
"filename": "src/aurora-database-create-owner.ts",
|
|
8782
|
+
"line": 52
|
|
8782
8783
|
},
|
|
8783
8784
|
"name": "ownerUsername",
|
|
8784
8785
|
"type": {
|
|
@@ -8786,7 +8787,7 @@
|
|
|
8786
8787
|
}
|
|
8787
8788
|
}
|
|
8788
8789
|
],
|
|
8789
|
-
"symbolId": "src/
|
|
8790
|
+
"symbolId": "src/aurora-database-create-owner:AuroraDatabaseCreateOwnerProps"
|
|
8790
8791
|
},
|
|
8791
8792
|
"rds-aurora-bootstrapper.AuroraDatabaseCreateSchema": {
|
|
8792
8793
|
"assembly": "rds-aurora-bootstrapper",
|
|
@@ -8802,11 +8803,12 @@
|
|
|
8802
8803
|
"custom": {
|
|
8803
8804
|
"throws": "Error when `ownerUsername` or `schemaName` fails identifier validation."
|
|
8804
8805
|
},
|
|
8805
|
-
"stability": "stable"
|
|
8806
|
+
"stability": "stable",
|
|
8807
|
+
"summary": "Creates the custom resource that provisions the database schema."
|
|
8806
8808
|
},
|
|
8807
8809
|
"locationInModule": {
|
|
8808
|
-
"filename": "src/
|
|
8809
|
-
"line":
|
|
8810
|
+
"filename": "src/aurora-database-create-schema.ts",
|
|
8811
|
+
"line": 99
|
|
8810
8812
|
},
|
|
8811
8813
|
"parameters": [
|
|
8812
8814
|
{
|
|
@@ -8840,11 +8842,11 @@
|
|
|
8840
8842
|
},
|
|
8841
8843
|
"kind": "class",
|
|
8842
8844
|
"locationInModule": {
|
|
8843
|
-
"filename": "src/
|
|
8844
|
-
"line":
|
|
8845
|
+
"filename": "src/aurora-database-create-schema.ts",
|
|
8846
|
+
"line": 90
|
|
8845
8847
|
},
|
|
8846
8848
|
"name": "AuroraDatabaseCreateSchema",
|
|
8847
|
-
"symbolId": "src/
|
|
8849
|
+
"symbolId": "src/aurora-database-create-schema:AuroraDatabaseCreateSchema"
|
|
8848
8850
|
},
|
|
8849
8851
|
"rds-aurora-bootstrapper.AuroraDatabaseCreateSchemaProps": {
|
|
8850
8852
|
"assembly": "rds-aurora-bootstrapper",
|
|
@@ -8856,8 +8858,8 @@
|
|
|
8856
8858
|
"fqn": "rds-aurora-bootstrapper.AuroraDatabaseCreateSchemaProps",
|
|
8857
8859
|
"kind": "interface",
|
|
8858
8860
|
"locationInModule": {
|
|
8859
|
-
"filename": "src/
|
|
8860
|
-
"line":
|
|
8861
|
+
"filename": "src/aurora-database-create-schema.ts",
|
|
8862
|
+
"line": 50
|
|
8861
8863
|
},
|
|
8862
8864
|
"name": "AuroraDatabaseCreateSchemaProps",
|
|
8863
8865
|
"properties": [
|
|
@@ -8869,8 +8871,8 @@
|
|
|
8869
8871
|
},
|
|
8870
8872
|
"immutable": true,
|
|
8871
8873
|
"locationInModule": {
|
|
8872
|
-
"filename": "src/
|
|
8873
|
-
"line":
|
|
8874
|
+
"filename": "src/aurora-database-create-schema.ts",
|
|
8875
|
+
"line": 57
|
|
8874
8876
|
},
|
|
8875
8877
|
"name": "dbCluster",
|
|
8876
8878
|
"type": {
|
|
@@ -8886,8 +8888,8 @@
|
|
|
8886
8888
|
},
|
|
8887
8889
|
"immutable": true,
|
|
8888
8890
|
"locationInModule": {
|
|
8889
|
-
"filename": "src/
|
|
8890
|
-
"line":
|
|
8891
|
+
"filename": "src/aurora-database-create-schema.ts",
|
|
8892
|
+
"line": 55
|
|
8891
8893
|
},
|
|
8892
8894
|
"name": "dbMasterUserCredentials",
|
|
8893
8895
|
"type": {
|
|
@@ -8902,8 +8904,8 @@
|
|
|
8902
8904
|
},
|
|
8903
8905
|
"immutable": true,
|
|
8904
8906
|
"locationInModule": {
|
|
8905
|
-
"filename": "src/
|
|
8906
|
-
"line":
|
|
8907
|
+
"filename": "src/aurora-database-create-schema.ts",
|
|
8908
|
+
"line": 59
|
|
8907
8909
|
},
|
|
8908
8910
|
"name": "dbName",
|
|
8909
8911
|
"type": {
|
|
@@ -8913,47 +8915,48 @@
|
|
|
8913
8915
|
{
|
|
8914
8916
|
"abstract": true,
|
|
8915
8917
|
"docs": {
|
|
8918
|
+
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN}.",
|
|
8916
8919
|
"stability": "stable",
|
|
8917
|
-
"summary": "
|
|
8920
|
+
"summary": "Username of the existing owner role that will own the new schema."
|
|
8918
8921
|
},
|
|
8919
8922
|
"immutable": true,
|
|
8920
8923
|
"locationInModule": {
|
|
8921
|
-
"filename": "src/
|
|
8922
|
-
"line":
|
|
8924
|
+
"filename": "src/aurora-database-create-schema.ts",
|
|
8925
|
+
"line": 64
|
|
8923
8926
|
},
|
|
8924
|
-
"name": "
|
|
8927
|
+
"name": "ownerUsername",
|
|
8925
8928
|
"type": {
|
|
8926
|
-
"primitive": "
|
|
8929
|
+
"primitive": "string"
|
|
8927
8930
|
}
|
|
8928
8931
|
},
|
|
8929
8932
|
{
|
|
8930
8933
|
"abstract": true,
|
|
8931
8934
|
"docs": {
|
|
8932
|
-
"remarks": "
|
|
8935
|
+
"remarks": "{@link PublicSchema.DROP} runs `DROP SCHEMA IF EXISTS public CASCADE`.",
|
|
8933
8936
|
"stability": "stable",
|
|
8934
|
-
"summary": "
|
|
8937
|
+
"summary": "Whether to leave or drop the PostgreSQL `public` schema after the target schema is created."
|
|
8935
8938
|
},
|
|
8936
8939
|
"immutable": true,
|
|
8937
8940
|
"locationInModule": {
|
|
8938
|
-
"filename": "src/
|
|
8939
|
-
"line":
|
|
8941
|
+
"filename": "src/aurora-database-create-schema.ts",
|
|
8942
|
+
"line": 74
|
|
8940
8943
|
},
|
|
8941
|
-
"name": "
|
|
8944
|
+
"name": "publicSchema",
|
|
8942
8945
|
"type": {
|
|
8943
|
-
"
|
|
8946
|
+
"fqn": "rds-aurora-bootstrapper.PublicSchema"
|
|
8944
8947
|
}
|
|
8945
8948
|
},
|
|
8946
8949
|
{
|
|
8947
8950
|
"abstract": true,
|
|
8948
8951
|
"docs": {
|
|
8949
|
-
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN
|
|
8952
|
+
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN}.",
|
|
8950
8953
|
"stability": "stable",
|
|
8951
8954
|
"summary": "Name of the PostgreSQL schema to create."
|
|
8952
8955
|
},
|
|
8953
8956
|
"immutable": true,
|
|
8954
8957
|
"locationInModule": {
|
|
8955
|
-
"filename": "src/
|
|
8956
|
-
"line":
|
|
8958
|
+
"filename": "src/aurora-database-create-schema.ts",
|
|
8959
|
+
"line": 69
|
|
8957
8960
|
},
|
|
8958
8961
|
"name": "schemaName",
|
|
8959
8962
|
"type": {
|
|
@@ -8961,7 +8964,7 @@
|
|
|
8961
8964
|
}
|
|
8962
8965
|
}
|
|
8963
8966
|
],
|
|
8964
|
-
"symbolId": "src/
|
|
8967
|
+
"symbolId": "src/aurora-database-create-schema:AuroraDatabaseCreateSchemaProps"
|
|
8965
8968
|
},
|
|
8966
8969
|
"rds-aurora-bootstrapper.AuroraDatabaseCreateUser": {
|
|
8967
8970
|
"assembly": "rds-aurora-bootstrapper",
|
|
@@ -8981,8 +8984,8 @@
|
|
|
8981
8984
|
"summary": "Creates the custom resource that provisions the application database user."
|
|
8982
8985
|
},
|
|
8983
8986
|
"locationInModule": {
|
|
8984
|
-
"filename": "src/
|
|
8985
|
-
"line":
|
|
8987
|
+
"filename": "src/aurora-database-create-user.ts",
|
|
8988
|
+
"line": 96
|
|
8986
8989
|
},
|
|
8987
8990
|
"parameters": [
|
|
8988
8991
|
{
|
|
@@ -9016,11 +9019,11 @@
|
|
|
9016
9019
|
},
|
|
9017
9020
|
"kind": "class",
|
|
9018
9021
|
"locationInModule": {
|
|
9019
|
-
"filename": "src/
|
|
9020
|
-
"line":
|
|
9022
|
+
"filename": "src/aurora-database-create-user.ts",
|
|
9023
|
+
"line": 87
|
|
9021
9024
|
},
|
|
9022
9025
|
"name": "AuroraDatabaseCreateUser",
|
|
9023
|
-
"symbolId": "src/
|
|
9026
|
+
"symbolId": "src/aurora-database-create-user:AuroraDatabaseCreateUser"
|
|
9024
9027
|
},
|
|
9025
9028
|
"rds-aurora-bootstrapper.AuroraDatabaseCreateUserProps": {
|
|
9026
9029
|
"assembly": "rds-aurora-bootstrapper",
|
|
@@ -9032,8 +9035,8 @@
|
|
|
9032
9035
|
"fqn": "rds-aurora-bootstrapper.AuroraDatabaseCreateUserProps",
|
|
9033
9036
|
"kind": "interface",
|
|
9034
9037
|
"locationInModule": {
|
|
9035
|
-
"filename": "src/
|
|
9036
|
-
"line":
|
|
9038
|
+
"filename": "src/aurora-database-create-user.ts",
|
|
9039
|
+
"line": 40
|
|
9037
9040
|
},
|
|
9038
9041
|
"name": "AuroraDatabaseCreateUserProps",
|
|
9039
9042
|
"properties": [
|
|
@@ -9045,8 +9048,8 @@
|
|
|
9045
9048
|
},
|
|
9046
9049
|
"immutable": true,
|
|
9047
9050
|
"locationInModule": {
|
|
9048
|
-
"filename": "src/
|
|
9049
|
-
"line":
|
|
9051
|
+
"filename": "src/aurora-database-create-user.ts",
|
|
9052
|
+
"line": 52
|
|
9050
9053
|
},
|
|
9051
9054
|
"name": "dbCluster",
|
|
9052
9055
|
"type": {
|
|
@@ -9062,8 +9065,8 @@
|
|
|
9062
9065
|
},
|
|
9063
9066
|
"immutable": true,
|
|
9064
9067
|
"locationInModule": {
|
|
9065
|
-
"filename": "src/
|
|
9066
|
-
"line":
|
|
9068
|
+
"filename": "src/aurora-database-create-user.ts",
|
|
9069
|
+
"line": 45
|
|
9067
9070
|
},
|
|
9068
9071
|
"name": "dbMasterUserCredentials",
|
|
9069
9072
|
"type": {
|
|
@@ -9078,8 +9081,8 @@
|
|
|
9078
9081
|
},
|
|
9079
9082
|
"immutable": true,
|
|
9080
9083
|
"locationInModule": {
|
|
9081
|
-
"filename": "src/
|
|
9082
|
-
"line":
|
|
9084
|
+
"filename": "src/aurora-database-create-user.ts",
|
|
9085
|
+
"line": 54
|
|
9083
9086
|
},
|
|
9084
9087
|
"name": "dbName",
|
|
9085
9088
|
"type": {
|
|
@@ -9089,14 +9092,14 @@
|
|
|
9089
9092
|
{
|
|
9090
9093
|
"abstract": true,
|
|
9091
9094
|
"docs": {
|
|
9092
|
-
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN
|
|
9095
|
+
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN}.",
|
|
9093
9096
|
"stability": "stable",
|
|
9094
9097
|
"summary": "Username of the existing owner role used for default privileges."
|
|
9095
9098
|
},
|
|
9096
9099
|
"immutable": true,
|
|
9097
9100
|
"locationInModule": {
|
|
9098
|
-
"filename": "src/
|
|
9099
|
-
"line":
|
|
9101
|
+
"filename": "src/aurora-database-create-user.ts",
|
|
9102
|
+
"line": 59
|
|
9100
9103
|
},
|
|
9101
9104
|
"name": "ownerUsername",
|
|
9102
9105
|
"type": {
|
|
@@ -9106,14 +9109,14 @@
|
|
|
9106
9109
|
{
|
|
9107
9110
|
"abstract": true,
|
|
9108
9111
|
"docs": {
|
|
9109
|
-
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN
|
|
9112
|
+
"remarks": "Must match {@link SAFE_POSTGRESQL_IDENTIFIER_PATTERN}.",
|
|
9110
9113
|
"stability": "stable",
|
|
9111
9114
|
"summary": "Name of the PostgreSQL schema that the new user is granted access to."
|
|
9112
9115
|
},
|
|
9113
9116
|
"immutable": true,
|
|
9114
9117
|
"locationInModule": {
|
|
9115
|
-
"filename": "src/
|
|
9116
|
-
"line":
|
|
9118
|
+
"filename": "src/aurora-database-create-user.ts",
|
|
9119
|
+
"line": 64
|
|
9117
9120
|
},
|
|
9118
9121
|
"name": "schemaName",
|
|
9119
9122
|
"type": {
|
|
@@ -9129,8 +9132,8 @@
|
|
|
9129
9132
|
},
|
|
9130
9133
|
"immutable": true,
|
|
9131
9134
|
"locationInModule": {
|
|
9132
|
-
"filename": "src/
|
|
9133
|
-
"line":
|
|
9135
|
+
"filename": "src/aurora-database-create-user.ts",
|
|
9136
|
+
"line": 50
|
|
9134
9137
|
},
|
|
9135
9138
|
"name": "targetUserCredentials",
|
|
9136
9139
|
"type": {
|
|
@@ -9138,9 +9141,40 @@
|
|
|
9138
9141
|
}
|
|
9139
9142
|
}
|
|
9140
9143
|
],
|
|
9141
|
-
"symbolId": "src/
|
|
9144
|
+
"symbolId": "src/aurora-database-create-user:AuroraDatabaseCreateUserProps"
|
|
9145
|
+
},
|
|
9146
|
+
"rds-aurora-bootstrapper.PublicSchema": {
|
|
9147
|
+
"assembly": "rds-aurora-bootstrapper",
|
|
9148
|
+
"docs": {
|
|
9149
|
+
"stability": "stable",
|
|
9150
|
+
"summary": "What to do with the PostgreSQL `public` schema after the target schema is created."
|
|
9151
|
+
},
|
|
9152
|
+
"fqn": "rds-aurora-bootstrapper.PublicSchema",
|
|
9153
|
+
"kind": "enum",
|
|
9154
|
+
"locationInModule": {
|
|
9155
|
+
"filename": "src/aurora-database-create-schema.ts",
|
|
9156
|
+
"line": 40
|
|
9157
|
+
},
|
|
9158
|
+
"members": [
|
|
9159
|
+
{
|
|
9160
|
+
"docs": {
|
|
9161
|
+
"stability": "stable",
|
|
9162
|
+
"summary": "Leave the `public` schema in place."
|
|
9163
|
+
},
|
|
9164
|
+
"name": "KEEP"
|
|
9165
|
+
},
|
|
9166
|
+
{
|
|
9167
|
+
"docs": {
|
|
9168
|
+
"stability": "stable",
|
|
9169
|
+
"summary": "Drop the `public` schema with `CASCADE`."
|
|
9170
|
+
},
|
|
9171
|
+
"name": "DROP"
|
|
9172
|
+
}
|
|
9173
|
+
],
|
|
9174
|
+
"name": "PublicSchema",
|
|
9175
|
+
"symbolId": "src/aurora-database-create-schema:PublicSchema"
|
|
9142
9176
|
}
|
|
9143
9177
|
},
|
|
9144
|
-
"version": "0.
|
|
9145
|
-
"fingerprint": "
|
|
9178
|
+
"version": "0.5.0",
|
|
9179
|
+
"fingerprint": "dP3Yz0IwywcYJCUHBNVBvwxB6r79PKCs9O29Httr21o="
|
|
9146
9180
|
}
|