Class DeploymentConfig
This is the canonical configuration structure used by both interactive deployers and non-interactive deployment tools. It maps directly to deployment-context.json and can be serialized/deserialized via Jackson.
Architecture: This class lives in cloudforge-core (the contract layer) as it defines the data model interface between libraries and consumers. This ensures cloudforge-cli and other consumers always use the latest configuration schema without duplication.
- Since:
- CloudForge 3.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionTarget AWS account id to pin CDK'sEnvironment.accountto at synth time.Additional URL path patterns requiring authentication, added on top of whichever base list (protectedPathsor the application default) is in effect.Enable ALB access logs to S3.Enable anti-malware scanningApplication identifier (e.g., "jenkins", "gitlab", "vault")Human-readable application nameApplicationSpec instance (not serialized to JSON)S3 bucket for artifactsS3 prefix for artifactsEnable AWS Audit ManagerLegacy single-framework override, superseded bycomplianceFrameworks(which supports multiple).Enable the AWS Audit Manager service itself (null = use security profile default).Authentication modeEnable automated backups (null = use security profile default)Auto-provision SAML application in IAM Identity CenterString[]Availability zone suffixes for deployment (region-relative — "a" means whichever zone the deploy's own region calls "a", not a specific full zone name, since the same suffix set is valid regardless of which region gets picked elsewhere in the form).Enable AWS ConfigARN of the AWS Backup vault, in another region, that backups are copied to.Enable AWS Backup Vault Lock (null = profile default: false except when the compliance matrix requires BACKUP_RECOVERY).Retain the AWS Backup vault on stack deletion (null = profile default).CIDR for bastion/VPN SSH accessARN of an existing ACM certificate to use for the ALB's HTTPS listener, instead of provisioning a new one.Certificate expiration monitoring enabledCloudForge Manager's own public URL, used as the OIDC issuer when this app trusts a CloudForge Manager install as its identity provider (see com.cloudforgeci.manager.auth.oidcprovider's own package javadoc).Enable CloudFront CDNEnable CloudTrail for API audit loggingEnable CloudTrail InsightsEnable CloudWatch Logs KMS encryptionAdmin group nameExisting Cognito App Client IDAuto-provision new Cognito User PoolCreate admin and user groups in CognitoCognito domain prefix (must be globally unique)Initial admin email addressInitial admin phone number (E.164 format)Enable MFA for CognitoCognito MFA methodOverrides the security-profile default for whether users can self-register on the Cognito hosted UI (development defaults to allowed, staging/production to admin-only).User group nameManually configured Cognito app client ID, for a client that wasn't auto-provisioned.Existing Cognito User Pool IDCognito User Pool nameCompliance frameworks to enable.Raw compliance-framework token override for an on-demand advisory check (seeCloudForgeSynthesizer#synthesizeAdvisoryDryRun) -- lets a caller ask cdk-nag / FrameworkRules to validate against tokens with noComplianceFrameworkTypeentry at all (e.g.Compliance validation mode controlling how validation failures are handled.Override container image tagEnable container image vulnerability scanningEnable container runtime security monitoringintFargate CPU units (256, 512, 1024, 2048, 4096)intCPU target utilization percentage for auto-scalingCreate AWS Config infrastructure — an account+region-wide singleton (AWS allows exactly one recorder and one delivery channel per account per region), so this must stay an explicit, single-stack-only opt-in.Create GuardDuty detector (account-region singleton).Create Route53 hosted zoneEnable cross-region backups (null = use security profile default)Allocated storage in GB.Backup retention period in days.Database engine (e.g., postgres, mysql, mariadb).RDS instance class (e.g., db.t3.small, db.m5.large).Enable Multi-AZ deployment for high availability.Database name.Optional number of RDS read replicas.Database engine version.Primary domain (e.g., "example.com")Enable EBS volume encryption (null = profile default: PRODUCTION/STAGING=true unless the compliance matrix already requires it, DEV=true).Enable EFS at-rest encryption (null = profile default).Enable EFS encryption in transitbooleanEnable JNLP build agent port (Jenkins: 50000)Enable auto-scalingEnable CloudTrail bucket access logging remediationbooleanEnable Redis Cluster bus port (Redis: 16379)booleanEnable clustering ports (Mattermost: 8074-8075, Vault: 8201)booleanEnable container registry port (GitLab: 5050, Nexus: 5000-5002)Enable encryption at restEnable VPC flow logsEnable GuardDuty finding remediation (null = profile default: auto-enabled in PRODUCTION, same pattern asimdsv2Required-- ComplianceFactory's consumers treatnullas "PRODUCTION enables it, otherwise off" and an explicit value as an override either way, so this must NOT get a static default or that fallback can never trigger.Enable Inspector finding remediation.Enable Macie finding remediation.booleanEnable Prometheus metrics port (GitLab: 9090)Enable CloudWatch monitoringbooleanEnable Notary content trust port (Harbor: 4443)Enable RDS auto minor version upgrade remediationEnable RDS deletion protection remediationEnable S3 versioning remediationEnable Security Hub finding remediation.booleanEnable Redis Sentinel port (Redis: 26379)booleanEnable SMTP email port (Mattermost: 587)booleanEnable SMTP TLS email port (Mattermost: 465)booleanEnable Git SSH port (GitLab: 22, Gitea: 2222)Enable SSL certificate via ACMbooleanEnable Trivy vulnerability scanner port (Harbor: 8080)Environment name (e.g., "dev", "staging", "production")Reuse existing EFS by ID (for disaster recovery workflows)Enable file integrity monitoringFully qualified domain name — alwayssubdomain + "." + domainonce both are set; this field only matters when you need to override that computed result directly (e.g.GDPR data transfer approval flag for non-EU deployments.GuardDuty alerts configured (EventBridge to SNS/SIEM)Enable GuardDuty threat detection.intintintintHTTPS-only mode (no HTTP listener when SSL enabled)Identity Center group name for user assignmentRequire IMDSv2 on EC2 instances (null = profile default: PRODUCTION/STAGING=true unless the compliance matrix requires EC2_IMDSV2, DEV=false).Enable Inspector EC2 instance scanningEnable Inspector ECR image scanningEnable Amazon Inspector for vulnerability scanning.EC2 instance type (e.g., "t3.micro", "t3.small")Load balancer typeCloudWatch Logs retention daysEnable Macie automated discovery jobsEnable Amazon Macie for PII/PHI discovery (HIPAA/GDPR).Opt-in: grants CloudForge Manager's own task/instance role the direct-deploy IAM capability (CFN_DEPLOY— seeManagerAwsCapabilityCatalog), condition-scoped to CloudForge-tagged resources.A customer's LicenseSeat license key (CFC-XXXX-XXXX-XXXX-XXXX), injected at deploy time so an install activates immediately instead of requiring a follow-up visit to the owner-only License settings screen after the stack comes up.intMaximum instance capacity for auto-scalingintFargate memory in MBintMinimum instance capacity for auto-scalingNetwork mode for VPC topologyOIDC authorization endpointOIDC client ID — shared by external-idp and cloudforge-manager, both providers where an admin registers this app's client credentials by hand (external IdP's own console, or CloudForge Manager's Trusted Apps settings page) rather than CloudForge auto-provisioning them, so the field means the same thing either way.OIDC client secret name in Secrets Manager — same sharing rationale asoidcClientId.OIDC issuer URLOIDC provider (none, cognito, identity-center, external-idp)OIDC token endpointOIDC user info endpointRDS Performance Insights (query-level performance monitoring).URL path patterns that require authentication, replacing the application's own default list (ApplicationSpec#protectedPaths()) when set.Provision RDS database for application.Provision a dedicated AWS Secrets Manager entry holding the AES cipher key CloudForge Manager uses to encrypt cross-account connection secrets (external IDs) at rest — seeSecretCipher/AesGcmSecretCipherin cloudforge-manager.Provision an ElastiCache Redis cluster and bind CloudForge Manager's own container to it as a shared session store (CFC_MANAGER_SESSION_MODE=redis), so every Manager instance behind the same ALB recognizes sessions any of the others created — the missing piece for running Manager itself horizontally scaled.URL path patterns explicitly excluded from authentication, removed from the effective protected-paths list afterprotectedPaths/additionalProtectedPathsand the application's own defaults are combined.Automatic minor-version upgrades for the RDS instance.Enable RDS Multi-AZ (null = profile default: PRODUCTION=true, STAGING/DEV=false unless the compliance matrix requires DATABASE_MULTI_AZ).Enable RDS deletion protection (null = profile default: PRODUCTION=false unless the compliance matrix requires DELETION_PROTECTION, STAGING/DEV=false).RDS Enhanced Monitoring (OS-level metrics at a configurable interval).AWS region (e.g., "us-east-1", "us-west-2")Restrict security group egress to VPC CIDR only (requires VPC endpoints for AWS service access)Retain EFS/EBS volumes on stack deletionEnable Route53 Query LoggingRuntime type (FARGATE or EC2)Enable S3 bucket encryption (null = profile default).Enable S3 Object Lock for audit buckets (HIPAA/PCI-DSS immutability requirement)Scope AWS Config rules to only monitor this deployment's own resources (by stack name) instead of every resource in the account/region.Enable the AWS Foundational Security Best Practices standard in Security HubEnable the CIS AWS Foundations Benchmark standard in Security HubCIS AWS Foundations Benchmark version to enable.Enable AWS Security Hub for centralized security findings.AWS Foundational Security Best Practices version to enable.Enable the PCI DSS standard in Security HubPCI DSS version to enable.Enable security monitoringSecurity profile (DEV, STAGING, PRODUCTION)Enable SNS topic KMS encryption (null = profile default: false unless the compliance matrix requires SNS_KMS_ENCRYPTION).SSO Group IDIAM Identity Center (SSO) Instance ARNSSO Target Account IDCloudFormation stack nameSubdomain prefix (e.g., "ci", "gitlab") — ordered ahead ofdomain: you pick what this app is called (the subdomain) before which domain it hangs off of, and the combined result (subdomain + "." + domain) is what gets requested, not the other way around.Topology type — user-selectable, not just an auto-derived display value, so a future topology (or an app implementing more than one applicable interface) isn't locked out of being chosen explicitly.intEnable AWS WAF -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DeploymentConfigLoad DeploymentConfig from a JSON file path string.static DeploymentConfigLoad DeploymentConfig from a JSON file (e.g., deployment-context.json).static DeploymentConfigLoad DeploymentConfig from a JSON string.static DeploymentConfigLoad DeploymentConfig from a Map (e.g., CDK context).Returns the compliance frameworks as a comma-separated string.booleanChecks if any compliance framework is enabled.booleanhasComplianceFramework(ComplianceFrameworkType framework) Checks if a specific compliance framework is enabled.Convert this DeploymentConfig to a Map for CDK context.voidSave this DeploymentConfig to a JSON file path string.voidSave this DeploymentConfig to a JSON file.toJson()Serialize this DeploymentConfig to a JSON string.
-
Field Details
-
stackName
CloudFormation stack name -
environment
Environment name (e.g., "dev", "staging", "production") -
applicationId
Application identifier (e.g., "jenkins", "gitlab", "vault") -
applicationName
Human-readable application name -
applicationSpec
ApplicationSpec instance (not serialized to JSON) -
subdomain
-
domain
Primary domain (e.g., "example.com") -
fqdn
Fully qualified domain name — alwayssubdomain + "." + domainonce both are set; this field only matters when you need to override that computed result directly (e.g. a domain structure the subdomain+domain pair can't express), or when a caller only has the full FQDN available and no reliable way to split it (e.g. recovering it from a live CloudFormation template's ACM certificate, where the domain/subdomain boundary isn't knowable without a hosted-zone lookup). Previously@JsonIgnored on the theory that it should never round-trip as its own JSON key — that silently dropped any caller-supplied override during deserialization (an explicitfqdnin a submitted JSON body was discarded, reverting to null and falling through to the subdomain+domain computation instead), which is the opposite of "override." -
enableSsl
Enable SSL certificate via ACM -
certificateArn
ARN of an existing ACM certificate to use for the ALB's HTTPS listener, instead of provisioning a new one. Takes priority over both ofFargateRuntimeConfiguration's other two certificate paths — the DNS-validated public cert (needs a Route53 hosted zone this deployment controls) and the AWS Private CA cert (issued for the bare ALB DNS name, NOT trusted by browsers — see that class's comments). This is how a deployment gets a publicly-trusted certificate without either of those: import your own cert (issued by any public CA — ACM's own DNS/email validation, Let's Encrypt, a purchased cert, ...) into ACM yourself first (e.g.aws acm import-certificate, entirely within your own account — the key material never has to pass through this deployment config or CloudFormation), then point this at the resulting ARN. -
runtime
Runtime type (FARGATE or EC2) -
topology
Topology type — user-selectable, not just an auto-derived display value, so a future topology (or an app implementing more than one applicable interface) isn't locked out of being chosen explicitly. NoallowedValuesoverride here on purpose: leaving it unset lets the schema builder enumerate everyTopologyTypeconstant automatically — a hardcoded single-value override would hide CMS_SERVICE/JENKINS_SERVICE/S3_WEBSITE from the wizard entirely, locking out a CmsSpec app's actual topology even thoughDeploymentContextPrepareralready defaults to it correctly. -
securityProfile
Security profile (DEV, STAGING, PRODUCTION) -
networkMode
Network mode for VPC topology -
lbType
Load balancer type -
createZone
Create Route53 hosted zone -
enableFlowlogs
Enable VPC flow logs -
wafEnabled
Enable AWS WAF -
httpsStrictEnabled
HTTPS-only mode (no HTTP listener when SSL enabled) -
albAccessLogging
Enable ALB access logs to S3. Null means the security profile decides. -
cloudfrontEnabled
Enable CloudFront CDN -
bastionCidr
CIDR for bastion/VPN SSH access -
minInstanceCapacity
public int minInstanceCapacityMinimum instance capacity for auto-scaling -
maxInstanceCapacity
public int maxInstanceCapacityMaximum instance capacity for auto-scaling -
cpuTargetUtilization
public int cpuTargetUtilizationCPU target utilization percentage for auto-scaling -
cpu
public int cpuFargate CPU units (256, 512, 1024, 2048, 4096) -
memory
public int memoryFargate memory in MB -
instanceType
EC2 instance type (e.g., "t3.micro", "t3.small") -
containerImage
Override container image tag -
retainStorage
Retain EFS/EBS volumes on stack deletion -
existingFileSystemId
Reuse existing EFS by ID (for disaster recovery workflows) -
artifactsBucket
S3 bucket for artifacts -
artifactsPrefix
S3 prefix for artifacts -
authMode
Authentication mode -
oidcProvider
OIDC provider (none, cognito, identity-center, external-idp) -
protectedPaths
URL path patterns that require authentication, replacing the application's own default list (ApplicationSpec#protectedPaths()) when set. Consumed by bothCognitoAuthenticationFactoryandOidcAuthenticationFactory-- see theircalculateEffectiveProtectedPaths(): unset/empty means "use the application's default protected paths", not "protect nothing". -
additionalProtectedPaths
Additional URL path patterns requiring authentication, added on top of whichever base list (protectedPathsor the application default) is in effect. -
publicPaths
URL path patterns explicitly excluded from authentication, removed from the effective protected-paths list afterprotectedPaths/additionalProtectedPathsand the application's own defaults are combined. -
cognitoAutoProvision
Auto-provision new Cognito User Pool -
cognitoUserPoolName
Cognito User Pool name -
cognitoDomainPrefix
Cognito domain prefix (must be globally unique) -
cognitoMfaEnabled
Enable MFA for Cognito -
cognitoMfaMethod
Cognito MFA method -
cognitoSelfSignupEnabled
Overrides the security-profile default for whether users can self-register on the Cognito hosted UI (development defaults to allowed, staging/production to admin-only). Leftnull, the profile default applies unchanged. Self-signup is not enforced by any compliance framework rule today — a self-registered user still gets no group membership and resolves to the lowest-privilege role — but enabling it while a compliance framework is active (advisory or enforce) logs a warning at synthesis time, since open self-registration into an ops panel is a common audit finding independent of what role it grants. -
cognitoCreateGroups
Create admin and user groups in Cognito -
cognitoAdminGroupName
Admin group name -
cognitoUserGroupName
User group name -
cognitoInitialAdminEmail
Initial admin email address -
cognitoInitialAdminPhone
Initial admin phone number (E.164 format) -
cognitoUserPoolId
Existing Cognito User Pool ID -
cognitoAppClientId
Existing Cognito App Client ID -
cognitoUserPoolClientId
Manually configured Cognito app client ID, for a client that wasn't auto-provisioned. Distinct fromcognitoAppClientIdabove (used to reference an *existing user pool's* client whencognitoAutoProvision == false) -- this is read directly byApplicationOidcFactoryas a manual-configuration fallback. -
oidcIssuer
OIDC issuer URL -
cloudforgeManagerIssuerUrl
CloudForge Manager's own public URL, used as the OIDC issuer when this app trusts a CloudForge Manager install as its identity provider (see com.cloudforgeci.manager.auth.oidcprovider's own package javadoc). Authorization/token/ userinfo endpoints are computed from this one URL (CloudForge Manager's OIDC-provider endpoints are at fixed paths — /oauth2/authorize, /oauth2/token, /userinfo — so unlike the generic external-idp option above, only the base URL needs entering here, not each endpoint separately). -
oidcAuthorizationEndpoint
OIDC authorization endpoint -
oidcTokenEndpoint
OIDC token endpoint -
oidcUserInfoEndpoint
OIDC user info endpoint -
oidcClientId
OIDC client ID — shared by external-idp and cloudforge-manager, both providers where an admin registers this app's client credentials by hand (external IdP's own console, or CloudForge Manager's Trusted Apps settings page) rather than CloudForge auto-provisioning them, so the field means the same thing either way. -
oidcClientSecretName
OIDC client secret name in Secrets Manager — same sharing rationale asoidcClientId. -
enableAgents
public boolean enableAgentsEnable JNLP build agent port (Jenkins: 50000) -
enableSsh
public boolean enableSshEnable Git SSH port (GitLab: 22, Gitea: 2222) -
enableSmtp
public boolean enableSmtpEnable SMTP email port (Mattermost: 587) -
enableSmtps
public boolean enableSmtpsEnable SMTP TLS email port (Mattermost: 465) -
enableClustering
public boolean enableClusteringEnable clustering ports (Mattermost: 8074-8075, Vault: 8201) -
enableDockerRegistry
public boolean enableDockerRegistryEnable container registry port (GitLab: 5050, Nexus: 5000-5002) -
enableMetrics
public boolean enableMetricsEnable Prometheus metrics port (GitLab: 9090) -
enableNotary
public boolean enableNotaryEnable Notary content trust port (Harbor: 4443) -
enableTrivy
public boolean enableTrivyEnable Trivy vulnerability scanner port (Harbor: 8080) -
enableSentinel
public boolean enableSentinelEnable Redis Sentinel port (Redis: 26379) -
enableCluster
public boolean enableClusterEnable Redis Cluster bus port (Redis: 16379) -
autoProvisionIdentityCenter
Auto-provision SAML application in IAM Identity Center -
ssoInstanceArn
IAM Identity Center (SSO) Instance ARN -
ssoGroupId
SSO Group ID -
ssoTargetAccountId
SSO Target Account ID -
identityCenterGroupName
Identity Center group name for user assignment -
provisionDatabase
Provision RDS database for application. Only shown for applications with optional database support (e.g., Metabase, Grafana). Applications requiring database (e.g., Mattermost, GitLab) always provision one. -
databaseEngine
Database engine (e.g., postgres, mysql, mariadb). Default comes from ApplicationSpec.databaseRequirement().engine()Deliberately no static default here (nor on the other
database*fields below with adefaultFrom):DeploymentContextPrepareronly applies a field'sdefaultFrom-resolved ApplicationSpec value when the field is currently null/blank, so a non-null Java initializer would always look "already set" and block that resolution. Mixing a caller-supplied engine with a static default version can then produce an invalid combination (e.g.databaseEngine=mysqlwith a Postgres version yields a nonexistent "mysql15" RDS parameter group family).cloudforge-api'sApplicationFactorymerges these fields againstApplicationSpec.databaseRequirement()with the same null-check pattern. -
databaseVersion
Database engine version. Default comes from ApplicationSpec.databaseRequirement().effectiveDefaultVersion(). The application's declared version is a minimum: a higher version may be chosen, a lower one is rejected, and a version above the application's tested maximum is accepted with a warning. -
databaseInstanceClass
RDS instance class (e.g., db.t3.small, db.m5.large). DESTRUCTIVE: Changing this requires resource replacement. BILLING_IMPACT: Larger instances cost more. -
databaseAllocatedStorageGB
Allocated storage in GB. BILLING_IMPACT: More storage costs more. -
databaseMultiAz
Enable Multi-AZ deployment for high availability. BILLING_IMPACT: Multi-AZ doubles database costs.Deliberately no static default: any non-null value is treated as an explicit override of the security profile, so a
falseinitializer would keep PRODUCTION and compliance-driven Multi-AZ from ever applying. When unset, the profile decides. -
rdsAutoMinorVersionUpgrade
Automatic minor-version upgrades for the RDS instance.Deliberately no static default: unset lets RdsFactory fall back to its security-profile default (PRODUCTION only). A
falseinitializer would make an explicit override indistinguishable from "not set". -
performanceInsightsEnabled
RDS Performance Insights (query-level performance monitoring).Deliberately no static default -- see
databaseMultiAz. RdsFactory also skips this regardless of override on instance classes too small to support it (e.g. db.t3.micro). -
rdsEnhancedMonitoringEnabled
RDS Enhanced Monitoring (OS-level metrics at a configurable interval).Deliberately no static default -- see
databaseMultiAz. -
databaseReadReplicaCount
Optional number of RDS read replicas. When unset, an application may provide its own default (CloudForge Manager defaults to one); zero explicitly disables replicas for applications that support them. -
databaseName
Database name. IMMUTABLE: Cannot be changed after creation. -
databaseBackupRetentionDays
Backup retention period in days. Compliance frameworks may override: PCI-DSS (90 days), HIPAA (30 days), SOC2 (14 days). -
provisionManagerRedisSessions
Provision an ElastiCache Redis cluster and bind CloudForge Manager's own container to it as a shared session store (CFC_MANAGER_SESSION_MODE=redis), so every Manager instance behind the same ALB recognizes sessions any of the others created — the missing piece for running Manager itself horizontally scaled. OnlyApplicationFactoryacts on this, and only whenapplicationId == "cloudforge-manager";visibleWhenbelow keeps it out of every other application's deploy form for the same reason. Requires RDS (embedded H2 isn't safe to share across instances) — seeManagerDeploymentPreset.rdsWithRedisSessions(...)in cloudforge-manager-deployment, the typed pairing this mirrors. Single-instance Manager (the common case) needs nothing beyond the in-memory default and should leave this false. -
provisionManagerAccountCipherKey
Provision a dedicated AWS Secrets Manager entry holding the AES cipher key CloudForge Manager uses to encrypt cross-account connection secrets (external IDs) at rest — seeSecretCipher/AesGcmSecretCipherin cloudforge-manager. Injected into Manager's own ECS task asCFC_MANAGER_ACCOUNT_SECRET_KEYviaecs.Secret.fromSecretsManager(...), mirroring howCFC_MANAGER_DATABASE_PASSWORDis already delivered — never a literal value in the task definition. OnlyApplicationFactoryacts on this, and only whenapplicationId == cloudforge-manager. Defaults totrue(unlikeprovisionManagerRedisSessions) because without it Manager falls back toPlaintextSecretCipher— leaving it on is the secure-by-default choice for any AWS deployment of Manager, not an opt-in scaling feature like Redis. Independent ofprovisionDatabase: even an embedded-H2 Manager deployment benefits from encrypting the secrets it holds. -
managerLicenseKey
A customer's LicenseSeat license key (CFC-XXXX-XXXX-XXXX-XXXX), injected at deploy time so an install activates immediately instead of requiring a follow-up visit to the owner-only License settings screen after the stack comes up. When set,ApplicationFactoryprovisions a dedicated Secrets Manager entry for it andContainerFactorybinds that asCFC_MANAGER_LICENSESEAT_LICENSE_KEY— the exact env varManagerRuntimeConfigurationreads for its environment-supplied license key (see itsLicenseSeatrecord javadoc, cloudforge-manager). Purely additive: the in-app License settings screen still works, and a key activated through it still takes precedence (seeLicenseKeyStore, cloudforge-manager) — this only seeds the initial value.category = "database"despite not being a database setting: it sits right next toprovisionManagerAccountCipherKeyabove for the same reason that field does —InteractiveDeployer.configureDatabaseOptions()is the one place that currently discovers and prompts for manager-only fields by reflection (ConfigurationIntrospector.discoverVisibleFields(..., "database")); a "security" category discovery pass would also surface ~30 unrelated existing security fields that were never meant for CLI prompting. -
enableRdsDeletionProtectionRemediation
Enable RDS deletion protection remediation -
enableRdsAutoMinorVersionUpgradeRemediation
Enable RDS auto minor version upgrade remediation -
complianceFrameworks
Compliance frameworks to enable.Supports comma-separated string format in JSON for backward compatibility:
{"complianceFrameworks": "soc2,pci-dss,hipaa"}In Java code, use the type-safe List:
config.complianceFrameworks.contains(ComplianceFrameworkType.HIPAA)
-
complianceFrameworksRawOverride
Raw compliance-framework token override for an on-demand advisory check (seeCloudForgeSynthesizer#synthesizeAdvisoryDryRun) -- lets a caller ask cdk-nag / FrameworkRules to validate against tokens with noComplianceFrameworkTypeentry at all (e.g."ISO-27001", or"AWS-BEST-PRACTICES"for cdk-nag's own genericAwsSolutionsChecksfallback pack — seeSecurityRules#mapFrameworkToNagPack'sdefaultcase), without extending the license-gatedcomplianceFrameworksenum real deploys use. Comma-separated, same formatcomplianceFrameworksitself serializes to.Deliberately NOT part of
toContextMap()'s output: the "cfc" context map it builds gets round-tripped back through a strictDeploymentConfigdeserialization insideDeploymentContext.from(jsii construct-tree plumbing), and that round trip enforces the sameComplianceFrameworkTypeenum this field exists specifically to bypass — feeding it through that key would just re-throw the same "unknown compliance framework" error one layer later.CloudForgeSynthesizer#synthesizeinstead seeds this under its own separate, sibling top-level CDK context key (not nested in "cfc" at all), andSecurityRules#installreads it directly off the construct tree rather than throughDeploymentContext.transient/@JsonIgnoresince it must never round-trip through a saved deployment context the way every other field here does. -
auditManagerFrameworkId
Legacy single-framework override, superseded bycomplianceFrameworks(which supports multiple). Kept for backward compatibility with older deployment contexts. -
complianceMode
Compliance validation mode controlling how validation failures are handled. -
logRetentionDays
CloudWatch Logs retention days -
enableMonitoring
Enable CloudWatch monitoring -
enableEncryption
Enable encryption at rest -
awsConfigEnabled
Enable AWS Config -
createConfigInfrastructure
Create AWS Config infrastructure — an account+region-wide singleton (AWS allows exactly one recorder and one delivery channel per account per region), so this must stay an explicit, single-stack-only opt-in.falseby default, same asawsConfigEnabled: unset means neither compliance rules nor the recorder/channel they'd attach to ever get created. -
scopeConfigRulesToDeployment
Scope AWS Config rules to only monitor this deployment's own resources (by stack name) instead of every resource in the account/region. -
guardDutyEnabled
Enable GuardDuty threat detection. Deliberately no static default -- seemacieEnabled. isGuardDutyEnabled() falls back to "always enabled for production" when unset; afalseinitializer here would make every deployment look like an explicit opt-out, permanently skipping both that fallback and the compliance-matrix requirement check ahead of it. -
createGuardDutyDetector
Create GuardDuty detector (account-region singleton). Deliberately no static default -- seeguardDutyEnabledabove; GuardDutyFactory only auto-sets this to true when it's unset. -
guardDutyAlertsConfigured
GuardDuty alerts configured (EventBridge to SNS/SIEM) -
certificateExpirationMonitoring
Certificate expiration monitoring enabled -
cloudTrailEnabled
Enable CloudTrail for API audit logging -
securityMonitoringEnabled
Enable security monitoring -
efsEncryptionInTransitEnabled
Enable EFS encryption in transit -
restrictSecurityGroupEgress
Restrict security group egress to VPC CIDR only (requires VPC endpoints for AWS service access) -
automatedBackupEnabled
Enable automated backups (null = use security profile default) -
crossRegionBackupEnabled
Enable cross-region backups (null = use security profile default) -
backupCrossRegionVaultArn
ARN of the AWS Backup vault, in another region, that backups are copied to. -
macieEnabled
Enable Amazon Macie for PII/PHI discovery (HIPAA/GDPR). Deliberately no static default -- seecrossRegionBackupEnabled. Left unset, isMacieEnabled() falls through to the compliance-matrix requirement and then the profile default; afalseinitializer here would make every deployment look like an explicit opt-out, permanently skipping both. -
macieAutomatedDiscovery
Enable Macie automated discovery jobs -
securityHubEnabled
Enable AWS Security Hub for centralized security findings. Deliberately no static default -- seemacieEnabledabove. -
securityHubCisEnabled
Enable the CIS AWS Foundations Benchmark standard in Security Hub -
securityHubCisVersion
CIS AWS Foundations Benchmark version to enable. AWS has shipped 1.2.0, 1.4.0, 3.0.0, and 5.0.0 as coexisting standard versions over time -- configurable so a future version bump is a config change, not a code change. -
securityHubAwsFoundationalEnabled
Enable the AWS Foundational Security Best Practices standard in Security Hub -
securityHubFsbpVersion
AWS Foundational Security Best Practices version to enable. Has stayed at 1.0.0 since the standard launched in 2020 (controls are added within the version, not by version bump), but configurable for consistency with the other two standards. -
securityHubPciDssEnabled
Enable the PCI DSS standard in Security Hub -
securityHubPciDssVersion
PCI DSS version to enable. 4.0.1 is current -- the PCI Council retired the prior version, and AWS Security Hub follows suit. Configurable for the next version bump. -
inspectorEnabled
Enable Amazon Inspector for vulnerability scanning. Deliberately no static default -- seemacieEnabledabove. -
inspectorEc2Scanning
Enable Inspector EC2 instance scanning -
inspectorEcrScanning
Enable Inspector ECR image scanning -
antiMalwareEnabled
Enable anti-malware scanning -
fileIntegrityMonitoring
Enable file integrity monitoring -
containerRuntimeSecurity
Enable container runtime security monitoring -
containerImageScanning
Enable container image vulnerability scanning -
auditManagerEnabled
Enable AWS Audit Manager -
auditManagerServiceEnabled
Enable the AWS Audit Manager service itself (null = use security profile default).This is distinct from
auditManagerEnabled, which is the master gateSecurityRules.install()uses to decide whether any CloudForge FrameworkRules compliance validation runs at all. This field is the independent, configurable fact of whether the Audit Manager service should actually be provisioned/enabled for a given deployment -- it is whatSecurityProfileConfiguration#isAuditManagerEnabled()reads. -
cloudWatchLogsKmsEncryptionEnabled
Enable CloudWatch Logs KMS encryption -
cloudTrailInsightsEnabled
Enable CloudTrail Insights -
route53QueryLoggingEnabled
Enable Route53 Query Logging -
s3ObjectLockEnabled
Enable S3 Object Lock for audit buckets (HIPAA/PCI-DSS immutability requirement) -
ebsEncryptionEnabled
Enable EBS volume encryption (null = profile default: PRODUCTION/STAGING=true unless the compliance matrix already requires it, DEV=true). Independent ofefsEncryptionAtRestEnabledands3EncryptionEnabled-- every framework's Rules.java reads these as 3 separate controls. -
efsEncryptionAtRestEnabled
Enable EFS at-rest encryption (null = profile default). SeeebsEncryptionEnabled. -
s3EncryptionEnabled
Enable S3 bucket encryption (null = profile default). SeeebsEncryptionEnabled. -
backupVaultLockEnabled
Enable AWS Backup Vault Lock (null = profile default: false except when the compliance matrix requires BACKUP_RECOVERY). Vault Lock makes the vault's retention policy immutable. -
backupVaultRetentionEnabled
Retain the AWS Backup vault on stack deletion (null = profile default). -
rdsDeletionProtectionEnabled
Enable RDS deletion protection (null = profile default: PRODUCTION=false unless the compliance matrix requires DELETION_PROTECTION, STAGING/DEV=false). -
rdsDatabaseMultiAzEnabled
Enable RDS Multi-AZ (null = profile default: PRODUCTION=true, STAGING/DEV=false unless the compliance matrix requires DATABASE_MULTI_AZ). -
snsKmsEncryptionEnabled
Enable SNS topic KMS encryption (null = profile default: false unless the compliance matrix requires SNS_KMS_ENCRYPTION). -
imdsv2Required
Require IMDSv2 on EC2 instances (null = profile default: PRODUCTION/STAGING=true unless the compliance matrix requires EC2_IMDSV2, DEV=false). ADVISORY for PCI-DSS and GDPR -- this field is what lets a deployer opt out where the framework doesn't mandate it. -
enableS3VersioningRemediation
Enable S3 versioning remediation -
enableCloudTrailBucketAccessRemediation
Enable CloudTrail bucket access logging remediation -
enableGuardDutyRemediation
Enable GuardDuty finding remediation (null = profile default: auto-enabled in PRODUCTION, same pattern asimdsv2Required-- ComplianceFactory's consumers treatnullas "PRODUCTION enables it, otherwise off" and an explicit value as an override either way, so this must NOT get a static default or that fallback can never trigger. -
enableSecurityHubRemediation
Enable Security Hub finding remediation. Deliberately no static default -- seeenableGuardDutyRemediation. -
enableInspectorRemediation
Enable Inspector finding remediation. Deliberately no static default -- seeenableGuardDutyRemediation. -
enableMacieRemediation
Enable Macie finding remediation. Deliberately no static default -- seeenableGuardDutyRemediation. -
healthCheckGracePeriod
public int healthCheckGracePeriod -
healthCheckInterval
public int healthCheckInterval -
healthCheckTimeout
public int healthCheckTimeout -
healthyThreshold
public int healthyThreshold -
unhealthyThreshold
public int unhealthyThreshold -
region
AWS region (e.g., "us-east-1", "us-west-2") -
account
Target AWS account id to pin CDK'sEnvironment.accountto at synth time.Deliberately not a
@ConfigField—ConfigurationIntrospectorandDeploymentContextPreparerboth skip unannotated fields, so this never appears in the generated deployment-context form/schema and never gets a default resolved for it. It exists purely for callers that already know the target account programmatically (cross-account deploy: CloudForge Manager resolves this from an assumed IAM role before synthesis — seecloudforge-manager's account-connection feature, which owns every concept of "which account" beyond this bare pass-through field).When
null(the default),cloudforge-api'sCloudForgeSynthesizerfalls back toCDK_DEFAULT_ACCOUNTif set, or omits the account, producing an account-agnostic template. -
gdprDataTransferApproved
GDPR data transfer approval flag for non-EU deployments. -
availabilityZones
Availability zone suffixes for deployment (region-relative — "a" means whichever zone the deploy's own region calls "a", not a specific full zone name, since the same suffix set is valid regardless of which region gets picked elsewhere in the form). -
enableAutoScaling
Enable auto-scaling -
managerDirectDeployEnabled
Opt-in: grants CloudForge Manager's own task/instance role the direct-deploy IAM capability (CFN_DEPLOY— seeManagerAwsCapabilityCatalog), condition-scoped to CloudForge-tagged resources. Only has any effect when this deployment'sapplicationIdiscloudforge-manager; a no-op for every other application. Defaults to false — Manager deploying AWS infrastructure on a caller's behalf (viadeploy:create) is a materially broader permission grant than Manager's normal inventory/operator role, so it must be explicitly requested per deployment, not inherited automatically from IAM profile.
-
-
Constructor Details
-
DeploymentConfig
public DeploymentConfig()
-
-
Method Details
-
fromFile
Load DeploymentConfig from a JSON file (e.g., deployment-context.json).- Parameters:
path- Path to the JSON file- Returns:
- DeploymentConfig populated from JSON
- Throws:
IOException- if file cannot be read or parsed
-
fromFile
Load DeploymentConfig from a JSON file path string.- Parameters:
filePath- Path to the JSON file- Returns:
- DeploymentConfig populated from JSON
- Throws:
IOException- if file cannot be read or parsed
-
fromJson
public static DeploymentConfig fromJson(String json) throws com.fasterxml.jackson.core.JsonProcessingException Load DeploymentConfig from a JSON string.- Parameters:
json- JSON string- Returns:
- DeploymentConfig populated from JSON
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if JSON cannot be parsed
-
fromMap
Load DeploymentConfig from a Map (e.g., CDK context).Uses Jackson's type-safe conversion to handle:
- String → Enum conversion via @JsonCreator methods
- String/Number → Boolean conversion (supports "1", "yes", "0", "no")
- Comma-separated strings → List conversion (complianceFrameworks)
- Unknown properties are ignored for forward compatibility
- Parameters:
map- Map containing configuration key-value pairs- Returns:
- DeploymentConfig populated from the map
-
toJson
Serialize this DeploymentConfig to a JSON string.- Returns:
- JSON string representation
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if serialization fails
-
toFile
Save this DeploymentConfig to a JSON file.- Parameters:
path- Path to write the JSON file- Throws:
IOException- if file cannot be written
-
toFile
Save this DeploymentConfig to a JSON file path string.- Parameters:
filePath- Path to write the JSON file- Throws:
IOException- if file cannot be written
-
getComplianceFrameworksAsString
Returns the compliance frameworks as a comma-separated string. Provided for backward compatibility with code expecting the old string format.- Returns:
- comma-separated framework string (e.g., "soc2,pci-dss,hipaa")
-
hasComplianceFramework
Checks if a specific compliance framework is enabled.- Parameters:
framework- the framework to check- Returns:
- true if the framework is in the list
-
hasAnyComplianceFramework
public boolean hasAnyComplianceFramework()Checks if any compliance framework is enabled.- Returns:
- true if at least one framework is configured
-
toContextMap
-