Skip to content

Commit 9bb6242

Browse files
Added resourcegroup specifier in additionalvolume code
1 parent 73e31c6 commit 9bb6242

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cloud/scope/machine.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,9 @@ func (m *MachineScope) CreateAndAttachVolume(vpcVolume *infrav1beta2.VPCVolume)
11741174
// TODO: EncryptionKeyCRN is not supported for now, the field is omitted from the manifest
11751175
if vpcVolume.Profile != "custom" {
11761176
volumeOptions.VolumePrototype = &vpcv1.VolumePrototype{
1177+
ResourceGroup: &vpcv1.ResourceGroupIdentityByID{
1178+
ID: &m.IBMVPCCluster.Spec.ResourceGroup,
1179+
},
11771180
Profile: &vpcv1.VolumeProfileIdentityByName{
11781181
Name: &vpcVolume.Profile,
11791182
},
@@ -1184,6 +1187,9 @@ func (m *MachineScope) CreateAndAttachVolume(vpcVolume *infrav1beta2.VPCVolume)
11841187
}
11851188
} else {
11861189
volumeOptions.VolumePrototype = &vpcv1.VolumePrototype{
1190+
ResourceGroup: &vpcv1.ResourceGroupIdentityByID{
1191+
ID: &m.IBMVPCCluster.Spec.ResourceGroup,
1192+
},
11871193
Iops: &vpcVolume.Iops,
11881194
Profile: &vpcv1.VolumeProfileIdentityByName{
11891195
Name: &vpcVolume.Profile,

0 commit comments

Comments
 (0)