@crossdelta/infrastructure 0.2.14 → 0.2.15

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/dist/index.cjs CHANGED
@@ -311745,12 +311745,15 @@ function buildDropletServices(options) {
311745
311745
  const volumeConfig = volumes[0];
311746
311746
  if (volumeConfig) {
311747
311747
  volumeMountPath = volumeConfig.mountPath;
311748
- volume = new digitalocean.Volume(`${config.name}-volume`, {
311748
+ volume = new digitalocean.Volume(volumeConfig.name, {
311749
311749
  region,
311750
311750
  name: volumeConfig.name,
311751
311751
  size: volumeConfig.sizeGb,
311752
311752
  filesystemType: "ext4",
311753
- description: `Persistent storage for ${config.name}`
311753
+ description: volumeConfig.description || `Persistent storage for ${volumeConfig.name}`
311754
+ }, {
311755
+ ignoreChanges: ["description"],
311756
+ retainOnDelete: true
311754
311757
  });
311755
311758
  }
311756
311759
  }
@@ -311765,7 +311768,8 @@ function buildDropletServices(options) {
311765
311768
  tags: [`service:${config.name}`, "managed-by:pulumi"]
311766
311769
  });
311767
311770
  if (volume) {
311768
- volumeAttachment = new digitalocean.VolumeAttachment(`${config.name}-volume-attach`, {
311771
+ const volumeName = volumes[0]?.name || config.name;
311772
+ volumeAttachment = new digitalocean.VolumeAttachment(`${volumeName}-attach`, {
311769
311773
  dropletId: droplet.id.apply((id) => Number.parseInt(id, 10)),
311770
311774
  volumeId: volume.id
311771
311775
  });
package/dist/index.js CHANGED
@@ -311682,12 +311682,15 @@ function buildDropletServices(options) {
311682
311682
  const volumeConfig = volumes[0];
311683
311683
  if (volumeConfig) {
311684
311684
  volumeMountPath = volumeConfig.mountPath;
311685
- volume = new digitalocean.Volume(`${config.name}-volume`, {
311685
+ volume = new digitalocean.Volume(volumeConfig.name, {
311686
311686
  region,
311687
311687
  name: volumeConfig.name,
311688
311688
  size: volumeConfig.sizeGb,
311689
311689
  filesystemType: "ext4",
311690
- description: `Persistent storage for ${config.name}`
311690
+ description: volumeConfig.description || `Persistent storage for ${volumeConfig.name}`
311691
+ }, {
311692
+ ignoreChanges: ["description"],
311693
+ retainOnDelete: true
311691
311694
  });
311692
311695
  }
311693
311696
  }
@@ -311702,7 +311705,8 @@ function buildDropletServices(options) {
311702
311705
  tags: [`service:${config.name}`, "managed-by:pulumi"]
311703
311706
  });
311704
311707
  if (volume) {
311705
- volumeAttachment = new digitalocean.VolumeAttachment(`${config.name}-volume-attach`, {
311708
+ const volumeName = volumes[0]?.name || config.name;
311709
+ volumeAttachment = new digitalocean.VolumeAttachment(`${volumeName}-attach`, {
311706
311710
  dropletId: droplet.id.apply((id) => Number.parseInt(id, 10)),
311707
311711
  volumeId: volume.id
311708
311712
  });
@@ -44,6 +44,8 @@ export interface VolumeConfig {
44
44
  mountPath: string;
45
45
  /** Size in GB */
46
46
  sizeGb: number;
47
+ /** Optional description for the volume */
48
+ description?: string;
47
49
  }
48
50
  /**
49
51
  * Droplet-specific configuration options.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossdelta/infrastructure",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {