@spinnaker/amazon 0.0.0-main-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4365 -0
- package/LICENSE.txt +203 -0
- package/dist/amazon.logo352d4e042476837f.svg +503 -0
- package/dist/aws.module.d.ts +5 -0
- package/dist/aws.settings.d.ts +59 -0
- package/dist/aws.validators.d.ts +7 -0
- package/dist/certificates/AmazonCertificateReader.d.ts +6 -0
- package/dist/certificates/index.d.ts +1 -0
- package/dist/common/AwsModalFooter.d.ts +21 -0
- package/dist/common/common.module.d.ts +1 -0
- package/dist/common/footer.component.d.ts +1 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/deploymentStrategy/AdditionalFields.d.ts +10 -0
- package/dist/deploymentStrategy/rollingPush.strategy.d.ts +10 -0
- package/dist/domain/IAmazonBlockDeviceMapping.d.ts +15 -0
- package/dist/domain/IAmazonCertificate.d.ts +5 -0
- package/dist/domain/IAmazonFunction.d.ts +65 -0
- package/dist/domain/IAmazonFunctionSourceData.d.ts +46 -0
- package/dist/domain/IAmazonHealth.d.ts +11 -0
- package/dist/domain/IAmazonInstance.d.ts +24 -0
- package/dist/domain/IAmazonLaunchTemplate.d.ts +91 -0
- package/dist/domain/IAmazonLoadBalancer.d.ts +230 -0
- package/dist/domain/IAmazonLoadBalancerSourceData.d.ts +170 -0
- package/dist/domain/IAmazonScalingPolicy.d.ts +22 -0
- package/dist/domain/IAmazonSecurityGroup.d.ts +4 -0
- package/dist/domain/IAmazonServerGroup.d.ts +67 -0
- package/dist/domain/IKeyPair.d.ts +6 -0
- package/dist/domain/IScalingPolicy.d.ts +44 -0
- package/dist/domain/IScalingProcess.d.ts +10 -0
- package/dist/domain/ITargetTrackingPolicy.d.ts +22 -0
- package/dist/domain/index.d.ts +15 -0
- package/dist/function/CreateLambdaFunction.d.ts +25 -0
- package/dist/function/configure/ExecutionRole.d.ts +15 -0
- package/dist/function/configure/FunctionBasicInformation.d.ts +26 -0
- package/dist/function/configure/FunctionDebugAndErrorHandling.d.ts +15 -0
- package/dist/function/configure/FunctionEnvironmentVariables.d.ts +14 -0
- package/dist/function/configure/FunctionSettings.d.ts +14 -0
- package/dist/function/configure/FunctionTags.d.ts +14 -0
- package/dist/function/configure/Network.d.ts +42 -0
- package/dist/function/details/AmazonFunctionDetails.d.ts +19 -0
- package/dist/function/details/FunctionActions.d.ts +20 -0
- package/dist/function/function.module.d.ts +1 -0
- package/dist/function/function.transformer.d.ts +7 -0
- package/dist/function/index.d.ts +5 -0
- package/dist/help/amazon.help.d.ts +1 -0
- package/dist/image/image.reader.d.ts +25 -0
- package/dist/image/index.d.ts +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +20873 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/amazon.instance.write.service.d.ts +15 -0
- package/dist/instance/awsInstanceType.service.d.ts +50 -0
- package/dist/instance/awsInstanceTypes.d.ts +10 -0
- package/dist/instance/details/AmazonInstanceInformation.d.ts +6 -0
- package/dist/instance/details/CostFactor.d.ts +6 -0
- package/dist/instance/details/InstanceDns.d.ts +16 -0
- package/dist/instance/details/InstanceInformation.d.ts +13 -0
- package/dist/instance/details/InstanceSecurityGroups.d.ts +6 -0
- package/dist/instance/details/InstanceStatus.d.ts +16 -0
- package/dist/instance/details/InstanceTags.d.ts +8 -0
- package/dist/instance/details/amazonInstanceInformation.component.d.ts +1 -0
- package/dist/instance/details/instance.details.controller.d.ts +2 -0
- package/dist/instance/details/instanceDns.component.d.ts +1 -0
- package/dist/instance/details/instanceSecurityGroups.component.d.ts +1 -0
- package/dist/instance/details/instanceStatus.component.d.ts +1 -0
- package/dist/instance/details/instanceTags.component.d.ts +1 -0
- package/dist/instance/details/utils.d.ts +3 -0
- package/dist/instance/index.d.ts +5 -0
- package/dist/keyPairs/KeyPairsReader.d.ts +4 -0
- package/dist/keyPairs/index.d.ts +1 -0
- package/dist/loadBalancer/AmazonLoadBalancerClusterContainer.d.ts +6 -0
- package/dist/loadBalancer/AmazonLoadBalancersTag.d.ts +20 -0
- package/dist/loadBalancer/OidcConfigReader.d.ts +16 -0
- package/dist/loadBalancer/TargetGroup.d.ts +12 -0
- package/dist/loadBalancer/TargetGroupDetails.d.ts +7 -0
- package/dist/loadBalancer/amazonLoadBalancerDataUtils.d.ts +6 -0
- package/dist/loadBalancer/configure/AmazonLoadBalancerChoiceModal.d.ts +18 -0
- package/dist/loadBalancer/configure/LoadBalancerTypes.d.ts +14 -0
- package/dist/loadBalancer/configure/application/ALBAdvancedSettings.d.ts +2 -0
- package/dist/loadBalancer/configure/application/ALBListeners.d.ts +59 -0
- package/dist/loadBalancer/configure/application/ConfigureOidcConfigModal.d.ts +20 -0
- package/dist/loadBalancer/configure/application/ConfigureRedirectConfigModal.d.ts +17 -0
- package/dist/loadBalancer/configure/application/CreateApplicationLoadBalancer.d.ts +35 -0
- package/dist/loadBalancer/configure/application/TargetGroups.d.ts +33 -0
- package/dist/loadBalancer/configure/classic/AdvancedSettings.d.ts +10 -0
- package/dist/loadBalancer/configure/classic/CreateClassicLoadBalancer.d.ts +33 -0
- package/dist/loadBalancer/configure/classic/HealthCheck.d.ts +11 -0
- package/dist/loadBalancer/configure/classic/Listeners.d.ts +34 -0
- package/dist/loadBalancer/configure/common/AmazonCertificateSelectField.d.ts +15 -0
- package/dist/loadBalancer/configure/common/LoadBalancerLocation.d.ts +48 -0
- package/dist/loadBalancer/configure/common/SecurityGroups.d.ts +36 -0
- package/dist/loadBalancer/configure/common/targetGroupValidators.d.ts +10 -0
- package/dist/loadBalancer/configure/network/CertificateSelectors.d.ts +3 -0
- package/dist/loadBalancer/configure/network/CreateNetworkLoadBalancer.d.ts +34 -0
- package/dist/loadBalancer/configure/network/NLBAdvancedSettings.d.ts +5 -0
- package/dist/loadBalancer/configure/network/NLBListeners.d.ts +43 -0
- package/dist/loadBalancer/configure/network/TargetGroups.d.ts +34 -0
- package/dist/loadBalancer/details/LoadBalancerActions.d.ts +19 -0
- package/dist/loadBalancer/details/loadBalancerActions.component.d.ts +1 -0
- package/dist/loadBalancer/details/loadBalancerDetails.controller.d.ts +41 -0
- package/dist/loadBalancer/details/targetGroupDetails.controller.d.ts +30 -0
- package/dist/loadBalancer/index.d.ts +9 -0
- package/dist/loadBalancer/loadBalancer.module.d.ts +1 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +17 -0
- package/dist/loadBalancer/targetGroup.states.d.ts +1 -0
- package/dist/pipeline/stages/bake/awsBakeStage.d.ts +2 -0
- package/dist/pipeline/stages/bake/bakeExecutionDetails.controller.d.ts +2 -0
- package/dist/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.d.ts +2 -0
- package/dist/pipeline/stages/deleteLambda/DeleteLambdaFunctionStageForm.d.ts +3 -0
- package/dist/pipeline/stages/deleteLambda/LambdaDeleteStage.d.ts +8 -0
- package/dist/pipeline/stages/deleteLambda/constants/deleteVersion.constants.d.ts +6 -0
- package/dist/pipeline/stages/deleteLambda/constants/deleteVersion.picker.d.ts +16 -0
- package/dist/pipeline/stages/deleteLambda/constants/index.d.ts +2 -0
- package/dist/pipeline/stages/deleteLambda/index.d.ts +2 -0
- package/dist/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.d.ts +8 -0
- package/dist/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.d.ts +1 -0
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationExecutionDetails.d.ts +7 -0
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.d.ts +25 -0
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.d.ts +1 -0
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.d.ts +10 -0
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionApproval.d.ts +13 -0
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionDetails.d.ts +7 -0
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionLabel.d.ts +12 -0
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionMarkerIcon.d.ts +6 -0
- package/dist/pipeline/stages/deployLambda/components/AwsLambdaFunctionStageForm.d.ts +3 -0
- package/dist/pipeline/stages/deployLambda/components/BasicSettingsForm.d.ts +3 -0
- package/dist/pipeline/stages/deployLambda/components/EnvironmentForm.d.ts +2 -0
- package/dist/pipeline/stages/deployLambda/components/ExecutionRoleForm.d.ts +2 -0
- package/dist/pipeline/stages/deployLambda/components/LambdaAtEdgeForm.d.ts +3 -0
- package/dist/pipeline/stages/deployLambda/components/NetworkForm.d.ts +3 -0
- package/dist/pipeline/stages/deployLambda/components/TriggerEventsForm.d.ts +3 -0
- package/dist/pipeline/stages/deployLambda/components/function.constants.d.ts +5 -0
- package/dist/pipeline/stages/deployLambda/components/index.d.ts +5 -0
- package/dist/pipeline/stages/deployLambda/config/LambdaDeploymentStage.d.ts +3 -0
- package/dist/pipeline/stages/deployLambda/config/LambdaDeploymentStageConfig.d.ts +4 -0
- package/dist/pipeline/stages/deployLambda/config/LambdaDeploymentStageExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/deployLambda/config/UpsertDefaults.d.ts +1 -0
- package/dist/pipeline/stages/deployLambda/config/function.defaults.d.ts +2 -0
- package/dist/pipeline/stages/deployLambda/index.d.ts +2 -0
- package/dist/pipeline/stages/destroyAsg/awsDestroyAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/disableAsg/awsDisableAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/disableCluster/awsDisableClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/enableAsg/awsEnableAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/findAmi/awsFindAmiStage.d.ts +2 -0
- package/dist/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.d.ts +2 -0
- package/dist/pipeline/stages/invokeLambda/InvokeLambdaFunctionStageForm.d.ts +3 -0
- package/dist/pipeline/stages/invokeLambda/LambdaInvokeStage.d.ts +8 -0
- package/dist/pipeline/stages/invokeLambda/components/InvokeLambdaOperation.d.ts +3 -0
- package/dist/pipeline/stages/invokeLambda/components/index.d.ts +1 -0
- package/dist/pipeline/stages/invokeLambda/index.d.ts +2 -0
- package/dist/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.d.ts +2 -0
- package/dist/pipeline/stages/resizeAsg/awsResizeAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/rollbackCluster/awsRollbackClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/routeLambda/LambdaRouteStage.d.ts +8 -0
- package/dist/pipeline/stages/routeLambda/RouteLambdaFunctionStageForm.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/TriggerEventsForm.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/BlueGreenDeploymentForm.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/HealthCheckStrategy.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/InvocationHealthCheck.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/health.constants.d.ts +5 -0
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/index.d.ts +1 -0
- package/dist/pipeline/stages/routeLambda/components/DeploymentStrategyForm.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/RenderStrategy.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/SimpleDeploymentForm.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/VersionPicker.d.ts +14 -0
- package/dist/pipeline/stages/routeLambda/components/WeightedDeploymentForm.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/index.d.ts +1 -0
- package/dist/pipeline/stages/routeLambda/constants/index.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/constants/strategy.constants.d.ts +6 -0
- package/dist/pipeline/stages/routeLambda/constants/strategy.picker.d.ts +16 -0
- package/dist/pipeline/stages/routeLambda/constants/versions.constants.d.ts +6 -0
- package/dist/pipeline/stages/routeLambda/index.d.ts +2 -0
- package/dist/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/shrinkCluster/awsShrinkClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/tagImage/awsTagImageStage.d.ts +2 -0
- package/dist/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStage.d.ts +3 -0
- package/dist/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStageConfig.d.ts +5 -0
- package/dist/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStageExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/updateCodeLambda/components/UpdateCodeStageForm.d.ts +3 -0
- package/dist/pipeline/stages/updateCodeLambda/components/index.d.ts +1 -0
- package/dist/pipeline/stages/updateCodeLambda/index.d.ts +2 -0
- package/dist/reactShims/aws.react.injector.d.ts +18 -0
- package/dist/reactShims/aws.react.module.d.ts +1 -0
- package/dist/reactShims/index.d.ts +1 -0
- package/dist/search/searchResultFormatter.d.ts +2 -0
- package/dist/securityGroup/clone/cloneSecurityGroup.controller.d.ts +2 -0
- package/dist/securityGroup/configure/CreateSecurityGroupCtrl.d.ts +2 -0
- package/dist/securityGroup/configure/EditSecurityGroupCtrl.d.ts +2 -0
- package/dist/securityGroup/configure/configSecurityGroup.mixin.controller.d.ts +2 -0
- package/dist/securityGroup/configure/ingressRuleGroupSelector.component.d.ts +1 -0
- package/dist/securityGroup/configure/securityGroupDetailsCustom.component.d.ts +1 -0
- package/dist/securityGroup/configure/securityGroupDetailsCustom.d.ts +10 -0
- package/dist/securityGroup/details/IPRangeRules.d.ts +17 -0
- package/dist/securityGroup/details/index.d.ts +1 -0
- package/dist/securityGroup/details/securityGroupDetail.controller.d.ts +2 -0
- package/dist/securityGroup/details/securityGroupIpRangeRules.component.d.ts +1 -0
- package/dist/securityGroup/index.d.ts +1 -0
- package/dist/securityGroup/securityGroup.module.d.ts +1 -0
- package/dist/securityGroup/securityGroup.reader.d.ts +6 -0
- package/dist/securityGroup/securityGroup.transformer.d.ts +2 -0
- package/dist/serverGroup/AvailabilityZoneSelector.d.ts +21 -0
- package/dist/serverGroup/configure/AmazonImageSelectInput.d.ts +44 -0
- package/dist/serverGroup/configure/index.d.ts +5 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +17 -0
- package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +126 -0
- package/dist/serverGroup/configure/wizard/AmazonCloneServerGroupModal.d.ts +31 -0
- package/dist/serverGroup/configure/wizard/ServerGroupTemplateSelection.d.ts +15 -0
- package/dist/serverGroup/configure/wizard/capacity/CapacitySelector.d.ts +18 -0
- package/dist/serverGroup/configure/wizard/capacity/MinMaxDesired.d.ts +11 -0
- package/dist/serverGroup/configure/wizard/instanceType/CpuCreditsToggle.d.ts +8 -0
- package/dist/serverGroup/configure/wizard/instanceType/InstanceTypeSelector.d.ts +9 -0
- package/dist/serverGroup/configure/wizard/instanceType/InstanceTypeWarning.d.ts +6 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/AdvancedModeSelector.d.ts +14 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/AmazonInstanceTypeInfoRenderer.d.ts +5 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceProfileSelector.d.ts +9 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeRow.d.ts +13 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeSelect.d.ts +7 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTable.d.ts +18 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTableBody.d.ts +14 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTableParts.d.ts +17 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstancesDistribution.d.ts +8 -0
- package/dist/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.d.ts +9 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.d.ts +32 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupCapacity.d.ts +13 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupInstanceType.d.ts +22 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.d.ts +29 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupSecurityGroups.d.ts +13 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupZones.d.ts +13 -0
- package/dist/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettings.d.ts +13 -0
- package/dist/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.d.ts +12 -0
- package/dist/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsInner.d.ts +11 -0
- package/dist/serverGroup/configure/wizard/pages/index.d.ts +8 -0
- package/dist/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.d.ts +22 -0
- package/dist/serverGroup/configure/wizard/securityGroups/ServerGroupSecurityGroupsRemoved.d.ts +11 -0
- package/dist/serverGroup/details/AmazonServerGroupActions.d.ts +23 -0
- package/dist/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.d.ts +2 -0
- package/dist/serverGroup/details/amazonServerGroupDetailsGetter.d.ts +4 -0
- package/dist/serverGroup/details/resize/AmazonResizeServerGroupModal.d.ts +47 -0
- package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +2 -0
- package/dist/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.d.ts +21 -0
- package/dist/serverGroup/details/scalingPolicy/ScalingPolicySummary.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/ScalingPolicyWriter.d.ts +55 -0
- package/dist/serverGroup/details/scalingPolicy/StepPolicySummary.d.ts +10 -0
- package/dist/serverGroup/details/scalingPolicy/chart/DateLineChart.d.ts +15 -0
- package/dist/serverGroup/details/scalingPolicy/chart/MetricAlarmChart.d.ts +11 -0
- package/dist/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.d.ts +1 -0
- package/dist/serverGroup/details/scalingPolicy/index.d.ts +12 -0
- package/dist/serverGroup/details/scalingPolicy/popover/AlarmSummary.d.ts +12 -0
- package/dist/serverGroup/details/scalingPolicy/popover/StepPolicyPopoverContent.d.ts +7 -0
- package/dist/serverGroup/details/scalingPolicy/scalingPolicy.module.d.ts +1 -0
- package/dist/serverGroup/details/scalingPolicy/scalingPolicySummary.component.d.ts +1 -0
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TargetMetricFields.d.ts +17 -0
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingAdditionalSettings.d.ts +10 -0
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingChart.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingSummary.d.ts +10 -0
- package/dist/serverGroup/details/scalingPolicy/targetTracking/UpsertTargetTrackingModal.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/PolicyTypeSelectionModal.d.ts +7 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/ScalingPolicyAdditionalSettings.d.ts +11 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/ScalingPolicyCommandBuilderService.d.ts +11 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/UpsertScalingPolicyModal.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/AlarmConfigurer.d.ts +16 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.d.ts +12 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/MetricSelector.d.ts +15 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/namespaces.d.ts +1 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/index.d.ts +7 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/simple/SimplePolicyAction.d.ts +13 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/step/StepPolicyAction.d.ts +18 -0
- package/dist/serverGroup/details/scalingProcesses/AutoScalingProcessService.d.ts +6 -0
- package/dist/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.d.ts +2 -0
- package/dist/serverGroup/details/scheduledAction/ScheduledAction.d.ts +8 -0
- package/dist/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.d.ts +2 -0
- package/dist/serverGroup/details/sections/AdvancedSettingsDetailsSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/AmazonCapacityDetailsSection.d.ts +5 -0
- package/dist/serverGroup/details/sections/AmazonInfoDetailsSection.d.ts +12 -0
- package/dist/serverGroup/details/sections/HealthDetailsSection.d.ts +5 -0
- package/dist/serverGroup/details/sections/IAmazonServerGroupDetailsSectionProps.d.ts +5 -0
- package/dist/serverGroup/details/sections/InstancesDistributionDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/LaunchConfigDetailsSection.d.ts +11 -0
- package/dist/serverGroup/details/sections/LaunchTemplateDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/LogsDetailsSection.d.ts +5 -0
- package/dist/serverGroup/details/sections/MultipleInstanceTypesSubSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/PackageDetailsSection.d.ts +12 -0
- package/dist/serverGroup/details/sections/ScalingPoliciesDetailsSection.d.ts +8 -0
- package/dist/serverGroup/details/sections/ScalingProcessesDetailsSection.d.ts +15 -0
- package/dist/serverGroup/details/sections/ScheduledActionsDetailsSection.d.ts +12 -0
- package/dist/serverGroup/details/sections/SecurityGroupsDetailsSection.d.ts +14 -0
- package/dist/serverGroup/details/sections/TagsDetailsSection.d.ts +5 -0
- package/dist/serverGroup/details/sections/index.d.ts +15 -0
- package/dist/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.d.ts +2 -0
- package/dist/serverGroup/details/serverGroupDetails.module.d.ts +1 -0
- package/dist/serverGroup/details/utils.d.ts +1 -0
- package/dist/serverGroup/index.d.ts +5 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +14 -0
- package/dist/subnet/SubnetSelectField.d.ts +23 -0
- package/dist/subnet/SubnetSelectInput.d.ts +18 -0
- package/dist/subnet/index.d.ts +2 -0
- package/dist/subnet/subnet.renderer.d.ts +5 -0
- package/dist/validation/ApplicationNameValidator.d.ts +1 -0
- package/dist/vpc/VpcReader.d.ts +7 -0
- package/dist/vpc/VpcTag.d.ts +5 -0
- package/dist/vpc/index.d.ts +1 -0
- package/dist/vpc/vpc.module.d.ts +1 -0
- package/package.json +63 -0
- package/src/applicationProviderFields/awsFields.html +13 -0
- package/src/aws.module.ts +211 -0
- package/src/aws.settings.ts +71 -0
- package/src/aws.validators.ts +31 -0
- package/src/certificates/AmazonCertificateReader.ts +24 -0
- package/src/certificates/index.ts +1 -0
- package/src/common/AwsModalFooter.tsx +70 -0
- package/src/common/common.module.ts +6 -0
- package/src/common/footer.component.ts +29 -0
- package/src/common/index.ts +1 -0
- package/src/deploymentStrategy/AdditionalFields.tsx +110 -0
- package/src/deploymentStrategy/rollingPush.strategy.ts +43 -0
- package/src/domain/IAmazonBlockDeviceMapping.ts +16 -0
- package/src/domain/IAmazonCertificate.ts +6 -0
- package/src/domain/IAmazonFunction.ts +64 -0
- package/src/domain/IAmazonFunctionSourceData.ts +45 -0
- package/src/domain/IAmazonHealth.ts +15 -0
- package/src/domain/IAmazonInstance.ts +25 -0
- package/src/domain/IAmazonLaunchTemplate.ts +104 -0
- package/src/domain/IAmazonLoadBalancer.ts +277 -0
- package/src/domain/IAmazonLoadBalancerSourceData.ts +188 -0
- package/src/domain/IAmazonScalingPolicy.ts +26 -0
- package/src/domain/IAmazonSecurityGroup.ts +4 -0
- package/src/domain/IAmazonServerGroup.ts +74 -0
- package/src/domain/IKeyPair.ts +6 -0
- package/src/domain/IScalingPolicy.ts +85 -0
- package/src/domain/IScalingProcess.ts +11 -0
- package/src/domain/ITargetTrackingPolicy.ts +31 -0
- package/src/domain/index.ts +15 -0
- package/src/function/CreateLambdaFunction.tsx +228 -0
- package/src/function/configure/ExecutionRole.tsx +45 -0
- package/src/function/configure/FunctionBasicInformation.tsx +207 -0
- package/src/function/configure/FunctionDebugAndErrorHandling.tsx +49 -0
- package/src/function/configure/FunctionEnvironmentVariables.tsx +42 -0
- package/src/function/configure/FunctionSettings.tsx +43 -0
- package/src/function/configure/FunctionTags.tsx +35 -0
- package/src/function/configure/Network.tsx +260 -0
- package/src/function/details/AmazonFunctionDetails.tsx +198 -0
- package/src/function/details/FunctionActions.spec.tsx +55 -0
- package/src/function/details/FunctionActions.tsx +132 -0
- package/src/function/function.module.ts +5 -0
- package/src/function/function.transformer.ts +71 -0
- package/src/function/index.ts +5 -0
- package/src/help/amazon.help.ts +228 -0
- package/src/image/image.reader.spec.ts +75 -0
- package/src/image/image.reader.ts +44 -0
- package/src/image/index.ts +1 -0
- package/src/index.ts +15 -0
- package/src/instance/amazon.instance.write.service.ts +85 -0
- package/src/instance/awsInstanceType.service.spec.js +380 -0
- package/src/instance/awsInstanceType.service.ts +253 -0
- package/src/instance/awsInstanceTypes.ts +311 -0
- package/src/instance/details/AmazonInstanceInformation.tsx +35 -0
- package/src/instance/details/CostFactor.tsx +29 -0
- package/src/instance/details/InstanceDns.tsx +73 -0
- package/src/instance/details/InstanceInformation.spec.tsx +71 -0
- package/src/instance/details/InstanceInformation.tsx +66 -0
- package/src/instance/details/InstanceSecurityGroups.tsx +45 -0
- package/src/instance/details/InstanceStatus.tsx +92 -0
- package/src/instance/details/InstanceTags.tsx +21 -0
- package/src/instance/details/amazonInstanceInformation.component.ts +13 -0
- package/src/instance/details/instance.details.controller.js +586 -0
- package/src/instance/details/instance.details.controller.spec.js +133 -0
- package/src/instance/details/instanceDetails.html +65 -0
- package/src/instance/details/instanceDns.component.ts +21 -0
- package/src/instance/details/instanceSecurityGroups.component.ts +13 -0
- package/src/instance/details/instanceStatus.component.ts +19 -0
- package/src/instance/details/instanceTags.component.ts +13 -0
- package/src/instance/details/utils.ts +34 -0
- package/src/instance/index.ts +5 -0
- package/src/keyPairs/KeyPairsReader.ts +11 -0
- package/src/keyPairs/index.ts +1 -0
- package/src/loadBalancer/AmazonLoadBalancerClusterContainer.tsx +53 -0
- package/src/loadBalancer/AmazonLoadBalancersTag.tsx +231 -0
- package/src/loadBalancer/OidcConfigReader.ts +21 -0
- package/src/loadBalancer/TargetGroup.tsx +63 -0
- package/src/loadBalancer/TargetGroupDetails.tsx +13 -0
- package/src/loadBalancer/amazonLoadBalancerDataUtils.ts +64 -0
- package/src/loadBalancer/configure/AmazonLoadBalancerChoiceModal.tsx +155 -0
- package/src/loadBalancer/configure/LoadBalancerTypes.ts +42 -0
- package/src/loadBalancer/configure/application/ALBAdvancedSettings.tsx +28 -0
- package/src/loadBalancer/configure/application/ALBListeners.tsx +1023 -0
- package/src/loadBalancer/configure/application/ConfigureConfigModal.css +3 -0
- package/src/loadBalancer/configure/application/ConfigureOidcConfigModal.tsx +140 -0
- package/src/loadBalancer/configure/application/ConfigureRedirectConfigModal.tsx +146 -0
- package/src/loadBalancer/configure/application/CreateApplicationLoadBalancer.tsx +337 -0
- package/src/loadBalancer/configure/application/TargetGroups.tsx +548 -0
- package/src/loadBalancer/configure/classic/AdvancedSettings.css +3 -0
- package/src/loadBalancer/configure/classic/AdvancedSettings.tsx +69 -0
- package/src/loadBalancer/configure/classic/CreateClassicLoadBalancer.tsx +282 -0
- package/src/loadBalancer/configure/classic/HealthCheck.tsx +69 -0
- package/src/loadBalancer/configure/classic/Listeners.less +21 -0
- package/src/loadBalancer/configure/classic/Listeners.tsx +273 -0
- package/src/loadBalancer/configure/common/AmazonCertificateSelectField.tsx +48 -0
- package/src/loadBalancer/configure/common/LoadBalancerLocation.tsx +417 -0
- package/src/loadBalancer/configure/common/SecurityGroups.tsx +223 -0
- package/src/loadBalancer/configure/common/configure.less +131 -0
- package/src/loadBalancer/configure/common/targetGroupValidators.spec.ts +130 -0
- package/src/loadBalancer/configure/common/targetGroupValidators.ts +41 -0
- package/src/loadBalancer/configure/network/CertificateSelectors.tsx +73 -0
- package/src/loadBalancer/configure/network/CreateNetworkLoadBalancer.tsx +303 -0
- package/src/loadBalancer/configure/network/NLBAdvancedSettings.tsx +34 -0
- package/src/loadBalancer/configure/network/NLBListeners.tsx +298 -0
- package/src/loadBalancer/configure/network/TargetGroups.tsx +447 -0
- package/src/loadBalancer/details/LoadBalancerActions.tsx +166 -0
- package/src/loadBalancer/details/loadBalancerActions.component.ts +16 -0
- package/src/loadBalancer/details/loadBalancerDetails.controller.spec.ts +76 -0
- package/src/loadBalancer/details/loadBalancerDetails.controller.ts +240 -0
- package/src/loadBalancer/details/loadBalancerDetails.html +266 -0
- package/src/loadBalancer/details/targetGroupDetails.controller.ts +95 -0
- package/src/loadBalancer/details/targetGroupDetails.html +138 -0
- package/src/loadBalancer/index.ts +9 -0
- package/src/loadBalancer/loadBalancer.module.ts +15 -0
- package/src/loadBalancer/loadBalancer.transformer.ts +638 -0
- package/src/loadBalancer/targetGroup.less +46 -0
- package/src/loadBalancer/targetGroup.states.ts +55 -0
- package/src/logo/amazon.logo.svg +503 -0
- package/src/logo/aws.icon.svg +10 -0
- package/src/logo/aws.logo.less +5 -0
- package/src/pipeline/stages/bake/awsBakeStage.js +219 -0
- package/src/pipeline/stages/bake/bakeExecutionDetails.controller.js +43 -0
- package/src/pipeline/stages/bake/bakeExecutionDetails.html +65 -0
- package/src/pipeline/stages/bake/bakeStage.html +205 -0
- package/src/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.js +143 -0
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStage.html +143 -0
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStepLabel.html +1 -0
- package/src/pipeline/stages/deleteLambda/DeleteLambdaFunctionStageForm.tsx +143 -0
- package/src/pipeline/stages/deleteLambda/LambdaDeleteStage.tsx +86 -0
- package/src/pipeline/stages/deleteLambda/constants/deleteVersion.constants.ts +37 -0
- package/src/pipeline/stages/deleteLambda/constants/deleteVersion.picker.tsx +47 -0
- package/src/pipeline/stages/deleteLambda/constants/index.ts +5 -0
- package/src/pipeline/stages/deleteLambda/index.ts +17 -0
- package/src/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.tsx +80 -0
- package/src/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.ts +46 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationExecutionDetails.tsx +23 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.ts +84 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.html +84 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.ts +37 -0
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.ts +33 -0
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionApproval.tsx +80 -0
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionDetails.tsx +56 -0
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionLabel.tsx +53 -0
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionMarkerIcon.tsx +20 -0
- package/src/pipeline/stages/deployLambda/components/AwsLambdaFunctionStageForm.tsx +138 -0
- package/src/pipeline/stages/deployLambda/components/BasicSettingsForm.tsx +176 -0
- package/src/pipeline/stages/deployLambda/components/EnvironmentForm.tsx +24 -0
- package/src/pipeline/stages/deployLambda/components/ExecutionRoleForm.tsx +15 -0
- package/src/pipeline/stages/deployLambda/components/LambdaAtEdgeForm.tsx +28 -0
- package/src/pipeline/stages/deployLambda/components/NetworkForm.tsx +123 -0
- package/src/pipeline/stages/deployLambda/components/TriggerEventsForm.tsx +49 -0
- package/src/pipeline/stages/deployLambda/components/function.constants.ts +32 -0
- package/src/pipeline/stages/deployLambda/components/index.ts +8 -0
- package/src/pipeline/stages/deployLambda/config/LambdaDeploymentStage.tsx +20 -0
- package/src/pipeline/stages/deployLambda/config/LambdaDeploymentStageConfig.tsx +64 -0
- package/src/pipeline/stages/deployLambda/config/LambdaDeploymentStageExecutionDetails.tsx +31 -0
- package/src/pipeline/stages/deployLambda/config/UpsertDefaults.tsx +21 -0
- package/src/pipeline/stages/deployLambda/config/function.defaults.ts +39 -0
- package/src/pipeline/stages/deployLambda/index.ts +18 -0
- package/src/pipeline/stages/destroyAsg/awsDestroyAsgStage.js +66 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +9 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +1 -0
- package/src/pipeline/stages/disableAsg/awsDisableAsgStage.js +69 -0
- package/src/pipeline/stages/disableAsg/disableAsgStage.html +11 -0
- package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/disableCluster/awsDisableClusterStage.js +84 -0
- package/src/pipeline/stages/disableCluster/disableClusterStage.html +26 -0
- package/src/pipeline/stages/enableAsg/awsEnableAsgStage.js +73 -0
- package/src/pipeline/stages/enableAsg/enableAsgStage.html +11 -0
- package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/findAmi/awsFindAmiStage.js +79 -0
- package/src/pipeline/stages/findAmi/findAmiStage.html +24 -0
- package/src/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.js +36 -0
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html +44 -0
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html +11 -0
- package/src/pipeline/stages/invokeLambda/InvokeLambdaFunctionStageForm.tsx +106 -0
- package/src/pipeline/stages/invokeLambda/LambdaInvokeStage.tsx +125 -0
- package/src/pipeline/stages/invokeLambda/components/InvokeLambdaOperation.tsx +78 -0
- package/src/pipeline/stages/invokeLambda/components/index.ts +4 -0
- package/src/pipeline/stages/invokeLambda/index.ts +18 -0
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessExecutionDetails.html +36 -0
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.html +24 -0
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.js +98 -0
- package/src/pipeline/stages/resizeAsg/awsResizeAsgStage.js +127 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +90 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +4 -0
- package/src/pipeline/stages/rollbackCluster/awsRollbackClusterStage.js +66 -0
- package/src/pipeline/stages/rollbackCluster/rollbackClusterStage.html +43 -0
- package/src/pipeline/stages/routeLambda/LambdaRouteStage.tsx +98 -0
- package/src/pipeline/stages/routeLambda/RouteLambdaFunctionStageForm.tsx +150 -0
- package/src/pipeline/stages/routeLambda/TriggerEventsForm.tsx +51 -0
- package/src/pipeline/stages/routeLambda/components/BlueGreenDeployment/BlueGreenDeploymentForm.tsx +27 -0
- package/src/pipeline/stages/routeLambda/components/BlueGreenDeployment/HealthCheckStrategy.tsx +21 -0
- package/src/pipeline/stages/routeLambda/components/BlueGreenDeployment/InvocationHealthCheck.tsx +93 -0
- package/src/pipeline/stages/routeLambda/components/BlueGreenDeployment/health.constants.ts +14 -0
- package/src/pipeline/stages/routeLambda/components/BlueGreenDeployment/index.ts +4 -0
- package/src/pipeline/stages/routeLambda/components/DeploymentStrategyForm.tsx +18 -0
- package/src/pipeline/stages/routeLambda/components/RenderStrategy.tsx +23 -0
- package/src/pipeline/stages/routeLambda/components/SimpleDeploymentForm.tsx +67 -0
- package/src/pipeline/stages/routeLambda/components/VersionPicker.tsx +43 -0
- package/src/pipeline/stages/routeLambda/components/WeightedDeploymentForm.tsx +107 -0
- package/src/pipeline/stages/routeLambda/components/index.ts +4 -0
- package/src/pipeline/stages/routeLambda/constants/index.ts +6 -0
- package/src/pipeline/stages/routeLambda/constants/strategy.constants.tsx +26 -0
- package/src/pipeline/stages/routeLambda/constants/strategy.picker.tsx +47 -0
- package/src/pipeline/stages/routeLambda/constants/versions.constants.ts +31 -0
- package/src/pipeline/stages/routeLambda/index.ts +18 -0
- package/src/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.js +78 -0
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +35 -0
- package/src/pipeline/stages/shrinkCluster/awsShrinkClusterStage.js +73 -0
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +34 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.js +34 -0
- package/src/pipeline/stages/tagImage/tagImageExecutionDetails.html +38 -0
- package/src/pipeline/stages/tagImage/tagImageStage.html +10 -0
- package/src/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStage.less +5 -0
- package/src/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStage.tsx +20 -0
- package/src/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStageConfig.tsx +41 -0
- package/src/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStageExecutionDetails.tsx +31 -0
- package/src/pipeline/stages/updateCodeLambda/components/UpdateCodeStageForm.tsx +122 -0
- package/src/pipeline/stages/updateCodeLambda/components/index.ts +4 -0
- package/src/pipeline/stages/updateCodeLambda/index.ts +18 -0
- package/src/reactShims/aws.react.injector.ts +25 -0
- package/src/reactShims/aws.react.module.ts +12 -0
- package/src/reactShims/index.ts +1 -0
- package/src/search/searchResultFormatter.ts +19 -0
- package/src/securityGroup/clone/cloneSecurityGroup.controller.js +106 -0
- package/src/securityGroup/clone/cloneSecurityGroup.html +19 -0
- package/src/securityGroup/configure/CreateSecurityGroup.controller.spec.js +307 -0
- package/src/securityGroup/configure/CreateSecurityGroupCtrl.js +47 -0
- package/src/securityGroup/configure/EditSecurityGroupCtrl.js +115 -0
- package/src/securityGroup/configure/configSecurityGroup.mixin.controller.js +366 -0
- package/src/securityGroup/configure/createSecurityGroup.html +19 -0
- package/src/securityGroup/configure/createSecurityGroupIngress.html +100 -0
- package/src/securityGroup/configure/createSecurityGroupProperties.html +123 -0
- package/src/securityGroup/configure/editSecurityGroup.html +20 -0
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.html +77 -0
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.less +6 -0
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.ts +190 -0
- package/src/securityGroup/configure/securityGroupDetailsCustom.component.ts +16 -0
- package/src/securityGroup/configure/securityGroupDetailsCustom.tsx +16 -0
- package/src/securityGroup/details/IPRangeRules.tsx +56 -0
- package/src/securityGroup/details/index.ts +1 -0
- package/src/securityGroup/details/securityGroupDetail.controller.js +249 -0
- package/src/securityGroup/details/securityGroupDetail.html +114 -0
- package/src/securityGroup/details/securityGroupIpRangeRules.component.ts +12 -0
- package/src/securityGroup/index.ts +1 -0
- package/src/securityGroup/securityGroup.module.ts +26 -0
- package/src/securityGroup/securityGroup.reader.ts +24 -0
- package/src/securityGroup/securityGroup.transformer.js +48 -0
- package/src/serverGroup/AvailabilityZoneSelector.tsx +107 -0
- package/src/serverGroup/configure/AccountServiceFixtures.js +45 -0
- package/src/serverGroup/configure/AmazonImageSelectInput.spec.tsx +101 -0
- package/src/serverGroup/configure/AmazonImageSelectInput.tsx +412 -0
- package/src/serverGroup/configure/index.ts +5 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.aws.service.spec.js +430 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +528 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.spec.js +284 -0
- package/src/serverGroup/configure/serverGroupConfiguration.service.spec.ts +478 -0
- package/src/serverGroup/configure/serverGroupConfiguration.service.ts +747 -0
- package/src/serverGroup/configure/wizard/AmazonCloneServerGroupModal.tsx +243 -0
- package/src/serverGroup/configure/wizard/ServerGroupTemplateSelection.tsx +60 -0
- package/src/serverGroup/configure/wizard/capacity/CapacitySelector.tsx +181 -0
- package/src/serverGroup/configure/wizard/capacity/MinMaxDesired.tsx +60 -0
- package/src/serverGroup/configure/wizard/instanceType/CpuCreditsToggle.tsx +62 -0
- package/src/serverGroup/configure/wizard/instanceType/InstanceTypeSelector.tsx +167 -0
- package/src/serverGroup/configure/wizard/instanceType/InstanceTypeWarning.tsx +44 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/AdvancedModeSelector.tsx +102 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/AmazonInstanceTypeInfoRenderer.tsx +59 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstanceProfileSelector.tsx +36 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeRow.tsx +157 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeSelect.tsx +78 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTable.tsx +148 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTableBody.tsx +144 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTableParts.tsx +129 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstancesDistribution.less +5 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstancesDistribution.tsx +111 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/advancedMode.less +122 -0
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.tsx +65 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +354 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupCapacity.tsx +66 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx +157 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx +262 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupSecurityGroups.tsx +52 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupZones.tsx +68 -0
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettings.tsx +30 -0
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.tsx +374 -0
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsInner.tsx +40 -0
- package/src/serverGroup/configure/wizard/pages/index.ts +8 -0
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.tsx +108 -0
- package/src/serverGroup/configure/wizard/securityGroups/ServerGroupSecurityGroupsRemoved.tsx +49 -0
- package/src/serverGroup/details/AmazonServerGroupActions.tsx +343 -0
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.js +47 -0
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.html +79 -0
- package/src/serverGroup/details/amazonServerGroupDetailsGetter.ts +83 -0
- package/src/serverGroup/details/resize/AmazonResizeServerGroupModal.tsx +458 -0
- package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +146 -0
- package/src/serverGroup/details/rollback/rollbackServerGroup.html +139 -0
- package/src/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.tsx +97 -0
- package/src/serverGroup/details/scalingPolicy/ScalingPolicySummary.tsx +33 -0
- package/src/serverGroup/details/scalingPolicy/ScalingPolicyWriter.ts +102 -0
- package/src/serverGroup/details/scalingPolicy/StepPolicySummary.less +10 -0
- package/src/serverGroup/details/scalingPolicy/StepPolicySummary.tsx +120 -0
- package/src/serverGroup/details/scalingPolicy/chart/DateLineChart.tsx +117 -0
- package/src/serverGroup/details/scalingPolicy/chart/MetricAlarmChart.tsx +85 -0
- package/src/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.ts +15 -0
- package/src/serverGroup/details/scalingPolicy/index.ts +12 -0
- package/src/serverGroup/details/scalingPolicy/popover/AlarmSummary.tsx +26 -0
- package/src/serverGroup/details/scalingPolicy/popover/StepPolicyPopoverContent.tsx +90 -0
- package/src/serverGroup/details/scalingPolicy/scalingPolicy.module.ts +6 -0
- package/src/serverGroup/details/scalingPolicy/scalingPolicySummary.component.ts +14 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetMetricFields.less +10 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetMetricFields.tsx +212 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingAdditionalSettings.less +11 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingAdditionalSettings.tsx +122 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingChart.tsx +85 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingSummary.less +11 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingSummary.tsx +117 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/UpsertTargetTrackingModal.tsx +77 -0
- package/src/serverGroup/details/scalingPolicy/upsert/PolicyTypeSelectionModal.tsx +77 -0
- package/src/serverGroup/details/scalingPolicy/upsert/ScalingPolicyAdditionalSettings.less +11 -0
- package/src/serverGroup/details/scalingPolicy/upsert/ScalingPolicyAdditionalSettings.tsx +105 -0
- package/src/serverGroup/details/scalingPolicy/upsert/ScalingPolicyCommandBuilderService.ts +133 -0
- package/src/serverGroup/details/scalingPolicy/upsert/UpsertScalingPolicyModal.tsx +213 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/AlarmConfigurer.less +19 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/AlarmConfigurer.tsx +176 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.tsx +89 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/MetricSelector.less +15 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/MetricSelector.tsx +170 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/dimensionsEditor.less +18 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/namespaces.ts +31 -0
- package/src/serverGroup/details/scalingPolicy/upsert/index.ts +7 -0
- package/src/serverGroup/details/scalingPolicy/upsert/simple/SimplePolicyAction.less +9 -0
- package/src/serverGroup/details/scalingPolicy/upsert/simple/SimplePolicyAction.tsx +70 -0
- package/src/serverGroup/details/scalingPolicy/upsert/step/StepPolicyAction.less +18 -0
- package/src/serverGroup/details/scalingPolicy/upsert/step/StepPolicyAction.tsx +163 -0
- package/src/serverGroup/details/scalingProcesses/AutoScalingProcessService.spec.ts +94 -0
- package/src/serverGroup/details/scalingProcesses/AutoScalingProcessService.ts +76 -0
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.js +95 -0
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.spec.js +106 -0
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.html +30 -0
- package/src/serverGroup/details/scheduledAction/ScheduledAction.tsx +25 -0
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.js +70 -0
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.html +89 -0
- package/src/serverGroup/details/sections/AdvancedSettingsDetailsSection.tsx +61 -0
- package/src/serverGroup/details/sections/AmazonCapacityDetailsSection.tsx +39 -0
- package/src/serverGroup/details/sections/AmazonInfoDetailsSection.tsx +89 -0
- package/src/serverGroup/details/sections/HealthDetailsSection.tsx +25 -0
- package/src/serverGroup/details/sections/IAmazonServerGroupDetailsSectionProps.ts +6 -0
- package/src/serverGroup/details/sections/InstancesDistributionDetailsSection.spec.tsx +88 -0
- package/src/serverGroup/details/sections/InstancesDistributionDetailsSection.tsx +50 -0
- package/src/serverGroup/details/sections/LaunchConfigDetailsSection.tsx +93 -0
- package/src/serverGroup/details/sections/LaunchTemplateDetailsSection.spec.tsx +255 -0
- package/src/serverGroup/details/sections/LaunchTemplateDetailsSection.tsx +61 -0
- package/src/serverGroup/details/sections/LogsDetailsSection.tsx +19 -0
- package/src/serverGroup/details/sections/MultipleInstanceTypesSubSection.tsx +44 -0
- package/src/serverGroup/details/sections/PackageDetailsSection.tsx +78 -0
- package/src/serverGroup/details/sections/ScalingPoliciesDetailsSection.tsx +65 -0
- package/src/serverGroup/details/sections/ScalingProcessesDetailsSection.tsx +113 -0
- package/src/serverGroup/details/sections/ScheduledActionsDetailsSection.tsx +92 -0
- package/src/serverGroup/details/sections/SecurityGroupsDetailsSection.tsx +119 -0
- package/src/serverGroup/details/sections/TagsDetailsSection.tsx +26 -0
- package/src/serverGroup/details/sections/index.ts +15 -0
- package/src/serverGroup/details/sections/multipleInstanceTypesSubSection.less +50 -0
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.js +95 -0
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.html +40 -0
- package/src/serverGroup/details/serverGroupDetails.module.ts +18 -0
- package/src/serverGroup/details/utils.spec.ts +23 -0
- package/src/serverGroup/details/utils.ts +13 -0
- package/src/serverGroup/index.ts +5 -0
- package/src/serverGroup/serverGroup.transformer.spec.ts +185 -0
- package/src/serverGroup/serverGroup.transformer.ts +160 -0
- package/src/subnet/SubnetSelectField.tsx +84 -0
- package/src/subnet/SubnetSelectInput.spec.tsx +91 -0
- package/src/subnet/SubnetSelectInput.tsx +111 -0
- package/src/subnet/index.ts +2 -0
- package/src/subnet/subnet.renderer.ts +12 -0
- package/src/validation/ApplicationNameValidator.ts +84 -0
- package/src/vpc/VpcReader.spec.ts +45 -0
- package/src/vpc/VpcReader.ts +36 -0
- package/src/vpc/VpcTag.spec.tsx +37 -0
- package/src/vpc/VpcTag.tsx +24 -0
- package/src/vpc/index.ts +1 -0
- package/src/vpc/vpc.module.ts +9 -0
|
@@ -0,0 +1,747 @@
|
|
|
1
|
+
import { module } from 'angular';
|
|
2
|
+
import {
|
|
3
|
+
chain,
|
|
4
|
+
clone,
|
|
5
|
+
cloneDeep,
|
|
6
|
+
difference,
|
|
7
|
+
extend,
|
|
8
|
+
find,
|
|
9
|
+
flatten,
|
|
10
|
+
has,
|
|
11
|
+
intersection,
|
|
12
|
+
keys,
|
|
13
|
+
map,
|
|
14
|
+
partition,
|
|
15
|
+
some,
|
|
16
|
+
xor,
|
|
17
|
+
} from 'lodash';
|
|
18
|
+
import { $q } from 'ngimport';
|
|
19
|
+
|
|
20
|
+
import type {
|
|
21
|
+
Application,
|
|
22
|
+
CacheInitializerService,
|
|
23
|
+
IAccountDetails,
|
|
24
|
+
IDeploymentStrategy,
|
|
25
|
+
IRegion,
|
|
26
|
+
ISecurityGroup,
|
|
27
|
+
IServerGroupCommand,
|
|
28
|
+
IServerGroupCommandBackingData,
|
|
29
|
+
IServerGroupCommandBackingDataFiltered,
|
|
30
|
+
IServerGroupCommandDirty,
|
|
31
|
+
IServerGroupCommandResult,
|
|
32
|
+
IServerGroupCommandViewState,
|
|
33
|
+
ISubnet,
|
|
34
|
+
LoadBalancerReader,
|
|
35
|
+
SecurityGroupReader,
|
|
36
|
+
ServerGroupCommandRegistry,
|
|
37
|
+
} from '@spinnaker/core';
|
|
38
|
+
import {
|
|
39
|
+
AccountService,
|
|
40
|
+
CACHE_INITIALIZER_SERVICE,
|
|
41
|
+
LOAD_BALANCER_READ_SERVICE,
|
|
42
|
+
NameUtils,
|
|
43
|
+
SECURITY_GROUP_READER,
|
|
44
|
+
SERVER_GROUP_COMMAND_REGISTRY_PROVIDER,
|
|
45
|
+
setMatchingResourceSummary,
|
|
46
|
+
SubnetReader,
|
|
47
|
+
} from '@spinnaker/core';
|
|
48
|
+
|
|
49
|
+
import { AWSProviderSettings } from '../../aws.settings';
|
|
50
|
+
import { AutoScalingProcessService } from '../details/scalingProcesses/AutoScalingProcessService';
|
|
51
|
+
import type {
|
|
52
|
+
IAmazonLoadBalancerSourceData,
|
|
53
|
+
IApplicationLoadBalancerSourceData,
|
|
54
|
+
IKeyPair,
|
|
55
|
+
IScalingProcess,
|
|
56
|
+
} from '../../domain';
|
|
57
|
+
import { AMAZON_INSTANCE_AWSINSTANCETYPE_SERVICE } from '../../instance/awsInstanceType.service';
|
|
58
|
+
import type { IAmazonInstanceType } from '../../instance/awsInstanceType.service';
|
|
59
|
+
import { KeyPairsReader } from '../../keyPairs';
|
|
60
|
+
|
|
61
|
+
export type IBlockDeviceMappingSource = 'source' | 'ami' | 'default';
|
|
62
|
+
|
|
63
|
+
export interface IAmazonServerGroupCommandDirty extends IServerGroupCommandDirty {
|
|
64
|
+
targetGroups?: string[];
|
|
65
|
+
launchTemplateOverridesForInstanceType?: IAmazonInstanceTypeOverride[];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface IAmazonServerGroupCommandResult extends IServerGroupCommandResult {
|
|
69
|
+
dirty: IAmazonServerGroupCommandDirty;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface IAmazonServerGroupCommandBackingDataFiltered extends IServerGroupCommandBackingDataFiltered {
|
|
73
|
+
keyPairs: string[];
|
|
74
|
+
targetGroups: string[];
|
|
75
|
+
instanceTypesInfo: IAmazonInstanceType[];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface IAmazonServerGroupCommandBackingData extends IServerGroupCommandBackingData {
|
|
79
|
+
appLoadBalancers: IAmazonLoadBalancerSourceData[];
|
|
80
|
+
filtered: IAmazonServerGroupCommandBackingDataFiltered;
|
|
81
|
+
keyPairs: IKeyPair[];
|
|
82
|
+
targetGroups: string[];
|
|
83
|
+
scalingProcesses: IScalingProcess[];
|
|
84
|
+
instanceTypesInfo: IAmazonInstanceType[];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface IAmazonServerGroupCommandViewState extends IServerGroupCommandViewState {
|
|
88
|
+
isNew: boolean;
|
|
89
|
+
dirty: IAmazonServerGroupCommandDirty;
|
|
90
|
+
spelTargetGroups: string[];
|
|
91
|
+
spelLoadBalancers: string[];
|
|
92
|
+
useSimpleInstanceTypeSelector: boolean;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface IAmazonInstanceTypeOverride {
|
|
96
|
+
instanceType: string;
|
|
97
|
+
weightedCapacity?: string;
|
|
98
|
+
priority?: number;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* We model server group commands in two subtly different ways.
|
|
103
|
+
* It's unclear what the intention is, but we should converge on a single model eventually.
|
|
104
|
+
*
|
|
105
|
+
* This model is stored in a Aws Deploy Stage under `clusters[]`.
|
|
106
|
+
* It is also sent across the wire during a deploy task from infrastructure view
|
|
107
|
+
* (i.e., "clone server group", "create server group")
|
|
108
|
+
*/
|
|
109
|
+
export interface IAmazonServerGroupDeployConfiguration extends IAmazonServerGroupCommand_Internal {
|
|
110
|
+
account: string;
|
|
111
|
+
availabilityZones: {
|
|
112
|
+
[region: string]: string[];
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
interface IAmazonServerGroupCommand_Internal extends IAmazonServerGroupCommand {
|
|
117
|
+
// widen 'string[]' to 'any' so we can narrow it to an incompatible type in IAmazonServerGroupDeployConfiguration
|
|
118
|
+
availabilityZones: any;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface IAmazonServerGroupCommand extends IServerGroupCommand {
|
|
122
|
+
associateIPv6Address?: boolean;
|
|
123
|
+
associatePublicIpAddress: boolean;
|
|
124
|
+
backingData: IAmazonServerGroupCommandBackingData;
|
|
125
|
+
base64UserData: string;
|
|
126
|
+
copySourceCustomBlockDeviceMappings: boolean;
|
|
127
|
+
ebsOptimized: boolean;
|
|
128
|
+
healthCheckGracePeriod: number;
|
|
129
|
+
instanceMonitoring: boolean;
|
|
130
|
+
keyPair: string;
|
|
131
|
+
legacyUdf?: boolean;
|
|
132
|
+
requireIMDSv2?: boolean;
|
|
133
|
+
spotPrice: string;
|
|
134
|
+
targetHealthyDeployPercentage: number;
|
|
135
|
+
useAmiBlockDeviceMappings: boolean;
|
|
136
|
+
targetGroups: string[];
|
|
137
|
+
setLaunchTemplate?: boolean;
|
|
138
|
+
unlimitedCpuCredits?: boolean;
|
|
139
|
+
capacityRebalance?: boolean;
|
|
140
|
+
ramdiskId?: string;
|
|
141
|
+
viewState: IAmazonServerGroupCommandViewState;
|
|
142
|
+
source: {
|
|
143
|
+
account: string;
|
|
144
|
+
region: string;
|
|
145
|
+
asgName: string;
|
|
146
|
+
};
|
|
147
|
+
onDemandAllocationStrategy?: string;
|
|
148
|
+
onDemandBaseCapacity?: number;
|
|
149
|
+
onDemandPercentageAboveBaseCapacity?: number;
|
|
150
|
+
spotAllocationStrategy?: string;
|
|
151
|
+
spotInstancePools?: number;
|
|
152
|
+
launchTemplateOverridesForInstanceType?: IAmazonInstanceTypeOverride[];
|
|
153
|
+
amiArchitecture: string;
|
|
154
|
+
|
|
155
|
+
getBlockDeviceMappingsSource: (command: IServerGroupCommand) => IBlockDeviceMappingSource;
|
|
156
|
+
selectBlockDeviceMappingsSource: (command: IServerGroupCommand, selection: string) => void;
|
|
157
|
+
usePreferredZonesChanged: (command: IServerGroupCommand) => IAmazonServerGroupCommandResult;
|
|
158
|
+
regionIsDeprecated: (command: IServerGroupCommand) => boolean;
|
|
159
|
+
launchTemplateOverridesChanged: (command: IServerGroupCommand) => void;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export class AwsServerGroupConfigurationService {
|
|
163
|
+
private enabledMetrics = [
|
|
164
|
+
'GroupMinSize',
|
|
165
|
+
'GroupMaxSize',
|
|
166
|
+
'GroupDesiredCapacity',
|
|
167
|
+
'GroupInServiceInstances',
|
|
168
|
+
'GroupPendingInstances',
|
|
169
|
+
'GroupStandbyInstances',
|
|
170
|
+
'GroupTerminatingInstances',
|
|
171
|
+
'GroupTotalInstances',
|
|
172
|
+
];
|
|
173
|
+
private healthCheckTypes = ['EC2', 'ELB'];
|
|
174
|
+
private terminationPolicies = [
|
|
175
|
+
'OldestInstance',
|
|
176
|
+
'NewestInstance',
|
|
177
|
+
'OldestLaunchConfiguration',
|
|
178
|
+
'ClosestToNextInstanceHour',
|
|
179
|
+
'Default',
|
|
180
|
+
];
|
|
181
|
+
|
|
182
|
+
public static $inject = [
|
|
183
|
+
'securityGroupReader',
|
|
184
|
+
'awsInstanceTypeService',
|
|
185
|
+
'cacheInitializer',
|
|
186
|
+
'loadBalancerReader',
|
|
187
|
+
'serverGroupCommandRegistry',
|
|
188
|
+
];
|
|
189
|
+
constructor(
|
|
190
|
+
private securityGroupReader: SecurityGroupReader,
|
|
191
|
+
private awsInstanceTypeService: any,
|
|
192
|
+
private cacheInitializer: CacheInitializerService,
|
|
193
|
+
private loadBalancerReader: LoadBalancerReader,
|
|
194
|
+
private serverGroupCommandRegistry: ServerGroupCommandRegistry,
|
|
195
|
+
) {}
|
|
196
|
+
|
|
197
|
+
public configureUpdateCommand(command: IAmazonServerGroupCommand): void {
|
|
198
|
+
command.backingData = {
|
|
199
|
+
enabledMetrics: clone(this.enabledMetrics),
|
|
200
|
+
healthCheckTypes: clone(this.healthCheckTypes),
|
|
201
|
+
terminationPolicies: clone(this.terminationPolicies),
|
|
202
|
+
} as IAmazonServerGroupCommandBackingData;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
public configureCommand(application: Application, cmd: IAmazonServerGroupCommand): PromiseLike<void> {
|
|
206
|
+
this.applyOverrides('beforeConfiguration', cmd);
|
|
207
|
+
// TODO: Instead of attaching these to the command itself, they could be static methods
|
|
208
|
+
cmd.toggleSuspendedProcess = (command: IAmazonServerGroupCommand, process: string): void => {
|
|
209
|
+
command.suspendedProcesses = command.suspendedProcesses || [];
|
|
210
|
+
const processIndex = command.suspendedProcesses.indexOf(process);
|
|
211
|
+
if (processIndex === -1) {
|
|
212
|
+
command.suspendedProcesses = command.suspendedProcesses.concat(process);
|
|
213
|
+
} else {
|
|
214
|
+
command.suspendedProcesses = command.suspendedProcesses.filter((p) => p !== process);
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
cmd.processIsSuspended = (command: IAmazonServerGroupCommand, process: string): boolean =>
|
|
219
|
+
command.suspendedProcesses.includes(process);
|
|
220
|
+
|
|
221
|
+
cmd.onStrategyChange = (command: IAmazonServerGroupCommand, strategy: IDeploymentStrategy): void => {
|
|
222
|
+
if (AWSProviderSettings.serverGroups?.enableLaunchTemplates) {
|
|
223
|
+
command.setLaunchTemplate = strategy.key === 'rollingpush' ? true : undefined;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Any strategy other than None or Custom should force traffic to be enabled
|
|
227
|
+
if (strategy.key !== '' && strategy.key !== 'custom') {
|
|
228
|
+
command.suspendedProcesses = (command.suspendedProcesses || []).filter((p) => p !== 'AddToLoadBalancer');
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
cmd.getBlockDeviceMappingsSource = (command: IAmazonServerGroupCommand): IBlockDeviceMappingSource => {
|
|
233
|
+
if (command.copySourceCustomBlockDeviceMappings) {
|
|
234
|
+
return 'source';
|
|
235
|
+
} else if (command.useAmiBlockDeviceMappings) {
|
|
236
|
+
return 'ami';
|
|
237
|
+
}
|
|
238
|
+
return 'default';
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
cmd.selectBlockDeviceMappingsSource = (command: IAmazonServerGroupCommand, selection: string): void => {
|
|
242
|
+
if (selection === 'source') {
|
|
243
|
+
// copy block device mappings from source asg
|
|
244
|
+
command.copySourceCustomBlockDeviceMappings = true;
|
|
245
|
+
command.useAmiBlockDeviceMappings = false;
|
|
246
|
+
} else if (selection === 'ami') {
|
|
247
|
+
// use block device mappings from selected ami
|
|
248
|
+
command.copySourceCustomBlockDeviceMappings = false;
|
|
249
|
+
command.useAmiBlockDeviceMappings = true;
|
|
250
|
+
} else {
|
|
251
|
+
// use default block device mappings for selected instance type
|
|
252
|
+
command.copySourceCustomBlockDeviceMappings = false;
|
|
253
|
+
command.useAmiBlockDeviceMappings = false;
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
cmd.regionIsDeprecated = (command: IAmazonServerGroupCommand): boolean => {
|
|
258
|
+
return (
|
|
259
|
+
has(command, 'backingData.filtered.regions') &&
|
|
260
|
+
command.backingData.filtered.regions.some((region) => region.name === command.region && region.deprecated)
|
|
261
|
+
);
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
return $q
|
|
265
|
+
.all([
|
|
266
|
+
AccountService.getCredentialsKeyedByAccount('aws'),
|
|
267
|
+
this.securityGroupReader.getAllSecurityGroups(),
|
|
268
|
+
SubnetReader.listSubnets(),
|
|
269
|
+
AccountService.getPreferredZonesByAccount('aws'),
|
|
270
|
+
KeyPairsReader.listKeyPairs(),
|
|
271
|
+
this.awsInstanceTypeService.getAllTypesByRegion(),
|
|
272
|
+
$q.when(clone(this.enabledMetrics)),
|
|
273
|
+
$q.when(clone(this.healthCheckTypes)),
|
|
274
|
+
$q.when(clone(this.terminationPolicies)),
|
|
275
|
+
])
|
|
276
|
+
.then(
|
|
277
|
+
([
|
|
278
|
+
credentialsKeyedByAccount,
|
|
279
|
+
securityGroups,
|
|
280
|
+
subnets,
|
|
281
|
+
preferredZones,
|
|
282
|
+
keyPairs,
|
|
283
|
+
instanceTypesInfo,
|
|
284
|
+
enabledMetrics,
|
|
285
|
+
healthCheckTypes,
|
|
286
|
+
terminationPolicies,
|
|
287
|
+
]) => {
|
|
288
|
+
const backingData: Partial<IAmazonServerGroupCommandBackingData> = {
|
|
289
|
+
credentialsKeyedByAccount,
|
|
290
|
+
securityGroups,
|
|
291
|
+
subnets,
|
|
292
|
+
preferredZones,
|
|
293
|
+
keyPairs,
|
|
294
|
+
instanceTypesInfo,
|
|
295
|
+
enabledMetrics,
|
|
296
|
+
healthCheckTypes,
|
|
297
|
+
terminationPolicies,
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
let securityGroupReloader: PromiseLike<void> = $q.when();
|
|
301
|
+
backingData.accounts = keys(backingData.credentialsKeyedByAccount);
|
|
302
|
+
backingData.filtered = {} as IAmazonServerGroupCommandBackingDataFiltered;
|
|
303
|
+
backingData.scalingProcesses = AutoScalingProcessService.listProcesses();
|
|
304
|
+
backingData.appLoadBalancers = application.getDataSource('loadBalancers').data;
|
|
305
|
+
backingData.managedResources = application.getDataSource('managedResources')?.data?.resources;
|
|
306
|
+
cmd.backingData = backingData as IAmazonServerGroupCommandBackingData;
|
|
307
|
+
this.configureVpcId(cmd);
|
|
308
|
+
backingData.filtered.securityGroups = this.getRegionalSecurityGroups(cmd);
|
|
309
|
+
if (cmd.viewState.disableImageSelection) {
|
|
310
|
+
this.configureInstanceTypes(cmd);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
if (cmd.securityGroups && cmd.securityGroups.length) {
|
|
314
|
+
const regionalSecurityGroupIds = map(this.getRegionalSecurityGroups(cmd), 'id');
|
|
315
|
+
if (intersection(cmd.securityGroups, regionalSecurityGroupIds).length < cmd.securityGroups.length) {
|
|
316
|
+
securityGroupReloader = this.refreshSecurityGroups(cmd, true);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
return securityGroupReloader.then(() => {
|
|
321
|
+
this.applyOverrides('afterConfiguration', cmd);
|
|
322
|
+
this.attachEventHandlers(cmd);
|
|
323
|
+
});
|
|
324
|
+
},
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
public applyOverrides(phase: string, command: IAmazonServerGroupCommand): void {
|
|
329
|
+
this.serverGroupCommandRegistry.getCommandOverrides('aws').forEach((override: any) => {
|
|
330
|
+
if (override[phase]) {
|
|
331
|
+
override[phase](command);
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
public configureKeyPairs(command: IAmazonServerGroupCommand): IServerGroupCommandResult {
|
|
337
|
+
const result: IAmazonServerGroupCommandResult = { dirty: {} };
|
|
338
|
+
if (command.credentials && command.region) {
|
|
339
|
+
// isDefault is imperfect, since we don't know what the previous account/region was, but probably a safe bet
|
|
340
|
+
const isDefault = some<any>(
|
|
341
|
+
command.backingData.credentialsKeyedByAccount,
|
|
342
|
+
(c) =>
|
|
343
|
+
c.defaultKeyPair &&
|
|
344
|
+
command.keyPair &&
|
|
345
|
+
command.keyPair.indexOf(c.defaultKeyPair.replace('{{region}}', '')) === 0,
|
|
346
|
+
);
|
|
347
|
+
const filtered = chain(command.backingData.keyPairs)
|
|
348
|
+
.filter({ account: command.credentials, region: command.region })
|
|
349
|
+
.map('keyName')
|
|
350
|
+
.value();
|
|
351
|
+
if (command.keyPair && filtered.length && !filtered.includes(command.keyPair)) {
|
|
352
|
+
const acct: IAccountDetails =
|
|
353
|
+
command.backingData.credentialsKeyedByAccount[command.credentials] ||
|
|
354
|
+
({
|
|
355
|
+
regions: [],
|
|
356
|
+
defaultKeyPair: null,
|
|
357
|
+
} as IAccountDetails);
|
|
358
|
+
if (acct.defaultKeyPair) {
|
|
359
|
+
// {{region}} is the only supported substitution pattern
|
|
360
|
+
const defaultKeyPair = acct.defaultKeyPair.replace('{{region}}', command.region);
|
|
361
|
+
if (isDefault && filtered.includes(defaultKeyPair)) {
|
|
362
|
+
command.keyPair = defaultKeyPair;
|
|
363
|
+
} else {
|
|
364
|
+
command.keyPair = null;
|
|
365
|
+
result.dirty.keyPair = true;
|
|
366
|
+
}
|
|
367
|
+
} else {
|
|
368
|
+
command.keyPair = null;
|
|
369
|
+
result.dirty.keyPair = true;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
command.backingData.filtered.keyPairs = filtered;
|
|
373
|
+
} else {
|
|
374
|
+
command.backingData.filtered.keyPairs = [];
|
|
375
|
+
}
|
|
376
|
+
return result;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
public configureInstanceTypes(command: IAmazonServerGroupCommand): IServerGroupCommandResult {
|
|
380
|
+
const result: IAmazonServerGroupCommandResult = { dirty: {} };
|
|
381
|
+
|
|
382
|
+
if (command.region && (command.virtualizationType || command.viewState.disableImageSelection)) {
|
|
383
|
+
let filteredTypesInfo: IAmazonInstanceType[] = this.awsInstanceTypeService.getAvailableTypesForRegions(
|
|
384
|
+
command.backingData.instanceTypesInfo,
|
|
385
|
+
[command.region],
|
|
386
|
+
);
|
|
387
|
+
|
|
388
|
+
if (command.virtualizationType || command.amiArchitecture) {
|
|
389
|
+
filteredTypesInfo = this.awsInstanceTypeService.filterInstanceTypes(
|
|
390
|
+
filteredTypesInfo,
|
|
391
|
+
command.virtualizationType,
|
|
392
|
+
!!command.vpcId,
|
|
393
|
+
command.amiArchitecture,
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
const filteredTypes: string[] = map(filteredTypesInfo, 'name');
|
|
397
|
+
|
|
398
|
+
// handle incompatibility for single instance type case
|
|
399
|
+
if (command.instanceType && !filteredTypes.includes(command.instanceType)) {
|
|
400
|
+
result.dirty.instanceType = command.instanceType;
|
|
401
|
+
command.instanceType = null;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// handle incompatibility for multiple instance types case
|
|
405
|
+
const multipleInstanceTypes: string[] = map(command.launchTemplateOverridesForInstanceType, 'instanceType');
|
|
406
|
+
const validInstanceTypes: string[] = intersection(multipleInstanceTypes, filteredTypes);
|
|
407
|
+
const invalidInstanceTypes: string[] = difference(multipleInstanceTypes, validInstanceTypes);
|
|
408
|
+
|
|
409
|
+
if (command.launchTemplateOverridesForInstanceType && invalidInstanceTypes.length > 0) {
|
|
410
|
+
result.dirty.launchTemplateOverridesForInstanceType = command.launchTemplateOverridesForInstanceType.filter(
|
|
411
|
+
(it) => invalidInstanceTypes.includes(it.instanceType),
|
|
412
|
+
);
|
|
413
|
+
command.launchTemplateOverridesForInstanceType = command.launchTemplateOverridesForInstanceType.filter((it) =>
|
|
414
|
+
validInstanceTypes.includes(it.instanceType),
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
command.backingData.filtered.instanceTypes = filteredTypes;
|
|
419
|
+
command.backingData.filtered.instanceTypesInfo = filteredTypesInfo;
|
|
420
|
+
} else {
|
|
421
|
+
command.backingData.filtered.instanceTypes = [];
|
|
422
|
+
command.backingData.filtered.instanceTypesInfo = [];
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
extend(command.viewState.dirty, result.dirty);
|
|
426
|
+
return result;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
public configureImages(command: IAmazonServerGroupCommand): IServerGroupCommandResult {
|
|
430
|
+
const result: IAmazonServerGroupCommandResult = { dirty: {} };
|
|
431
|
+
if (!command.amiName) {
|
|
432
|
+
command.virtualizationType = null;
|
|
433
|
+
command.amiArchitecture = null;
|
|
434
|
+
}
|
|
435
|
+
if (command.viewState.disableImageSelection) {
|
|
436
|
+
return result;
|
|
437
|
+
}
|
|
438
|
+
if (command.amiName && !command.region) {
|
|
439
|
+
result.dirty.amiName = true;
|
|
440
|
+
command.amiName = null;
|
|
441
|
+
}
|
|
442
|
+
return result;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
public configureAvailabilityZones(command: IAmazonServerGroupCommand): void {
|
|
446
|
+
command.backingData.filtered.availabilityZones = find<IRegion>(
|
|
447
|
+
command.backingData.credentialsKeyedByAccount[command.credentials].regions,
|
|
448
|
+
{ name: command.region },
|
|
449
|
+
).availabilityZones;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
public configureSubnetPurposes(command: IAmazonServerGroupCommand): IServerGroupCommandResult {
|
|
453
|
+
const result: IAmazonServerGroupCommandResult = { dirty: {} };
|
|
454
|
+
const filteredData = command.backingData.filtered;
|
|
455
|
+
if (command.region === null) {
|
|
456
|
+
return result;
|
|
457
|
+
}
|
|
458
|
+
filteredData.subnetPurposes = chain(command.backingData.subnets)
|
|
459
|
+
.filter({ account: command.credentials, region: command.region })
|
|
460
|
+
.reject({ target: 'elb' })
|
|
461
|
+
.reject({ purpose: null })
|
|
462
|
+
.uniqBy('purpose')
|
|
463
|
+
.value();
|
|
464
|
+
|
|
465
|
+
if (!chain(filteredData.subnetPurposes).some({ purpose: command.subnetType }).value()) {
|
|
466
|
+
command.subnetType = null;
|
|
467
|
+
result.dirty.subnetType = true;
|
|
468
|
+
}
|
|
469
|
+
return result;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
public getRegionalSecurityGroups(command: IAmazonServerGroupCommand): ISecurityGroup[] {
|
|
473
|
+
const newSecurityGroups = command.backingData.securityGroups[command.credentials] || { aws: {} };
|
|
474
|
+
return chain(newSecurityGroups.aws[command.region])
|
|
475
|
+
.filter({ vpcId: command.vpcId || null })
|
|
476
|
+
.sortBy('name')
|
|
477
|
+
.value();
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
public configureSecurityGroupOptions(command: IAmazonServerGroupCommand): IServerGroupCommandResult {
|
|
481
|
+
const result: IAmazonServerGroupCommandResult = { dirty: {} };
|
|
482
|
+
const currentOptions: ISecurityGroup[] = command.backingData.filtered.securityGroups;
|
|
483
|
+
const newRegionalSecurityGroups = this.getRegionalSecurityGroups(command);
|
|
484
|
+
const isExpression =
|
|
485
|
+
typeof command.securityGroups === 'string' && (command.securityGroups as string).includes('${');
|
|
486
|
+
if (currentOptions && command.securityGroups && !isExpression) {
|
|
487
|
+
// not initializing - we are actually changing groups
|
|
488
|
+
const currentGroupNames = command.securityGroups.map((groupId) => {
|
|
489
|
+
const match = find(currentOptions, { id: groupId });
|
|
490
|
+
return match ? match.name : groupId;
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
const matchedGroups = command.securityGroups
|
|
494
|
+
.map((groupId) => {
|
|
495
|
+
const securityGroup = find(currentOptions, { id: groupId }) || find(currentOptions, { name: groupId });
|
|
496
|
+
return securityGroup ? securityGroup.name : null;
|
|
497
|
+
})
|
|
498
|
+
.map((groupName) => find(newRegionalSecurityGroups, { name: groupName }))
|
|
499
|
+
.filter((group) => group);
|
|
500
|
+
|
|
501
|
+
const matchedGroupNames = map(matchedGroups, 'name');
|
|
502
|
+
const removed = xor(currentGroupNames, matchedGroupNames);
|
|
503
|
+
command.securityGroups = map(matchedGroups, 'id');
|
|
504
|
+
if (removed.length) {
|
|
505
|
+
result.dirty.securityGroups = removed;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
command.backingData.filtered.securityGroups = newRegionalSecurityGroups.sort((a, b) => {
|
|
509
|
+
return a.name.localeCompare(b.name);
|
|
510
|
+
});
|
|
511
|
+
return result;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
public refreshSecurityGroups(
|
|
515
|
+
command: IAmazonServerGroupCommand,
|
|
516
|
+
skipCommandReconfiguration?: boolean,
|
|
517
|
+
): PromiseLike<void> {
|
|
518
|
+
return this.cacheInitializer.refreshCache('securityGroups').then(() => {
|
|
519
|
+
return this.securityGroupReader.getAllSecurityGroups().then((securityGroups) => {
|
|
520
|
+
command.backingData.securityGroups = securityGroups;
|
|
521
|
+
if (!skipCommandReconfiguration) {
|
|
522
|
+
this.configureSecurityGroupOptions(command);
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
private getLoadBalancerMap(command: IAmazonServerGroupCommand): IAmazonLoadBalancerSourceData[] {
|
|
529
|
+
if (command.backingData.loadBalancers) {
|
|
530
|
+
return chain(command.backingData.loadBalancers)
|
|
531
|
+
.map('accounts')
|
|
532
|
+
.flattenDeep()
|
|
533
|
+
.filter({ name: command.credentials })
|
|
534
|
+
.map('regions')
|
|
535
|
+
.flattenDeep()
|
|
536
|
+
.filter({ name: command.region })
|
|
537
|
+
.map<IAmazonLoadBalancerSourceData>('loadBalancers')
|
|
538
|
+
.flattenDeep<IAmazonLoadBalancerSourceData>()
|
|
539
|
+
.value();
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
const appLoadBalancers = command.backingData.appLoadBalancers || [];
|
|
543
|
+
return appLoadBalancers.filter((lb) => lb.region === command.region && lb.account === command.credentials);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
public getLoadBalancerNames(command: IAmazonServerGroupCommand): string[] {
|
|
547
|
+
const loadBalancers = this.getLoadBalancerMap(command).filter(
|
|
548
|
+
(lb) => (!lb.loadBalancerType || lb.loadBalancerType === 'classic') && lb.vpcId === command.vpcId,
|
|
549
|
+
);
|
|
550
|
+
return loadBalancers.map((lb) => lb.name).sort();
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
public getVpcLoadBalancerNames(command: IAmazonServerGroupCommand): string[] {
|
|
554
|
+
const loadBalancersForVpc = this.getLoadBalancerMap(command).filter(
|
|
555
|
+
(lb) => (!lb.loadBalancerType || lb.loadBalancerType === 'classic') && lb.vpcId,
|
|
556
|
+
);
|
|
557
|
+
return loadBalancersForVpc.map((lb) => lb.name).sort();
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
public getTargetGroupNames(command: IAmazonServerGroupCommand): string[] {
|
|
561
|
+
const loadBalancersV2 = this.getLoadBalancerMap(command).filter(
|
|
562
|
+
(lb) => lb.loadBalancerType !== 'classic',
|
|
563
|
+
) as IApplicationLoadBalancerSourceData[];
|
|
564
|
+
const instanceTargetGroups = flatten(
|
|
565
|
+
loadBalancersV2.map<any>((lb) => lb.targetGroups.filter((tg) => tg.targetType === 'instance')),
|
|
566
|
+
);
|
|
567
|
+
return instanceTargetGroups.map((tg) => tg.name).sort();
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
private getValidMatches(all: string[], current: string[]): { valid: string[]; invalid: string[]; spel: string[] } {
|
|
571
|
+
const spel = current.filter((v) => v.includes('${'));
|
|
572
|
+
const matched = intersection(all, current);
|
|
573
|
+
const [valid, invalid] = partition(current, (c) => matched.includes(c) || spel.includes(c));
|
|
574
|
+
return { valid, invalid, spel };
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
public configureLoadBalancerOptions(command: IAmazonServerGroupCommand): IServerGroupCommandResult {
|
|
578
|
+
const result: IAmazonServerGroupCommandResult = { dirty: {} };
|
|
579
|
+
const currentLoadBalancers = (command.loadBalancers || []).concat(command.vpcLoadBalancers || []);
|
|
580
|
+
const currentTargetGroups = command.targetGroups || [];
|
|
581
|
+
const newLoadBalancers = this.getLoadBalancerNames(command);
|
|
582
|
+
const vpcLoadBalancers = this.getVpcLoadBalancerNames(command);
|
|
583
|
+
const allTargetGroups = this.getTargetGroupNames(command);
|
|
584
|
+
|
|
585
|
+
if (currentLoadBalancers && command.loadBalancers) {
|
|
586
|
+
const allValidLoadBalancers = command.vpcId ? newLoadBalancers : newLoadBalancers.concat(vpcLoadBalancers);
|
|
587
|
+
const { valid, invalid, spel } = this.getValidMatches(allValidLoadBalancers, currentLoadBalancers);
|
|
588
|
+
command.loadBalancers = intersection(newLoadBalancers.concat(spel), valid);
|
|
589
|
+
if (!command.vpcId) {
|
|
590
|
+
command.vpcLoadBalancers = intersection(vpcLoadBalancers, valid);
|
|
591
|
+
} else {
|
|
592
|
+
delete command.vpcLoadBalancers;
|
|
593
|
+
}
|
|
594
|
+
if (invalid.length) {
|
|
595
|
+
result.dirty.loadBalancers = invalid;
|
|
596
|
+
}
|
|
597
|
+
command.viewState.spelLoadBalancers = spel || [];
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
if (currentTargetGroups && command.targetGroups && !currentTargetGroups.includes('${')) {
|
|
601
|
+
const { valid, invalid, spel } = this.getValidMatches(allTargetGroups, currentTargetGroups);
|
|
602
|
+
command.targetGroups = valid;
|
|
603
|
+
if (invalid.length) {
|
|
604
|
+
result.dirty.targetGroups = invalid;
|
|
605
|
+
}
|
|
606
|
+
command.viewState.spelTargetGroups = spel || [];
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
command.backingData.filtered.loadBalancers = newLoadBalancers;
|
|
610
|
+
command.backingData.filtered.vpcLoadBalancers = vpcLoadBalancers;
|
|
611
|
+
command.backingData.filtered.targetGroups = allTargetGroups;
|
|
612
|
+
return result;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
public refreshLoadBalancers(command: IAmazonServerGroupCommand, skipCommandReconfiguration?: boolean) {
|
|
616
|
+
return this.loadBalancerReader.listLoadBalancers('aws').then((loadBalancers) => {
|
|
617
|
+
command.backingData.loadBalancers = loadBalancers;
|
|
618
|
+
if (!skipCommandReconfiguration) {
|
|
619
|
+
this.configureLoadBalancerOptions(command);
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
public configureVpcId(command: IAmazonServerGroupCommand): IAmazonServerGroupCommandResult {
|
|
625
|
+
const result: IAmazonServerGroupCommandResult = { dirty: {} };
|
|
626
|
+
if (!command.subnetType) {
|
|
627
|
+
command.vpcId = null;
|
|
628
|
+
result.dirty.vpcId = true;
|
|
629
|
+
} else {
|
|
630
|
+
const subnet = find<ISubnet>(command.backingData.subnets, {
|
|
631
|
+
purpose: command.subnetType,
|
|
632
|
+
account: command.credentials,
|
|
633
|
+
region: command.region,
|
|
634
|
+
});
|
|
635
|
+
command.vpcId = subnet ? subnet.vpcId : null;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
extend(result.dirty, this.configureInstanceTypes(command).dirty);
|
|
639
|
+
return result;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
// TODO: Instead of attaching these to the command itself, they could be static methods
|
|
643
|
+
public attachEventHandlers(cmd: IAmazonServerGroupCommand): void {
|
|
644
|
+
cmd.usePreferredZonesChanged = (command: IAmazonServerGroupCommand): IAmazonServerGroupCommandResult => {
|
|
645
|
+
const currentZoneCount = command.availabilityZones ? command.availabilityZones.length : 0;
|
|
646
|
+
const result: IAmazonServerGroupCommandResult = { dirty: {} };
|
|
647
|
+
const preferredZonesForAccount = command.backingData.preferredZones[command.credentials];
|
|
648
|
+
if (preferredZonesForAccount && preferredZonesForAccount[command.region] && command.viewState.usePreferredZones) {
|
|
649
|
+
command.availabilityZones = cloneDeep(preferredZonesForAccount[command.region].sort());
|
|
650
|
+
} else {
|
|
651
|
+
command.availabilityZones = intersection(
|
|
652
|
+
command.availabilityZones,
|
|
653
|
+
command.backingData.filtered.availabilityZones,
|
|
654
|
+
);
|
|
655
|
+
const newZoneCount = command.availabilityZones ? command.availabilityZones.length : 0;
|
|
656
|
+
if (currentZoneCount !== newZoneCount) {
|
|
657
|
+
result.dirty.availabilityZones = true;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
return result;
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
cmd.subnetChanged = (command: IAmazonServerGroupCommand): IServerGroupCommandResult => {
|
|
664
|
+
const result = this.configureVpcId(command);
|
|
665
|
+
extend(result.dirty, this.configureSecurityGroupOptions(command).dirty);
|
|
666
|
+
extend(result.dirty, this.configureLoadBalancerOptions(command).dirty);
|
|
667
|
+
command.viewState.dirty = command.viewState.dirty || {};
|
|
668
|
+
extend(command.viewState.dirty, result.dirty);
|
|
669
|
+
return result;
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
cmd.regionChanged = (command: IAmazonServerGroupCommand): IServerGroupCommandResult => {
|
|
673
|
+
const result: IAmazonServerGroupCommandResult = { dirty: {} };
|
|
674
|
+
const filteredData = command.backingData.filtered;
|
|
675
|
+
extend(result.dirty, this.configureSubnetPurposes(command).dirty);
|
|
676
|
+
if (command.region) {
|
|
677
|
+
extend(result.dirty, command.subnetChanged(command).dirty);
|
|
678
|
+
extend(result.dirty, this.configureInstanceTypes(command).dirty);
|
|
679
|
+
|
|
680
|
+
this.configureAvailabilityZones(command);
|
|
681
|
+
extend(result.dirty, command.usePreferredZonesChanged(command).dirty);
|
|
682
|
+
|
|
683
|
+
extend(result.dirty, this.configureImages(command).dirty);
|
|
684
|
+
extend(result.dirty, this.configureKeyPairs(command).dirty);
|
|
685
|
+
} else {
|
|
686
|
+
filteredData.regionalAvailabilityZones = null;
|
|
687
|
+
}
|
|
688
|
+
setMatchingResourceSummary(command);
|
|
689
|
+
return result;
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
cmd.clusterChanged = (command: IAmazonServerGroupCommand): void => {
|
|
693
|
+
command.moniker = NameUtils.getMoniker(command.application, command.stack, command.freeFormDetails);
|
|
694
|
+
setMatchingResourceSummary(command);
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
cmd.credentialsChanged = (command: IAmazonServerGroupCommand): IServerGroupCommandResult => {
|
|
698
|
+
const result: IAmazonServerGroupCommandResult = { dirty: {} };
|
|
699
|
+
const backingData = command.backingData;
|
|
700
|
+
if (command.credentials) {
|
|
701
|
+
const regionsForAccount: IAccountDetails =
|
|
702
|
+
backingData.credentialsKeyedByAccount[command.credentials] ||
|
|
703
|
+
({ regions: [], defaultKeyPair: null } as IAccountDetails);
|
|
704
|
+
backingData.filtered.regions = regionsForAccount.regions;
|
|
705
|
+
if (!some(backingData.filtered.regions, { name: command.region })) {
|
|
706
|
+
command.region = null;
|
|
707
|
+
result.dirty.region = true;
|
|
708
|
+
} else {
|
|
709
|
+
extend(result.dirty, command.regionChanged(command).dirty);
|
|
710
|
+
}
|
|
711
|
+
} else {
|
|
712
|
+
command.region = null;
|
|
713
|
+
}
|
|
714
|
+
setMatchingResourceSummary(command);
|
|
715
|
+
return result;
|
|
716
|
+
};
|
|
717
|
+
|
|
718
|
+
cmd.imageChanged = (command: IAmazonServerGroupCommand): IServerGroupCommandResult =>
|
|
719
|
+
this.configureInstanceTypes(command);
|
|
720
|
+
|
|
721
|
+
// Handles derived values for single instance type case
|
|
722
|
+
cmd.instanceTypeChanged = (command: IAmazonServerGroupCommand): void => {
|
|
723
|
+
command.ebsOptimized = this.awsInstanceTypeService.isEbsOptimized(command.instanceType);
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
// Handles derived values for multiple instance types case
|
|
727
|
+
cmd.launchTemplateOverridesChanged = (command: IAmazonServerGroupCommand): void => {
|
|
728
|
+
// set ebsOptimized to true if all instance types in overrides are included in the hard-coded array in awsInstanceTypeService.
|
|
729
|
+
// this function exists for backwards compatibility with single instance type case, matching behavior in `cmd.instanceTypeChanged`
|
|
730
|
+
// note: this parameter has no effect on instance types with EBS optimization enabled by default.
|
|
731
|
+
command.ebsOptimized = command.launchTemplateOverridesForInstanceType?.every((o) =>
|
|
732
|
+
this.awsInstanceTypeService.isEbsOptimized(o.instanceType),
|
|
733
|
+
);
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
this.applyOverrides('attachEventHandlers', cmd);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
export const AWS_SERVER_GROUP_CONFIGURATION_SERVICE = 'spinnaker.amazon.serverGroup.configure.service';
|
|
741
|
+
module(AWS_SERVER_GROUP_CONFIGURATION_SERVICE, [
|
|
742
|
+
SECURITY_GROUP_READER,
|
|
743
|
+
AMAZON_INSTANCE_AWSINSTANCETYPE_SERVICE,
|
|
744
|
+
LOAD_BALANCER_READ_SERVICE,
|
|
745
|
+
CACHE_INITIALIZER_SERVICE,
|
|
746
|
+
SERVER_GROUP_COMMAND_REGISTRY_PROVIDER,
|
|
747
|
+
]).service('awsServerGroupConfigurationService', AwsServerGroupConfigurationService);
|