@studion/infra-code-blocks 0.0.10 → 0.0.11

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.
@@ -15,8 +15,8 @@ export type DatabaseArgs = {
15
15
  */
16
16
  vpc: awsx.ec2.Vpc;
17
17
  /**
18
- * Password for the master DB user. If not specified, it will be autogenerated
19
- * and stored as a secret in AWS Secret Manager.
18
+ * Password for the master DB user. If not specified, it will be autogenerated.
19
+ * The value will be stored as a secret in AWS Secret Manager.
20
20
  */
21
21
  password?: pulumi.Input<string>;
22
22
  /**
@@ -51,6 +51,6 @@ export declare class Database extends pulumi.ComponentResource {
51
51
  kms: aws.kms.Key;
52
52
  dbSubnetGroup: aws.rds.SubnetGroup;
53
53
  dbSecurityGroup: aws.ec2.SecurityGroup;
54
- passwordSecret?: aws.secretsmanager.Secret;
54
+ passwordSecret: aws.secretsmanager.Secret;
55
55
  constructor(name: string, args: DatabaseArgs, opts?: pulumi.ComponentResourceOptions);
56
56
  }
@@ -42,15 +42,13 @@ class Database extends pulumi.ComponentResource {
42
42
  aws.secretsmanager
43
43
  .getRandomPasswordOutput()
44
44
  .apply(res => res.randomPassword);
45
- if (!argsWithDefaults.password) {
46
- this.passwordSecret = new aws.secretsmanager.Secret(`${name}-password-secret`, {
47
- name: `${stack}/${project}/DatabasePassword`,
48
- }, { parent: this });
49
- const passwordSecretValue = new aws.secretsmanager.SecretVersion(`${name}-password-secret-value`, {
50
- secretId: this.passwordSecret.id,
51
- secretString: password,
52
- }, { parent: this, dependsOn: [this.passwordSecret] });
53
- }
45
+ this.passwordSecret = new aws.secretsmanager.Secret(`${name}-password-secret`, {
46
+ name: `${stack}/${project}/DatabasePassword`,
47
+ }, { parent: this });
48
+ const passwordSecretValue = new aws.secretsmanager.SecretVersion(`${name}-password-secret-value`, {
49
+ secretId: this.passwordSecret.id,
50
+ secretString: password,
51
+ }, { parent: this, dependsOn: [this.passwordSecret] });
54
52
  this.instance = new aws.rds.Instance(`${name}-rds`, {
55
53
  identifier: name,
56
54
  engine: 'postgres',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studion/infra-code-blocks",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Studion common infra components",
5
5
  "keywords": [
6
6
  "infrastructure",