Hello,
Iam using terraform latest version with a shell script as cloud-init. on this shell script iam trying to create a new partition and volume group.
DEVICE="/dev/vdb"
DISKID=$(blkid $DEVICE | cut -d’ ’ -f2 | cut -d" -f2)
cat <<EOF | fdisk /dev/vdb
n
p
1
t
8e
w
EOF
partprobe $DEVICE
pvcreate /dev/vdb1
vgcreate infravg /dev/vdb1
when i use the official image oc centos: CentOS-7-aarch64-GenericCloud-1606.qcow2 without any modification the portion is script is executed without any issue however when i make a modification on this cloud image using disk-image-builder ( installing some rpms on the base image) and i use this modified image instead of the base image the terraform cloud-init script doen’t run this portion of code and doen’t create the new partition and the new volume group all other instarcutions on the shell script are executed but this portion no. I don’t reall understand the issue and when i check the cloud-init log file i don’t find and issue.
Thanks a lot
Bassem