@fjall/components-infrastructure 0.89.5 → 0.94.0
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/LICENSE +50 -21
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -18
- package/dist/lib/app.d.ts +12 -12
- package/dist/lib/app.js +61 -56
- package/dist/lib/aspects/index.d.ts +1 -1
- package/dist/lib/aspects/index.js +1 -6
- package/dist/lib/aspects/resourceInventory.js +6 -13
- package/dist/lib/config/audit.js +1 -5
- package/dist/lib/config/aws/accessAnalyser.d.ts +11 -0
- package/dist/lib/config/aws/accessAnalyser.js +17 -0
- package/dist/lib/config/aws/accountAuditRole.js +11 -15
- package/dist/lib/config/aws/accountMonitoringRole.js +25 -29
- package/dist/lib/config/aws/alarmTopic.d.ts +8 -0
- package/dist/lib/config/aws/alarmTopic.js +19 -0
- package/dist/lib/config/aws/cloudTrail.js +4 -9
- package/dist/lib/config/aws/configRecorder.d.ts +16 -0
- package/dist/lib/config/aws/configRecorder.js +51 -0
- package/dist/lib/config/aws/configRulePreset.d.ts +13 -0
- package/dist/lib/config/aws/configRulePreset.js +62 -0
- package/dist/lib/config/aws/disasterRecovery.d.ts +1 -1
- package/dist/lib/config/aws/disasterRecovery.js +56 -73
- package/dist/lib/config/aws/ebsDefaultEncryption.d.ts +8 -0
- package/dist/lib/config/aws/ebsDefaultEncryption.js +41 -0
- package/dist/lib/config/aws/ecrDefaultImage.js +25 -30
- package/dist/lib/config/aws/eventBus.js +8 -11
- package/dist/lib/config/aws/guardDutyDetector.d.ts +16 -0
- package/dist/lib/config/aws/guardDutyDetector.js +26 -0
- package/dist/lib/config/aws/identityCenter.d.ts +1 -1
- package/dist/lib/config/aws/identityCenter.js +23 -25
- package/dist/lib/config/aws/identityCenterGroupMembership.js +18 -22
- package/dist/lib/config/aws/index.d.ts +19 -8
- package/dist/lib/config/aws/index.js +19 -25
- package/dist/lib/config/aws/inspectorEnablement.d.ts +9 -0
- package/dist/lib/config/aws/inspectorEnablement.js +51 -0
- package/dist/lib/config/aws/ipam.js +9 -13
- package/dist/lib/config/aws/oidcConnector.js +8 -12
- package/dist/lib/config/aws/platform.js +1 -5
- package/dist/lib/config/aws/s3BlockPublicAccess.d.ts +9 -0
- package/dist/lib/config/aws/s3BlockPublicAccess.js +55 -0
- package/dist/lib/config/aws/scpPreset.d.ts +21 -0
- package/dist/lib/config/aws/scpPreset.js +311 -0
- package/dist/lib/config/aws/securityBaseline.d.ts +15 -0
- package/dist/lib/config/aws/securityBaseline.js +27 -0
- package/dist/lib/config/aws/securityHubHub.d.ts +15 -0
- package/dist/lib/config/aws/securityHubHub.js +28 -0
- package/dist/lib/config/aws/securityServicesAdmin.d.ts +20 -0
- package/dist/lib/config/aws/securityServicesAdmin.js +115 -0
- package/dist/lib/config/index.d.ts +2 -2
- package/dist/lib/config/index.js +2 -21
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +5 -26
- package/dist/lib/patterns/aws/account.d.ts +17 -1
- package/dist/lib/patterns/aws/account.js +60 -33
- package/dist/lib/patterns/aws/apexDomainPattern.d.ts +26 -0
- package/dist/lib/patterns/aws/apexDomainPattern.js +91 -0
- package/dist/lib/patterns/aws/auditRole.js +13 -16
- package/dist/lib/patterns/aws/buildkite.d.ts +1 -1
- package/dist/lib/patterns/aws/buildkite.js +70 -75
- package/dist/lib/patterns/aws/cdn.d.ts +5 -5
- package/dist/lib/patterns/aws/cdn.js +22 -28
- package/dist/lib/patterns/aws/compute.d.ts +1 -1
- package/dist/lib/patterns/aws/compute.js +31 -44
- package/dist/lib/patterns/aws/computeEc2.d.ts +1 -1
- package/dist/lib/patterns/aws/computeEc2.js +11 -14
- package/dist/lib/patterns/aws/computeEcs.d.ts +18 -2
- package/dist/lib/patterns/aws/computeEcs.js +41 -31
- package/dist/lib/patterns/aws/computeLambda.d.ts +2 -2
- package/dist/lib/patterns/aws/computeLambda.js +24 -31
- package/dist/lib/patterns/aws/database.d.ts +16 -7
- package/dist/lib/patterns/aws/database.js +81 -73
- package/dist/lib/patterns/aws/delegatedDomainPattern.d.ts +17 -0
- package/dist/lib/patterns/aws/delegatedDomainPattern.js +54 -0
- package/dist/lib/patterns/aws/dnsRecordComposer.d.ts +25 -0
- package/dist/lib/patterns/aws/dnsRecordComposer.js +225 -0
- package/dist/lib/patterns/aws/domain.d.ts +32 -0
- package/dist/lib/patterns/aws/domain.js +115 -0
- package/dist/lib/patterns/aws/domainDelegation.d.ts +3 -3
- package/dist/lib/patterns/aws/domainDelegation.js +28 -37
- package/dist/lib/patterns/aws/domainFactory.d.ts +20 -5
- package/dist/lib/patterns/aws/domainFactory.js +48 -10
- package/dist/lib/patterns/aws/domainValidation.d.ts +11 -0
- package/dist/lib/patterns/aws/domainValidation.js +145 -0
- package/dist/lib/patterns/aws/externalRecordsPattern.d.ts +18 -0
- package/dist/lib/patterns/aws/externalRecordsPattern.js +141 -0
- package/dist/lib/patterns/aws/fivetranProxy.d.ts +1 -1
- package/dist/lib/patterns/aws/fivetranProxy.js +6 -11
- package/dist/lib/patterns/aws/index.d.ts +21 -19
- package/dist/lib/patterns/aws/index.js +25 -36
- package/dist/lib/patterns/aws/interfaces/cdn.js +1 -5
- package/dist/lib/patterns/aws/interfaces/compute.js +4 -11
- package/dist/lib/patterns/aws/interfaces/connector.js +1 -15
- package/dist/lib/patterns/aws/interfaces/database.d.ts +1 -1
- package/dist/lib/patterns/aws/interfaces/database.js +6 -15
- package/dist/lib/patterns/aws/interfaces/domain.d.ts +80 -2
- package/dist/lib/patterns/aws/interfaces/domain.js +1 -6
- package/dist/lib/patterns/aws/interfaces/index.js +8 -41
- package/dist/lib/patterns/aws/interfaces/messaging.js +4 -11
- package/dist/lib/patterns/aws/interfaces/organisation.d.ts +1 -1
- package/dist/lib/patterns/aws/interfaces/organisation.js +4 -11
- package/dist/lib/patterns/aws/interfaces/pattern.js +2 -7
- package/dist/lib/patterns/aws/interfaces/storage.js +1 -5
- package/dist/lib/patterns/aws/managedIdentityCenter.js +7 -12
- package/dist/lib/patterns/aws/messaging.d.ts +7 -7
- package/dist/lib/patterns/aws/messaging.js +22 -33
- package/dist/lib/patterns/aws/network.d.ts +2 -2
- package/dist/lib/patterns/aws/network.js +9 -14
- package/dist/lib/patterns/aws/organisation.d.ts +6 -2
- package/dist/lib/patterns/aws/organisation.js +34 -35
- package/dist/lib/patterns/aws/organisationFactory.d.ts +3 -3
- package/dist/lib/patterns/aws/organisationFactory.js +7 -12
- package/dist/lib/patterns/aws/pattern.js +6 -12
- package/dist/lib/patterns/aws/payload.js +73 -63
- package/dist/lib/patterns/aws/platform.d.ts +6 -3
- package/dist/lib/patterns/aws/platform.js +15 -15
- package/dist/lib/patterns/aws/storage.d.ts +6 -4
- package/dist/lib/patterns/aws/storage.js +35 -40
- package/dist/lib/patterns/aws/subdomainHostedZone.js +11 -16
- package/dist/lib/patterns/aws/targets/fjallTargets.d.ts +37 -0
- package/dist/lib/patterns/aws/targets/fjallTargets.js +66 -0
- package/dist/lib/patterns/aws/targets/index.d.ts +2 -0
- package/dist/lib/patterns/aws/targets/index.js +2 -0
- package/dist/lib/patterns/aws/targets/targetResolution.d.ts +76 -0
- package/dist/lib/patterns/aws/targets/targetResolution.js +119 -0
- package/dist/lib/patterns/index.d.ts +1 -0
- package/dist/lib/patterns/index.js +1 -0
- package/dist/lib/resources/aws/analytics/clickhouse.d.ts +15 -0
- package/dist/lib/resources/aws/analytics/clickhouse.js +292 -0
- package/dist/lib/resources/aws/analytics/clickhouseConstants.d.ts +73 -0
- package/dist/lib/resources/aws/analytics/clickhouseConstants.js +87 -0
- package/dist/lib/resources/aws/analytics/clickhouseSecurityGroup.d.ts +13 -0
- package/dist/lib/resources/aws/analytics/clickhouseSecurityGroup.js +28 -0
- package/dist/lib/resources/aws/analytics/clickhouseTypes.d.ts +47 -0
- package/dist/lib/resources/aws/analytics/clickhouseTypes.js +1 -0
- package/dist/lib/resources/aws/analytics/clickhouseUserData.d.ts +5 -0
- package/dist/lib/resources/aws/analytics/clickhouseUserData.js +248 -0
- package/dist/lib/resources/aws/analytics/index.d.ts +2 -0
- package/dist/lib/resources/aws/analytics/index.js +1 -0
- package/dist/lib/resources/aws/audit/auditRole.js +10 -15
- package/dist/lib/resources/aws/audit/index.d.ts +1 -1
- package/dist/lib/resources/aws/audit/index.js +1 -6
- package/dist/lib/resources/aws/backup/backupPlan.d.ts +1 -1
- package/dist/lib/resources/aws/backup/backupPlan.js +14 -16
- package/dist/lib/resources/aws/backup/backupVault.d.ts +1 -1
- package/dist/lib/resources/aws/backup/backupVault.js +13 -15
- package/dist/lib/resources/aws/backup/index.d.ts +2 -2
- package/dist/lib/resources/aws/backup/index.js +2 -19
- package/dist/lib/resources/aws/base/awsStack.js +17 -19
- package/dist/lib/resources/aws/base/index.d.ts +1 -1
- package/dist/lib/resources/aws/base/index.js +1 -18
- package/dist/lib/resources/aws/cdn/cloudFront.js +40 -42
- package/dist/lib/resources/aws/cdn/index.d.ts +1 -1
- package/dist/lib/resources/aws/cdn/index.js +1 -18
- package/dist/lib/resources/aws/compute/ec2.js +39 -39
- package/dist/lib/resources/aws/compute/ecs.d.ts +18 -396
- package/dist/lib/resources/aws/compute/ecs.js +105 -976
- package/dist/lib/resources/aws/compute/ecsCapacityProviderAspect.d.ts +22 -0
- package/dist/lib/resources/aws/compute/ecsCapacityProviderAspect.js +35 -0
- package/dist/lib/resources/aws/compute/ecsConstants.d.ts +20 -0
- package/dist/lib/resources/aws/compute/ecsConstants.js +49 -0
- package/dist/lib/resources/aws/compute/ecsContext.d.ts +12 -0
- package/dist/lib/resources/aws/compute/ecsContext.js +1 -0
- package/dist/lib/resources/aws/compute/ecsImages.d.ts +4 -0
- package/dist/lib/resources/aws/compute/ecsImages.js +35 -0
- package/dist/lib/resources/aws/compute/ecsNetworking.d.ts +28 -0
- package/dist/lib/resources/aws/compute/ecsNetworking.js +290 -0
- package/dist/lib/resources/aws/compute/ecsRoles.d.ts +15 -0
- package/dist/lib/resources/aws/compute/ecsRoles.js +110 -0
- package/dist/lib/resources/aws/compute/ecsServiceFactory.d.ts +33 -0
- package/dist/lib/resources/aws/compute/ecsServiceFactory.js +183 -0
- package/dist/lib/resources/aws/compute/ecsTaskDefinition.d.ts +30 -0
- package/dist/lib/resources/aws/compute/ecsTaskDefinition.js +168 -0
- package/dist/lib/resources/aws/compute/ecsTypes.d.ts +337 -0
- package/dist/lib/resources/aws/compute/ecsTypes.js +10 -0
- package/dist/lib/resources/aws/compute/ecsValidation.d.ts +18 -0
- package/dist/lib/resources/aws/compute/ecsValidation.js +72 -0
- package/dist/lib/resources/aws/compute/index.d.ts +3 -3
- package/dist/lib/resources/aws/compute/index.js +3 -20
- package/dist/lib/resources/aws/compute/lambda.d.ts +10 -2
- package/dist/lib/resources/aws/compute/lambda.js +81 -71
- package/dist/lib/resources/aws/database/dynamodb.js +24 -27
- package/dist/lib/resources/aws/database/index.d.ts +7 -7
- package/dist/lib/resources/aws/database/index.js +14 -33
- package/dist/lib/resources/aws/database/rdsAurora.d.ts +10 -2
- package/dist/lib/resources/aws/database/rdsAurora.js +76 -61
- package/dist/lib/resources/aws/database/rdsAuroraGlobal.d.ts +2 -2
- package/dist/lib/resources/aws/database/rdsAuroraGlobal.js +24 -21
- package/dist/lib/resources/aws/database/rdsDefaults.js +3 -7
- package/dist/lib/resources/aws/database/rdsHelpers.d.ts +2 -2
- package/dist/lib/resources/aws/database/rdsHelpers.js +21 -29
- package/dist/lib/resources/aws/database/rdsInstance.d.ts +11 -3
- package/dist/lib/resources/aws/database/rdsInstance.js +101 -83
- package/dist/lib/resources/aws/database/rdsProxyOutput.js +5 -9
- package/dist/lib/resources/aws/iam/delegationRole.d.ts +18 -0
- package/dist/lib/resources/aws/iam/delegationRole.js +60 -0
- package/dist/lib/resources/aws/iam/identityCenter/assignment.js +4 -9
- package/dist/lib/resources/aws/iam/identityCenter/group.js +5 -9
- package/dist/lib/resources/aws/iam/identityCenter/index.d.ts +3 -3
- package/dist/lib/resources/aws/iam/identityCenter/index.js +3 -20
- package/dist/lib/resources/aws/iam/identityCenter/permissionSet.d.ts +1 -1
- package/dist/lib/resources/aws/iam/identityCenter/permissionSet.js +5 -9
- package/dist/lib/resources/aws/iam/index.d.ts +5 -4
- package/dist/lib/resources/aws/iam/index.js +5 -21
- package/dist/lib/resources/aws/iam/instanceProfile.js +2 -7
- package/dist/lib/resources/aws/iam/managedPolicy.js +2 -7
- package/dist/lib/resources/aws/iam/policy.js +2 -7
- package/dist/lib/resources/aws/iam/role.js +2 -7
- package/dist/lib/resources/aws/index.d.ts +7 -7
- package/dist/lib/resources/aws/index.js +7 -24
- package/dist/lib/resources/aws/logging/cloudTrail.d.ts +1 -1
- package/dist/lib/resources/aws/logging/cloudTrail.js +18 -22
- package/dist/lib/resources/aws/logging/index.d.ts +2 -2
- package/dist/lib/resources/aws/logging/index.js +2 -19
- package/dist/lib/resources/aws/logging/logGroup.js +4 -10
- package/dist/lib/resources/aws/messaging/eventbridge.js +11 -14
- package/dist/lib/resources/aws/messaging/index.d.ts +4 -4
- package/dist/lib/resources/aws/messaging/index.js +4 -21
- package/dist/lib/resources/aws/messaging/sns.js +11 -14
- package/dist/lib/resources/aws/messaging/sqs.js +32 -34
- package/dist/lib/resources/aws/messaging/utils.d.ts +1 -1
- package/dist/lib/resources/aws/messaging/utils.js +1 -6
- package/dist/lib/resources/aws/monitoring/alarmDefaults.d.ts +36 -0
- package/dist/lib/resources/aws/monitoring/alarmDefaults.js +34 -0
- package/dist/lib/resources/aws/monitoring/ecsAlarms.d.ts +21 -0
- package/dist/lib/resources/aws/monitoring/ecsAlarms.js +88 -0
- package/dist/lib/resources/aws/monitoring/index.d.ts +4 -0
- package/dist/lib/resources/aws/monitoring/index.js +4 -5
- package/dist/lib/resources/aws/monitoring/lambdaAlarms.d.ts +18 -0
- package/dist/lib/resources/aws/monitoring/lambdaAlarms.js +44 -0
- package/dist/lib/resources/aws/monitoring/rdsAlarms.d.ts +20 -0
- package/dist/lib/resources/aws/monitoring/rdsAlarms.js +52 -0
- package/dist/lib/resources/aws/networking/crossAccountDelegationRecord.d.ts +17 -0
- package/dist/lib/resources/aws/networking/crossAccountDelegationRecord.js +26 -0
- package/dist/lib/resources/aws/networking/dnsRecord/aRecord.d.ts +12 -0
- package/dist/lib/resources/aws/networking/dnsRecord/aRecord.js +21 -0
- package/dist/lib/resources/aws/networking/dnsRecord/aaaaRecord.d.ts +12 -0
- package/dist/lib/resources/aws/networking/dnsRecord/aaaaRecord.js +22 -0
- package/dist/lib/resources/aws/networking/dnsRecord/aliasRecord.d.ts +12 -0
- package/dist/lib/resources/aws/networking/dnsRecord/aliasRecord.js +23 -0
- package/dist/lib/resources/aws/networking/dnsRecord/caaRecord.d.ts +17 -0
- package/dist/lib/resources/aws/networking/dnsRecord/caaRecord.js +21 -0
- package/dist/lib/resources/aws/networking/dnsRecord/cnameRecord.d.ts +12 -0
- package/dist/lib/resources/aws/networking/dnsRecord/cnameRecord.js +22 -0
- package/dist/lib/resources/aws/networking/dnsRecord/dnsRecordBase.d.ts +17 -0
- package/dist/lib/resources/aws/networking/dnsRecord/dnsRecordBase.js +17 -0
- package/dist/lib/resources/aws/networking/dnsRecord/index.d.ts +10 -0
- package/dist/lib/resources/aws/networking/dnsRecord/index.js +10 -0
- package/dist/lib/resources/aws/networking/dnsRecord/mxRecord.d.ts +16 -0
- package/dist/lib/resources/aws/networking/dnsRecord/mxRecord.js +21 -0
- package/dist/lib/resources/aws/networking/dnsRecord/nsRecord.d.ts +12 -0
- package/dist/lib/resources/aws/networking/dnsRecord/nsRecord.js +21 -0
- package/dist/lib/resources/aws/networking/dnsRecord/srvRecord.d.ts +18 -0
- package/dist/lib/resources/aws/networking/dnsRecord/srvRecord.js +21 -0
- package/dist/lib/resources/aws/networking/dnsRecord/txtRecord.d.ts +12 -0
- package/dist/lib/resources/aws/networking/dnsRecord/txtRecord.js +21 -0
- package/dist/lib/resources/aws/networking/domain.d.ts +1 -1
- package/dist/lib/resources/aws/networking/domain.js +32 -34
- package/dist/lib/resources/aws/networking/domainCertificate.d.ts +8 -3
- package/dist/lib/resources/aws/networking/domainCertificate.js +22 -16
- package/dist/lib/resources/aws/networking/hostedZone.d.ts +23 -19
- package/dist/lib/resources/aws/networking/hostedZone.js +70 -134
- package/dist/lib/resources/aws/networking/index.d.ts +8 -7
- package/dist/lib/resources/aws/networking/index.js +8 -24
- package/dist/lib/resources/aws/networking/ipam.js +2 -7
- package/dist/lib/resources/aws/networking/ipamPool.d.ts +1 -1
- package/dist/lib/resources/aws/networking/ipamPool.js +45 -55
- package/dist/lib/resources/aws/networking/securityGroup.js +2 -7
- package/dist/lib/resources/aws/networking/vpc.d.ts +1 -1
- package/dist/lib/resources/aws/networking/vpc.js +17 -21
- package/dist/lib/resources/aws/organisation/costAllocationTagActivator.d.ts +1 -1
- package/dist/lib/resources/aws/organisation/costAllocationTagActivator.js +11 -15
- package/dist/lib/resources/aws/organisation/index.d.ts +5 -5
- package/dist/lib/resources/aws/organisation/index.js +4 -12
- package/dist/lib/resources/aws/organisation/organisation.js +5 -7
- package/dist/lib/resources/aws/organisation/organisationAccount.js +7 -10
- package/dist/lib/resources/aws/organisation/organisationPolicy.js +5 -9
- package/dist/lib/resources/aws/organisation/organisationalUnit.js +1 -3
- package/dist/lib/resources/aws/secrets/alias.js +2 -7
- package/dist/lib/resources/aws/secrets/index.d.ts +4 -4
- package/dist/lib/resources/aws/secrets/index.js +4 -21
- package/dist/lib/resources/aws/secrets/kms.js +15 -18
- package/dist/lib/resources/aws/secrets/parameter.d.ts +3 -3
- package/dist/lib/resources/aws/secrets/parameter.js +19 -22
- package/dist/lib/resources/aws/secrets/secret.d.ts +2 -2
- package/dist/lib/resources/aws/secrets/secret.js +12 -14
- package/dist/lib/resources/aws/storage/ecr.d.ts +2 -2
- package/dist/lib/resources/aws/storage/ecr.js +7 -13
- package/dist/lib/resources/aws/storage/index.d.ts +2 -2
- package/dist/lib/resources/aws/storage/index.js +2 -19
- package/dist/lib/resources/aws/storage/s3.d.ts +1 -1
- package/dist/lib/resources/aws/storage/s3.js +24 -12
- package/dist/lib/resources/aws/utilities/awsCustomResource.js +3 -7
- package/dist/lib/resources/aws/utilities/codeBuild.js +7 -12
- package/dist/lib/resources/aws/utilities/customResource.js +14 -17
- package/dist/lib/resources/aws/utilities/customResourceProvider.js +2 -7
- package/dist/lib/resources/aws/utilities/index.d.ts +5 -5
- package/dist/lib/resources/aws/utilities/index.js +5 -22
- package/dist/lib/resources/aws/utilities/resourceShare.js +2 -7
- package/dist/lib/resources/index.d.ts +1 -1
- package/dist/lib/resources/index.js +1 -18
- package/dist/lib/types.js +1 -3
- package/dist/lib/utils/accountsUtils.d.ts +5 -0
- package/dist/lib/utils/accountsUtils.js +18 -0
- package/dist/lib/utils/addSuffixToEmail.js +1 -5
- package/dist/lib/utils/backupTierMapping.js +2 -6
- package/dist/lib/utils/capitaliseString.js +1 -10
- package/dist/lib/utils/connections.js +9 -13
- package/dist/lib/utils/connector.js +10 -23
- package/dist/lib/utils/constructMap.d.ts +33 -0
- package/dist/lib/utils/constructMap.js +154 -0
- package/dist/lib/utils/databaseTypes.js +4 -10
- package/dist/lib/utils/dnsRecords.d.ts +1 -1
- package/dist/lib/utils/dnsRecords.js +23 -27
- package/dist/lib/utils/domainTypes.d.ts +0 -1
- package/dist/lib/utils/domainTypes.js +2 -10
- package/dist/lib/utils/env.js +14 -26
- package/dist/lib/utils/getAccountId.js +3 -7
- package/dist/lib/utils/getAsync.js +7 -10
- package/dist/lib/utils/getConfig.d.ts +0 -2
- package/dist/lib/utils/getConfig.js +29 -47
- package/dist/lib/utils/getStackOutput.js +4 -8
- package/dist/lib/utils/index.d.ts +12 -12
- package/dist/lib/utils/index.js +12 -29
- package/dist/lib/utils/manifestWriter.d.ts +14 -3
- package/dist/lib/utils/manifestWriter.js +60 -43
- package/dist/lib/utils/orgConfigParser.d.ts +14 -0
- package/dist/lib/utils/orgConfigParser.js +49 -0
- package/dist/lib/utils/removalPolicy.js +5 -9
- package/dist/lib/utils/resourceNaming.js +11 -16
- package/dist/lib/utils/standardTagsAspect.js +9 -16
- package/dist/lib/utils/stripAndCamelCase.js +1 -5
- package/dist/lib/utils/validationLogger.js +12 -18
- package/dist/lib/utils/vpcUtils.js +5 -10
- package/package.json +25 -8
- package/dist/lib/config/aws/accountId.d.ts +0 -6
- package/dist/lib/config/aws/accountId.js +0 -32
- package/dist/lib/config/aws/backupGlobalSettings.d.ts +0 -29
- package/dist/lib/config/aws/backupGlobalSettings.js +0 -49
- package/dist/lib/config/aws/costAllocationTags.d.ts +0 -12
- package/dist/lib/config/aws/costAllocationTags.js +0 -47
- package/dist/lib/config/aws/ipamDelegateAdmin.d.ts +0 -8
- package/dist/lib/config/aws/ipamDelegateAdmin.js +0 -57
- package/dist/lib/config/aws/ipamPoolId.d.ts +0 -16
- package/dist/lib/config/aws/ipamPoolId.js +0 -42
- package/dist/lib/config/aws/organisation.d.ts +0 -30
- package/dist/lib/config/aws/organisation.js +0 -92
- package/dist/lib/config/aws/organisationId.d.ts +0 -7
- package/dist/lib/config/aws/organisationId.js +0 -45
- package/dist/lib/config/aws/organisationsAccess.d.ts +0 -10
- package/dist/lib/config/aws/organisationsAccess.js +0 -49
- package/dist/lib/config/aws/ramSharing.d.ts +0 -4
- package/dist/lib/config/aws/ramSharing.js +0 -34
- package/dist/lib/config/monitoring.d.ts +0 -18
- package/dist/lib/config/monitoring.js +0 -22
- package/dist/lib/patterns/aws/connections.d.ts +0 -46
- package/dist/lib/patterns/aws/connections.js +0 -159
- package/dist/lib/patterns/aws/hostedZone.d.ts +0 -28
- package/dist/lib/patterns/aws/hostedZone.js +0 -150
- package/dist/lib/patterns/aws/managedAccount.d.ts +0 -9
- package/dist/lib/patterns/aws/managedAccount.js +0 -55
- package/dist/lib/patterns/aws/managedOrganisation.d.ts +0 -36
- package/dist/lib/patterns/aws/managedOrganisation.js +0 -97
- package/dist/lib/patterns/aws/managedPlatform.d.ts +0 -12
- package/dist/lib/patterns/aws/managedPlatform.js +0 -29
- package/dist/lib/resources/aws/database/database.d.ts +0 -14
- package/dist/lib/resources/aws/database/database.js +0 -28
- package/dist/lib/resources/aws/database/databaseInstance.d.ts +0 -15
- package/dist/lib/resources/aws/database/databaseInstance.js +0 -30
- package/dist/lib/resources/aws/database/migrationLambda.d.ts +0 -80
- package/dist/lib/resources/aws/database/migrationLambda.js +0 -119
- package/dist/lib/resources/aws/iam/identityCenter/attachManagedPolicy.d.ts +0 -13
- package/dist/lib/resources/aws/iam/identityCenter/attachManagedPolicy.js +0 -51
- package/dist/lib/resources/aws/iam/securityGroup.d.ts +0 -5
- package/dist/lib/resources/aws/iam/securityGroup.js +0 -14
- package/dist/lib/resources/aws/monitoring/monitoringRole.d.ts +0 -29
- package/dist/lib/resources/aws/monitoring/monitoringRole.js +0 -120
- package/dist/lib/utils/capitalizeString.d.ts +0 -12
- package/dist/lib/utils/capitalizeString.js +0 -30
|
@@ -1,311 +1,17 @@
|
|
|
1
|
-
import { Cluster as CdkCluster, FargateService,
|
|
2
|
-
import { Connections, type IConnectable
|
|
1
|
+
import { Cluster as CdkCluster, type FargateService, type Ec2Service } from "aws-cdk-lib/aws-ecs";
|
|
2
|
+
import { Connections, type IConnectable } from "aws-cdk-lib/aws-ec2";
|
|
3
3
|
import { Construct } from "constructs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
HTTP = 0,
|
|
16
|
-
HTTPS = 1
|
|
17
|
-
}
|
|
18
|
-
export declare enum ScalingType {
|
|
19
|
-
CPU = "ECSServiceAverageCPUUtilization",
|
|
20
|
-
MEMORY = "ECSServiceAverageMemoryUtilization"
|
|
21
|
-
}
|
|
22
|
-
export type EcsCapacityProvider = "FARGATE" | "FARGATE_SPOT" | "EC2";
|
|
23
|
-
/**
|
|
24
|
-
* EC2 capacity configuration for ECS EC2-backed clusters.
|
|
25
|
-
* Only used when capacityProvider is "EC2".
|
|
26
|
-
*/
|
|
27
|
-
export interface Ec2CapacityConfig {
|
|
28
|
-
/** EC2 instance type. Default: "t4g.micro" */
|
|
29
|
-
instanceType?: string;
|
|
30
|
-
/** AMI hardware type. Default: "ARM" (Graviton - better cost/performance) */
|
|
31
|
-
amiHardwareType?: "ARM" | "STANDARD";
|
|
32
|
-
/** Minimum number of instances. Default: 1 */
|
|
33
|
-
minCapacity?: number;
|
|
34
|
-
/** Maximum number of instances. Default: 3 */
|
|
35
|
-
maxCapacity?: number;
|
|
36
|
-
/** Memory limit in MiB for the container. Default: 1024 */
|
|
37
|
-
memoryLimitMiB?: number;
|
|
38
|
-
/** Warm pool keeps stopped instances for faster start (10-15s vs 60-90s).
|
|
39
|
-
* Mirrors generator WarmPool type (generator/src/schemas/computeSchemas.ts). */
|
|
40
|
-
warmPool?: {
|
|
41
|
-
/** Minimum instances to keep in the warm pool. Default: 1 */
|
|
42
|
-
minSize?: number;
|
|
43
|
-
/** Return instances to the pool on scale-in instead of terminating. Default: true */
|
|
44
|
-
reuseOnScaleIn?: boolean;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Domain configuration for HTTPS and DNS.
|
|
49
|
-
*/
|
|
50
|
-
export interface DomainBaseConfig {
|
|
51
|
-
domainName: string;
|
|
52
|
-
hostedZone?: FjallHostedZone;
|
|
53
|
-
certificate?: Certificate;
|
|
54
|
-
setIdentifier?: string;
|
|
55
|
-
/** Import zone and cert from a managed domain stack via Fn.importValue() */
|
|
56
|
-
managedDomain?: ManagedDomainExports;
|
|
57
|
-
}
|
|
58
|
-
export interface LatencyDomainConfig extends DomainBaseConfig {
|
|
59
|
-
region: string;
|
|
60
|
-
}
|
|
61
|
-
export interface WeightedDomainConfig extends DomainBaseConfig {
|
|
62
|
-
weight: number;
|
|
63
|
-
}
|
|
64
|
-
export interface GeoLocationDomainConfig extends DomainBaseConfig {
|
|
65
|
-
geoLocation: GeoLocation;
|
|
66
|
-
}
|
|
67
|
-
export type DomainConfig = DomainBaseConfig | LatencyDomainConfig | WeightedDomainConfig | GeoLocationDomainConfig;
|
|
68
|
-
/**
|
|
69
|
-
* Internal configuration for a container in a multi-container ECS task.
|
|
70
|
-
*
|
|
71
|
-
* In multi-container tasks, the first container with a `port` is the **primary container**
|
|
72
|
-
* that receives load balancer traffic. All other containers are **sidecars** that provide
|
|
73
|
-
* supporting functionality (logging, monitoring, proxies, etc.).
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* // Primary container (has port) + sidecar (no port)
|
|
77
|
-
* containers: [
|
|
78
|
-
* { name: "app", port: 3000 }, // Primary - receives ALB traffic
|
|
79
|
-
* { name: "datadog", image: "datadog/agent" } // Sidecar - monitoring
|
|
80
|
-
* ]
|
|
81
|
-
*
|
|
82
|
-
* @internal
|
|
83
|
-
*/
|
|
84
|
-
export interface EcsClusterContainerConfig {
|
|
85
|
-
/** Unique container name */
|
|
86
|
-
name: string;
|
|
87
|
-
/**
|
|
88
|
-
* Container image. Options:
|
|
89
|
-
* - Omit: Uses default ECR repository (primary container only)
|
|
90
|
-
* - string: ECR repository name or public image URL
|
|
91
|
-
* - Repository: CDK ECR Repository construct
|
|
92
|
-
*/
|
|
93
|
-
image?: string | Repository;
|
|
94
|
-
/**
|
|
95
|
-
* Port the container listens on.
|
|
96
|
-
* The first container with a port becomes the **primary container**
|
|
97
|
-
* and is registered with the load balancer.
|
|
98
|
-
*/
|
|
99
|
-
port?: number;
|
|
100
|
-
/** Environment variables */
|
|
101
|
-
environment?: Record<string, string>;
|
|
102
|
-
/**
|
|
103
|
-
* Secrets from AWS SSM Parameter Store.
|
|
104
|
-
* Array of secret names that will be fetched from the service's SSM namespace.
|
|
105
|
-
*
|
|
106
|
-
* @example
|
|
107
|
-
* secrets: ["API_KEY", "DB_PASSWORD"]
|
|
108
|
-
*/
|
|
109
|
-
secrets?: string[];
|
|
110
|
-
/** Secrets imported from other CDK resources (AWS Secrets Manager) */
|
|
111
|
-
secretsImport?: {
|
|
112
|
-
[key: string]: SecretImport;
|
|
113
|
-
};
|
|
114
|
-
/** Command to run in the container */
|
|
115
|
-
command?: string[];
|
|
116
|
-
/** Entry point for the container */
|
|
117
|
-
entryPoint?: string[];
|
|
118
|
-
/**
|
|
119
|
-
* Whether this container is essential.
|
|
120
|
-
* If an essential container stops, all containers in the task stop.
|
|
121
|
-
* Default: true for primary container, true for sidecars
|
|
122
|
-
*/
|
|
123
|
-
essential?: boolean;
|
|
124
|
-
/**
|
|
125
|
-
* Health check configuration.
|
|
126
|
-
* Default: For primary container with port, uses curl health check.
|
|
127
|
-
*/
|
|
128
|
-
healthCheck?: {
|
|
129
|
-
command: string[];
|
|
130
|
-
interval?: number;
|
|
131
|
-
timeout?: number;
|
|
132
|
-
retries?: number;
|
|
133
|
-
startPeriod?: number;
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Cluster-level configuration.
|
|
138
|
-
* Controls the shared ALB for all services in this cluster.
|
|
139
|
-
*/
|
|
140
|
-
export interface EcsClusterClusterConfig {
|
|
141
|
-
/**
|
|
142
|
-
* Domain for HTTPS access.
|
|
143
|
-
* - Omit: ALB created with default DNS (*.elb.amazonaws.com)
|
|
144
|
-
* - Specified: Creates ACM certificate + Route53 DNS A record
|
|
145
|
-
*/
|
|
146
|
-
domain?: string;
|
|
147
|
-
/**
|
|
148
|
-
* Load balancer configuration.
|
|
149
|
-
* - false: No ALB (for workers/internal services)
|
|
150
|
-
* - "public": Internet-facing ALB (default)
|
|
151
|
-
* - "internal": VPC-only ALB
|
|
152
|
-
*/
|
|
153
|
-
loadBalancer?: false | "public" | "internal";
|
|
154
|
-
/**
|
|
155
|
-
* Enable direct EC2 access without ALB.
|
|
156
|
-
* Opens container ports on security group for direct access via EC2 public IP.
|
|
157
|
-
* Uses host network mode for predictable port mapping (container:3000 → host:3000).
|
|
158
|
-
* Only valid with EC2 capacity provider.
|
|
159
|
-
*/
|
|
160
|
-
directAccess?: boolean;
|
|
161
|
-
/**
|
|
162
|
-
* Domain configuration for advanced routing policies (latency, weighted, geo).
|
|
163
|
-
* Only used when domain is specified.
|
|
164
|
-
*/
|
|
165
|
-
domainConfig?: DomainConfig;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Routing configuration for path/host-based routing on the ALB.
|
|
169
|
-
*/
|
|
170
|
-
export interface EcsRoutingConfig {
|
|
171
|
-
/** Path pattern for routing (e.g., "/api/*", "/users/*") */
|
|
172
|
-
path?: string;
|
|
173
|
-
/** Host header for routing (e.g., "api.example.com") */
|
|
174
|
-
host?: string;
|
|
175
|
-
/** Priority for this routing rule (1-50000). Lower = higher priority. */
|
|
176
|
-
priority?: number;
|
|
177
|
-
/** Health check path for this service's target group. Default: "/" */
|
|
178
|
-
healthCheckPath?: string;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Configuration for a service in an ECS cluster.
|
|
182
|
-
* Each service gets its own task definition, scaling, and target group.
|
|
183
|
-
*/
|
|
184
|
-
export interface EcsServiceProps {
|
|
185
|
-
/** Service name (unique within cluster) */
|
|
186
|
-
name: string;
|
|
187
|
-
/**
|
|
188
|
-
* Container image for this service.
|
|
189
|
-
* - Omit: Uses cluster's default ECR repository
|
|
190
|
-
* - string: ECR repository name or public image URL
|
|
191
|
-
* - Repository: CDK ECR Repository construct
|
|
192
|
-
*/
|
|
193
|
-
image?: string | Repository;
|
|
194
|
-
/**
|
|
195
|
-
* Container configurations for this service.
|
|
196
|
-
* The first container with a port is the **primary container** (receives ALB traffic).
|
|
197
|
-
*/
|
|
198
|
-
containers: EcsClusterContainerConfig[];
|
|
199
|
-
/** CPU units for this service's tasks (256-4096) */
|
|
200
|
-
cpu?: number;
|
|
201
|
-
/** Memory in MiB for this service's tasks (512-30720) */
|
|
202
|
-
memoryLimitMiB?: number;
|
|
203
|
-
/** Desired number of tasks. Default: 2 */
|
|
204
|
-
desiredCount?: number;
|
|
205
|
-
/** Scaling type (CPU or MEMORY). Omit to disable auto-scaling. */
|
|
206
|
-
scalingType?: ScalingType;
|
|
207
|
-
/** Minimum number of tasks for auto-scaling. Default: 2 */
|
|
208
|
-
minCapacity?: number;
|
|
209
|
-
/** Maximum number of tasks for auto-scaling. Default: 10 */
|
|
210
|
-
maxCapacity?: number;
|
|
211
|
-
/**
|
|
212
|
-
* Routing rules for this service on the cluster's ALB.
|
|
213
|
-
* Required when cluster has multiple services with ports.
|
|
214
|
-
* Can be a single rule or an array of rules pointing to the same target group.
|
|
215
|
-
*/
|
|
216
|
-
routing?: EcsRoutingConfig | EcsRoutingConfig[];
|
|
217
|
-
/**
|
|
218
|
-
* Additional inline policies for this service's task role.
|
|
219
|
-
* Added on top of the default ECS Exec permissions.
|
|
220
|
-
*/
|
|
221
|
-
taskRoleInlinePolicies?: {
|
|
222
|
-
[name: string]: PolicyDocument;
|
|
223
|
-
};
|
|
224
|
-
/**
|
|
225
|
-
* Additional managed policies for this service's task role.
|
|
226
|
-
* Added on top of the default ECS Exec permissions.
|
|
227
|
-
*/
|
|
228
|
-
taskRoleManagedPolicies?: IManagedPolicy[];
|
|
229
|
-
/**
|
|
230
|
-
* Resources this service needs to connect to (e.g., databases, S3 buckets, SQS queues).
|
|
231
|
-
* Creates security group rules for IConnectable resources and IAM grants for IAM resources.
|
|
232
|
-
*
|
|
233
|
-
* Supports:
|
|
234
|
-
* - IConnectable: Security group resources (RDS, ECS, etc.)
|
|
235
|
-
* - IStorageConnector: S3 buckets (IAM grants)
|
|
236
|
-
* - IDynamoDBConnector: DynamoDB tables (IAM grants)
|
|
237
|
-
* - IQueueConnector: SQS queues (IAM grants)
|
|
238
|
-
* - ConnectionConfig: Explicit access level configuration
|
|
239
|
-
*
|
|
240
|
-
* @example
|
|
241
|
-
* connections: [
|
|
242
|
-
* database, // Security group (RDS)
|
|
243
|
-
* { resource: cache, access: "read" }, // Read-only DynamoDB
|
|
244
|
-
* { resource: bucket, access: "write" }, // Write-only S3
|
|
245
|
-
* { resource: queue, access: "consume" } // Consume-only SQS
|
|
246
|
-
* ]
|
|
247
|
-
*/
|
|
248
|
-
connections?: ConnectionSpec[];
|
|
249
|
-
/**
|
|
250
|
-
* Capacity provider for this service. REQUIRED.
|
|
251
|
-
* Each service specifies its own capacity provider.
|
|
252
|
-
*/
|
|
253
|
-
capacityProvider: EcsCapacityProvider;
|
|
254
|
-
/**
|
|
255
|
-
* EC2 capacity configuration for this service.
|
|
256
|
-
* Only used when service capacityProvider is "EC2".
|
|
257
|
-
* Services with matching ec2Config share an ASG for efficiency.
|
|
258
|
-
*/
|
|
259
|
-
ec2Config?: Ec2CapacityConfig;
|
|
260
|
-
/**
|
|
261
|
-
* SSM Parameter Store path for secrets.
|
|
262
|
-
* If containers have secrets defined, this path is used as the base path.
|
|
263
|
-
* Format: /<app>/<cluster>/<service>
|
|
264
|
-
*
|
|
265
|
-
* @example
|
|
266
|
-
* ssmSecretsPath: "/myapp/api-cluster/users"
|
|
267
|
-
*/
|
|
268
|
-
ssmSecretsPath?: string;
|
|
269
|
-
/**
|
|
270
|
-
* Docker build target stage for multi-stage Dockerfiles.
|
|
271
|
-
* When specified, appends `-<target>` to the image tag.
|
|
272
|
-
*
|
|
273
|
-
* @example
|
|
274
|
-
* // With dockerTarget: "api", image tag becomes: myservice-api-latest
|
|
275
|
-
* dockerTarget: "api"
|
|
276
|
-
*/
|
|
277
|
-
dockerTarget?: string;
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* Props for creating an ECS cluster with multiple services.
|
|
281
|
-
*/
|
|
282
|
-
export type EcsClusterProps = {
|
|
283
|
-
/** Cluster name */
|
|
284
|
-
clusterName: string;
|
|
285
|
-
/**
|
|
286
|
-
* Application name for SSM secrets namespace.
|
|
287
|
-
* Required when any container uses secrets without explicit ssmSecretsPath.
|
|
288
|
-
* Used to build the path: /<appName>/<clusterName>/<serviceName>
|
|
289
|
-
*/
|
|
290
|
-
appName?: string;
|
|
291
|
-
/** VPC to deploy into */
|
|
292
|
-
vpc?: IVpc;
|
|
293
|
-
/** Default ECR repository or container image */
|
|
294
|
-
ecrRepository: Repository | RepositoryImage | string;
|
|
295
|
-
/**
|
|
296
|
-
* Cluster configuration.
|
|
297
|
-
* Controls the shared ALB for all services.
|
|
298
|
-
*/
|
|
299
|
-
cluster?: EcsClusterClusterConfig;
|
|
300
|
-
/**
|
|
301
|
-
* Services in this cluster.
|
|
302
|
-
* Each service gets its own task definition, scaling, and target group.
|
|
303
|
-
* Each service MUST specify its own capacityProvider.
|
|
304
|
-
* All services share the cluster's ALB (unless disabled).
|
|
305
|
-
* Task role policies are configured per-service for least-privilege.
|
|
306
|
-
*/
|
|
307
|
-
services: EcsServiceProps[];
|
|
308
|
-
};
|
|
4
|
+
import type { StackBuilder } from "../base/awsStack.js";
|
|
5
|
+
import type { ApplicationListener, ApplicationLoadBalancer } from "aws-cdk-lib/aws-elasticloadbalancingv2";
|
|
6
|
+
import { type EcsClusterProps } from "./ecsTypes.js";
|
|
7
|
+
export * from "./ecsTypes.js";
|
|
8
|
+
export * from "./ecsConstants.js";
|
|
9
|
+
export * from "./ecsContext.js";
|
|
10
|
+
export * from "./ecsTaskDefinition.js";
|
|
11
|
+
export * from "./ecsNetworking.js";
|
|
12
|
+
export { CapacityProviderDependencyAspect } from "./ecsCapacityProviderAspect.js";
|
|
13
|
+
export { validateEcsClusterProps, validateSsmPathComponent } from "./ecsValidation.js";
|
|
14
|
+
export * from "./ecsServiceFactory.js";
|
|
309
15
|
/**
|
|
310
16
|
* ECS Cluster supporting multiple services with a shared ALB.
|
|
311
17
|
*
|
|
@@ -347,23 +53,17 @@ export default class EcsCluster extends Construct implements IConnectable {
|
|
|
347
53
|
private cluster;
|
|
348
54
|
private loadBalancer?;
|
|
349
55
|
private loadBalancerListener?;
|
|
350
|
-
private hostedZone?;
|
|
351
56
|
private certificate?;
|
|
352
|
-
private
|
|
353
|
-
private autoScalingGroup?;
|
|
354
|
-
private asgSecurityGroup?;
|
|
355
|
-
private asgCapacityProvider?;
|
|
356
|
-
private loadBalancerSecurityGroup?;
|
|
57
|
+
private asgState;
|
|
357
58
|
private services;
|
|
358
|
-
private asgCapacityProviders;
|
|
359
59
|
private scope;
|
|
360
60
|
private props;
|
|
361
61
|
private outputName;
|
|
362
62
|
private loadBalancerDisabled;
|
|
363
63
|
private directAccessEnabled;
|
|
364
|
-
private
|
|
365
|
-
private usedPriorities;
|
|
64
|
+
private priorityState;
|
|
366
65
|
constructor(scope: Construct, id: string, props: EcsClusterProps);
|
|
66
|
+
private get ctx();
|
|
367
67
|
/** Get the cluster's load balancer. Undefined if disabled. */
|
|
368
68
|
getLoadBalancer(): ApplicationLoadBalancer | undefined;
|
|
369
69
|
/** Get the load balancer's listener. Undefined if disabled. */
|
|
@@ -381,95 +81,17 @@ export default class EcsCluster extends Construct implements IConnectable {
|
|
|
381
81
|
* Each service gets its own task definition, containers, and target group.
|
|
382
82
|
*/
|
|
383
83
|
private addServiceToCluster;
|
|
384
|
-
private validateProps;
|
|
385
84
|
private setupConnections;
|
|
386
|
-
/**
|
|
387
|
-
* Creates the execution role for ECS infrastructure operations.
|
|
388
|
-
* Used by the ECS agent to pull images, write logs, and inject secrets.
|
|
389
|
-
* NOT used by application code - that's the task role.
|
|
390
|
-
*/
|
|
391
|
-
private createExecutionRole;
|
|
392
|
-
/**
|
|
393
|
-
* Creates the task role for application code running in the container.
|
|
394
|
-
* This role is assumed by the application, not the ECS agent.
|
|
395
|
-
* Includes default ECS Exec permissions plus any service-specific policies.
|
|
396
|
-
*/
|
|
397
|
-
private createTaskRole;
|
|
398
|
-
private createTaskDefinition;
|
|
399
|
-
private addContainersToTask;
|
|
400
|
-
private getContainerImage;
|
|
401
|
-
private createService;
|
|
402
|
-
private registerServiceWithALB;
|
|
403
|
-
/** Returns the next unused auto-incremented ALB priority, skipping any manually assigned values. */
|
|
404
|
-
private getNextPriority;
|
|
405
|
-
private buildRoutingConditions;
|
|
406
|
-
private addServiceScaling;
|
|
407
|
-
/**
|
|
408
|
-
* Check if the VPC has NAT gateways.
|
|
409
|
-
* - For Fjall Vpc: uses hasNatGateways property
|
|
410
|
-
* - For other VPCs: checks if private subnets exist (assumes NAT if present)
|
|
411
|
-
*/
|
|
412
|
-
private vpcHasNatGateways;
|
|
413
85
|
/**
|
|
414
86
|
* Create DeployableService outputs for deployment automation.
|
|
415
87
|
* Each service gets a DeployableService output so the deployment service
|
|
416
88
|
* can find and deploy all services in the cluster.
|
|
417
89
|
*/
|
|
418
90
|
private addDeployableServiceOutputs;
|
|
419
|
-
/**
|
|
420
|
-
* Gets the capacity provider for a service.
|
|
421
|
-
* Each service MUST specify its own capacityProvider.
|
|
422
|
-
*/
|
|
423
|
-
private getServiceCapacityProvider;
|
|
424
|
-
/**
|
|
425
|
-
* Checks if a service uses a Fargate capacity provider.
|
|
426
|
-
*/
|
|
427
|
-
private isServiceFargate;
|
|
428
|
-
/**
|
|
429
|
-
* Checks if a service uses an EC2 capacity provider.
|
|
430
|
-
*/
|
|
431
|
-
private isServiceEc2;
|
|
432
|
-
/**
|
|
433
|
-
* Validates an SSM path component for correctness.
|
|
434
|
-
* SSM parameter paths have specific constraints that must be enforced.
|
|
435
|
-
*
|
|
436
|
-
* @param component - The path component to validate
|
|
437
|
-
* @param fieldName - Name of the field for error messages
|
|
438
|
-
* @throws Error if the component is invalid
|
|
439
|
-
*/
|
|
440
|
-
private validateSsmPathComponent;
|
|
441
|
-
/**
|
|
442
|
-
* Collects all Secrets Manager secret names from secretsImport across all services.
|
|
443
|
-
* Used to scope IAM permissions for least-privilege access.
|
|
444
|
-
*/
|
|
445
|
-
private collectSecretsManagerSecretNames;
|
|
446
|
-
/**
|
|
447
|
-
* Derives the SSM secrets path for a service.
|
|
448
|
-
* Uses explicit path if provided, otherwise derives from app/cluster/service names.
|
|
449
|
-
*/
|
|
450
|
-
private deriveSsmSecretsPath;
|
|
451
|
-
/**
|
|
452
|
-
* Generates a unique key for EC2 config (for ASG deduplication).
|
|
453
|
-
* Services with matching keys share an ASG.
|
|
454
|
-
*/
|
|
455
|
-
private getEc2ConfigKey;
|
|
456
|
-
/**
|
|
457
|
-
* Gets or creates an ASG capacity provider for a service.
|
|
458
|
-
* Services with matching EC2 configs share the same ASG.
|
|
459
|
-
*/
|
|
460
|
-
private getOrCreateAsgCapacityProvider;
|
|
461
|
-
/**
|
|
462
|
-
* Checks if any service in the cluster uses a Fargate capacity provider.
|
|
463
|
-
*/
|
|
91
|
+
/** Checks if any service in the cluster uses a Fargate capacity provider. */
|
|
464
92
|
private anyServiceUsesFargate;
|
|
465
|
-
/**
|
|
466
|
-
* Checks if any service in the cluster uses an EC2 capacity provider.
|
|
467
|
-
*/
|
|
93
|
+
/** Checks if any service in the cluster uses an EC2 capacity provider. */
|
|
468
94
|
private anyServiceUsesEc2;
|
|
469
95
|
private addCluster;
|
|
470
|
-
private addLoadBalancer;
|
|
471
|
-
private addDirectAccessOutputs;
|
|
472
|
-
private addLoadBalancerListener;
|
|
473
|
-
private addHostedZone;
|
|
474
96
|
static build(id: string, props: EcsClusterProps): (sb: StackBuilder) => Construct;
|
|
475
97
|
}
|