Skip to content

Commit

Permalink
Move specs to volumes terraform_data
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Feb 28, 2024
1 parent 8a47f2b commit b6fe18d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions aws/infrastructure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ locals {
for pv_key, pv_values in var.volumes:
pv_key => {
for name, specs in pv_values:
name => {
glob = "/dev/disk/by-id/*${replace(aws_ebs_volume.volumes["${x}-${pv_key}-${name}"].id, "-", "")}"
size = specs.size
}
name => merge(
{ glob = "/dev/disk/by-id/*${replace(aws_ebs_volume.volumes["${x}-${pv_key}-${name}"].id, "-", "")}" },
specs,
)
} if contains(values.tags, pv_key)
} : {}
}
Expand Down
8 changes: 4 additions & 4 deletions azure/infrastructure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ locals {
for pv_key, pv_values in var.volumes:
pv_key => {
for name, specs in pv_values:
name => {
glob = "/dev/disk/azure/scsi1/lun${index(module.design.volume_per_instance[x], replace(pv_key, "${x}-", ""))}"
size = specs.size
}
name => merge(
{ glob = "/dev/disk/azure/scsi1/lun${index(module.design.volume_per_instance[x], replace(pv_key, "${x}-", ""))}" },
specs,
)
} if contains(values.tags, pv_key)
} : {}
}
Expand Down
8 changes: 4 additions & 4 deletions gcp/infrastructure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ locals {
for pv_key, pv_values in var.volumes:
pv_key => {
for name, specs in pv_values:
name => {
glob = "/dev/disk/by-id/google-${var.cluster_name}-${x}-${pv_key}-${name}"
size = specs.size
}
name => merge(
{ glob = "/dev/disk/by-id/google-${var.cluster_name}-${x}-${pv_key}-${name}"},
specs,
)
} if contains(values.tags, pv_key)
} : {}
}
Expand Down
8 changes: 4 additions & 4 deletions openstack/infrastructure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ locals {
for pv_key, pv_values in var.volumes:
pv_key => {
for name, specs in pv_values:
name => {
glob = "/dev/disk/by-id/*${substr(openstack_blockstorage_volume_v3.volumes["${x}-${pv_key}-${name}"].id, 0, 20)}"
size = specs.size
}
name => merge(
{ glob = "/dev/disk/by-id/*${substr(openstack_blockstorage_volume_v3.volumes["${x}-${pv_key}-${name}"].id, 0, 20)}" },
specs,
)
} if contains(values.tags, pv_key)
} : {}
}
Expand Down

0 comments on commit b6fe18d

Please sign in to comment.