File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2629,10 +2629,13 @@ export default {
26292629 // advanced settings
26302630 createVmGroupData .keypairs = this .sshKeyPairs .join (' ,' )
26312631 createVmGroupData .affinitygroupids = (values .affinitygroupids || []).join (' ,' )
2632- if (values .userdata && values .userdata .length > 0 ) {
2632+ const isUserdataAllowed = ! this .userdataDefaultOverridePolicy || (this .userdataDefaultOverridePolicy === ' ALLOWOVERRIDE' && this .doUserdataOverride ) || (this .userdataDefaultOverridePolicy === ' APPEND' && this .doUserdataAppend )
2633+ if (isUserdataAllowed && values .userdata && values .userdata .length > 0 ) {
26332634 createVmGroupData .userdata = this .$toBase64AndURIEncoded (values .userdata )
26342635 }
2635- createVmGroupData .userdataid = values .userdataid
2636+ if (isUserdataAllowed) {
2637+ createVmGroupData .userdataid = values .userdataid
2638+ }
26362639
26372640 // vm profile details
26382641 createVmGroupData .autoscaleuserid = values .autoscaleuserid
@@ -2648,7 +2651,7 @@ export default {
26482651 idx++
26492652 }
26502653 }
2651- if (this .userDataValues ) {
2654+ if (isUserdataAllowed && this .userDataValues ) {
26522655 for (const [key , value ] of Object .entries (this .userDataValues )) {
26532656 createVmGroupData[' userdatadetails[' + idx + ' ].' + ` ${ key} ` ] = value
26542657 idx++
You can’t perform that action at this time.
0 commit comments