Loading modules/cloud_service_providers/aws_cloud/src/Plugin/cloud/launch_template/AwsCloudLaunchTemplatePlugin.php +6 −4 Original line number Diff line number Diff line Loading @@ -200,9 +200,11 @@ class AwsCloudLaunchTemplatePlugin extends CloudPluginBase implements CloudLaunc public function launch(CloudLaunchTemplateInterface $cloud_launch_template, FormStateInterface $form_state = NULL): array { $this->ec2Service->setCloudContext($cloud_launch_template->getCloudContext()); $test_only = $cloud_launch_template->get('field_test_only')->value === '0' ? FALSE : TRUE; $subnet_id = NULL; $security_group_id = NULL; if (!empty($form_state) && !empty($form_state->getValue('automatically_assign_vpc'))) { if (!$test_only && !empty($form_state) && !empty($form_state->getValue('automatically_assign_vpc'))) { [$subnet_id, $security_group_id] = $this->automaticallyAssignVpc( $form_state, $cloud_launch_template->getCloudContext() Loading @@ -219,7 +221,7 @@ class AwsCloudLaunchTemplatePlugin extends CloudPluginBase implements CloudLaunc } $params = []; $params['DryRun'] = $cloud_launch_template->get('field_test_only')->value === '0' ? FALSE : TRUE; $params['DryRun'] = $test_only; $params['ImageId'] = $cloud_launch_template->get('field_image_id')->value; $params['MaxCount'] = $cloud_launch_template->get('field_max_count')->value; $params['MinCount'] = $cloud_launch_template->get('field_min_count')->value; Loading Loading @@ -252,7 +254,7 @@ class AwsCloudLaunchTemplatePlugin extends CloudPluginBase implements CloudLaunc } $params['SecurityGroupIds'] = []; if (!empty($form_state->getValue('automatically_assign_vpc'))) { if (!$test_only && !empty($form_state->getValue('automatically_assign_vpc'))) { // The availability zone will be ignored, // if the VPC was automatically assigned. $params['SubnetId'] = $subnet_id; Loading Loading
modules/cloud_service_providers/aws_cloud/src/Plugin/cloud/launch_template/AwsCloudLaunchTemplatePlugin.php +6 −4 Original line number Diff line number Diff line Loading @@ -200,9 +200,11 @@ class AwsCloudLaunchTemplatePlugin extends CloudPluginBase implements CloudLaunc public function launch(CloudLaunchTemplateInterface $cloud_launch_template, FormStateInterface $form_state = NULL): array { $this->ec2Service->setCloudContext($cloud_launch_template->getCloudContext()); $test_only = $cloud_launch_template->get('field_test_only')->value === '0' ? FALSE : TRUE; $subnet_id = NULL; $security_group_id = NULL; if (!empty($form_state) && !empty($form_state->getValue('automatically_assign_vpc'))) { if (!$test_only && !empty($form_state) && !empty($form_state->getValue('automatically_assign_vpc'))) { [$subnet_id, $security_group_id] = $this->automaticallyAssignVpc( $form_state, $cloud_launch_template->getCloudContext() Loading @@ -219,7 +221,7 @@ class AwsCloudLaunchTemplatePlugin extends CloudPluginBase implements CloudLaunc } $params = []; $params['DryRun'] = $cloud_launch_template->get('field_test_only')->value === '0' ? FALSE : TRUE; $params['DryRun'] = $test_only; $params['ImageId'] = $cloud_launch_template->get('field_image_id')->value; $params['MaxCount'] = $cloud_launch_template->get('field_max_count')->value; $params['MinCount'] = $cloud_launch_template->get('field_min_count')->value; Loading Loading @@ -252,7 +254,7 @@ class AwsCloudLaunchTemplatePlugin extends CloudPluginBase implements CloudLaunc } $params['SecurityGroupIds'] = []; if (!empty($form_state->getValue('automatically_assign_vpc'))) { if (!$test_only && !empty($form_state->getValue('automatically_assign_vpc'))) { // The availability zone will be ignored, // if the VPC was automatically assigned. $params['SubnetId'] = $subnet_id; Loading