@go-to-k/cdkd 0.152.2 → 0.154.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/dist/cli.js +33 -5
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-C4yMO329.js → deploy-engine-Yb3E5e9J.js} +318 -2
- package/dist/deploy-engine-Yb3E5e9J.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-C4yMO329.js.map +0 -1
|
@@ -5423,6 +5423,69 @@ async function applyRoleArnIfSet(opts) {
|
|
|
5423
5423
|
* This is used for conditional property omission in CloudFormation templates.
|
|
5424
5424
|
*/
|
|
5425
5425
|
const AWS_NO_VALUE = Symbol("AWS::NoValue");
|
|
5426
|
+
/**
|
|
5427
|
+
* Intrinsic-function keys the resolver knows how to handle.
|
|
5428
|
+
*
|
|
5429
|
+
* A CloudFormation intrinsic is ALWAYS a single-key object — `{ "Ref": ... }`
|
|
5430
|
+
* or `{ "Fn::X": ... }`. When `resolveValue` encounters a single-key object
|
|
5431
|
+
* whose key is `Ref` or starts with `Fn::` but is NOT in this set, it throws
|
|
5432
|
+
* (rather than silently passing the broken value through to the provider).
|
|
5433
|
+
*
|
|
5434
|
+
* `Fn::Transform` (CloudFormation macros) is intentionally treated as handled:
|
|
5435
|
+
* it is expanded server-side at the SYNTHESIS layer (see
|
|
5436
|
+
* `src/synthesis/macro-expander.ts`, routed via `Synthesizer`) BEFORE the
|
|
5437
|
+
* resolver ever runs, so by resolution time it should already be gone. Listing
|
|
5438
|
+
* it here keeps a stray (already-expanded) occurrence from hard-erroring.
|
|
5439
|
+
*/
|
|
5440
|
+
const HANDLED_INTRINSIC_KEYS = new Set([
|
|
5441
|
+
"Ref",
|
|
5442
|
+
"Fn::GetAtt",
|
|
5443
|
+
"Fn::Join",
|
|
5444
|
+
"Fn::Sub",
|
|
5445
|
+
"Fn::Select",
|
|
5446
|
+
"Fn::Split",
|
|
5447
|
+
"Fn::If",
|
|
5448
|
+
"Fn::Equals",
|
|
5449
|
+
"Fn::And",
|
|
5450
|
+
"Fn::Or",
|
|
5451
|
+
"Fn::Not",
|
|
5452
|
+
"Fn::ImportValue",
|
|
5453
|
+
"Fn::GetStackOutput",
|
|
5454
|
+
"Fn::FindInMap",
|
|
5455
|
+
"Fn::Base64",
|
|
5456
|
+
"Fn::GetAZs",
|
|
5457
|
+
"Fn::Cidr",
|
|
5458
|
+
"Fn::Transform"
|
|
5459
|
+
]);
|
|
5460
|
+
/**
|
|
5461
|
+
* Detect an unresolved / unknown CloudFormation intrinsic function.
|
|
5462
|
+
*
|
|
5463
|
+
* A CloudFormation intrinsic is ALWAYS a single-key object whose key is `Ref`
|
|
5464
|
+
* or starts with `Fn::`. Requiring EXACTLY ONE key avoids false positives on a
|
|
5465
|
+
* real resource property that happens to be literally named `Ref` or
|
|
5466
|
+
* `Fn::Something` (those would be multi-key objects, or sit alongside sibling
|
|
5467
|
+
* keys), so only a genuine lone intrinsic node is flagged.
|
|
5468
|
+
*
|
|
5469
|
+
* @returns the unknown intrinsic key (e.g. `Fn::ToJsonString`) or `undefined`
|
|
5470
|
+
* when the object is not an unknown single-key intrinsic.
|
|
5471
|
+
*/
|
|
5472
|
+
function detectUnknownIntrinsicKey(obj) {
|
|
5473
|
+
const keys = Object.keys(obj);
|
|
5474
|
+
if (keys.length !== 1) return;
|
|
5475
|
+
const key = keys[0];
|
|
5476
|
+
if (key !== "Ref" && !key.startsWith("Fn::")) return;
|
|
5477
|
+
if (HANDLED_INTRINSIC_KEYS.has(key)) return;
|
|
5478
|
+
return key;
|
|
5479
|
+
}
|
|
5480
|
+
/**
|
|
5481
|
+
* Build a clear, English error message for an unsupported intrinsic, including
|
|
5482
|
+
* a one-click pre-filled GitHub issue link so users can request support.
|
|
5483
|
+
*/
|
|
5484
|
+
function buildUnknownIntrinsicError(key) {
|
|
5485
|
+
const title = `Support intrinsic ${key}`;
|
|
5486
|
+
const issueUrl = `https://github.com/go-to-k/cdkd/issues/new?title=${encodeURIComponent(title)}&labels=intrinsic-support`;
|
|
5487
|
+
return /* @__PURE__ */ new Error(`Unsupported CloudFormation intrinsic function "${key}": cdkd does not support resolving it yet. Deploying this template would produce a broken value. Please request support by opening an issue: ${issueUrl}`);
|
|
5488
|
+
}
|
|
5426
5489
|
let cachedAccountInfo = null;
|
|
5427
5490
|
/**
|
|
5428
5491
|
* Cache for availability zones per region
|
|
@@ -5588,6 +5651,8 @@ var IntrinsicFunctionResolver = class {
|
|
|
5588
5651
|
if ("Fn::Base64" in obj) return await this.resolveBase64(obj["Fn::Base64"], context);
|
|
5589
5652
|
if ("Fn::GetAZs" in obj) return await this.resolveGetAZs(obj["Fn::GetAZs"], context);
|
|
5590
5653
|
if ("Fn::Cidr" in obj) return await this.resolveCidr(obj["Fn::Cidr"], context);
|
|
5654
|
+
const unknownIntrinsicKey = detectUnknownIntrinsicKey(obj);
|
|
5655
|
+
if (unknownIntrinsicKey !== void 0) throw buildUnknownIntrinsicError(unknownIntrinsicKey);
|
|
5591
5656
|
const resolved = {};
|
|
5592
5657
|
for (const [key, val] of Object.entries(obj)) {
|
|
5593
5658
|
const resolvedVal = await this.resolveValue(val, context);
|
|
@@ -6683,6 +6748,231 @@ function assertRegionMatch(clientRegion, expectedRegion, resourceType, logicalId
|
|
|
6683
6748
|
if (clientRegion !== expectedRegion) throw new ProvisioningError(`Refusing to treat NotFound as idempotent delete success for ${logicalId} (${resourceType}): AWS client region ${clientRegion} does not match stack state region ${expectedRegion}. The resource likely still exists in ${expectedRegion}; rerun the destroy with the correct region (e.g. --region ${expectedRegion}).`, resourceType, logicalId, physicalId);
|
|
6684
6749
|
}
|
|
6685
6750
|
|
|
6751
|
+
//#endregion
|
|
6752
|
+
//#region src/provisioning/unsupported-types.generated.ts
|
|
6753
|
+
/**
|
|
6754
|
+
* AUTO-GENERATED by scripts/gen-unsupported-types.ts — DO NOT EDIT BY HAND.
|
|
6755
|
+
* Source: docs/_generated/provider-coverage.json (tier3).
|
|
6756
|
+
* Regenerate: `vp run gen:unsupported-types`.
|
|
6757
|
+
*
|
|
6758
|
+
* AWS CloudFormation resource types AWS reports as
|
|
6759
|
+
* `ProvisioningType: NON_PROVISIONABLE` (Cloud Control API cannot
|
|
6760
|
+
* create/update/delete them) and for which cdkd has no SDK provider. cdkd
|
|
6761
|
+
* pre-flight rejects these fast with an actionable message instead of letting
|
|
6762
|
+
* the optimistic Cloud Control fallthrough fail mid-deploy.
|
|
6763
|
+
*/
|
|
6764
|
+
const NON_PROVISIONABLE_TYPES = new Set([
|
|
6765
|
+
"Alexa::ASK::Skill",
|
|
6766
|
+
"AWS::AmazonMQ::ConfigurationAssociation",
|
|
6767
|
+
"AWS::ApiGatewayV2::ApiGatewayManagedOverrides",
|
|
6768
|
+
"AWS::AppMesh::GatewayRoute",
|
|
6769
|
+
"AWS::AppMesh::Mesh",
|
|
6770
|
+
"AWS::AppMesh::Route",
|
|
6771
|
+
"AWS::AppMesh::VirtualGateway",
|
|
6772
|
+
"AWS::AppMesh::VirtualNode",
|
|
6773
|
+
"AWS::AppMesh::VirtualRouter",
|
|
6774
|
+
"AWS::AppMesh::VirtualService",
|
|
6775
|
+
"AWS::AppStream::Fleet",
|
|
6776
|
+
"AWS::AppStream::StackFleetAssociation",
|
|
6777
|
+
"AWS::AppStream::StackUserAssociation",
|
|
6778
|
+
"AWS::AppStream::User",
|
|
6779
|
+
"AWS::AppSync::ApiCache",
|
|
6780
|
+
"AWS::AutoScalingPlans::ScalingPlan",
|
|
6781
|
+
"AWS::BedrockAgentCore::Browser",
|
|
6782
|
+
"AWS::Budgets::Budget",
|
|
6783
|
+
"AWS::CertificateManager::Certificate",
|
|
6784
|
+
"AWS::Cloud9::EnvironmentEC2",
|
|
6785
|
+
"AWS::CloudFormation::CustomResource",
|
|
6786
|
+
"AWS::CloudFormation::Macro",
|
|
6787
|
+
"AWS::CloudFormation::WaitCondition",
|
|
6788
|
+
"AWS::CloudFormation::WaitConditionHandle",
|
|
6789
|
+
"AWS::CloudFront::StreamingDistribution",
|
|
6790
|
+
"AWS::CloudWatch::AnomalyDetector",
|
|
6791
|
+
"AWS::CloudWatch::InsightRule",
|
|
6792
|
+
"AWS::CodeBuild::ReportGroup",
|
|
6793
|
+
"AWS::CodeBuild::SourceCredential",
|
|
6794
|
+
"AWS::CodeCommit::Repository",
|
|
6795
|
+
"AWS::CodeStar::GitHubRepository",
|
|
6796
|
+
"AWS::Config::ConfigurationRecorder",
|
|
6797
|
+
"AWS::Config::DeliveryChannel",
|
|
6798
|
+
"AWS::Config::OrganizationConfigRule",
|
|
6799
|
+
"AWS::Config::RemediationConfiguration",
|
|
6800
|
+
"AWS::DataZone::ProjectProfile",
|
|
6801
|
+
"AWS::DAX::Cluster",
|
|
6802
|
+
"AWS::DAX::ParameterGroup",
|
|
6803
|
+
"AWS::DAX::SubnetGroup",
|
|
6804
|
+
"AWS::Deadline::Limit",
|
|
6805
|
+
"AWS::Deadline::QueueFleetAssociation",
|
|
6806
|
+
"AWS::DirectoryService::MicrosoftAD",
|
|
6807
|
+
"AWS::DLM::LifecyclePolicy",
|
|
6808
|
+
"AWS::DMS::Certificate",
|
|
6809
|
+
"AWS::DMS::Endpoint",
|
|
6810
|
+
"AWS::DMS::EventSubscription",
|
|
6811
|
+
"AWS::DMS::ReplicationInstance",
|
|
6812
|
+
"AWS::DMS::ReplicationSubnetGroup",
|
|
6813
|
+
"AWS::DMS::ReplicationTask",
|
|
6814
|
+
"AWS::DocDB::DBClusterParameterGroup",
|
|
6815
|
+
"AWS::DocDB::EventSubscription",
|
|
6816
|
+
"AWS::EC2::ClientVpnAuthorizationRule",
|
|
6817
|
+
"AWS::EC2::ClientVpnEndpoint",
|
|
6818
|
+
"AWS::EC2::ClientVpnRoute",
|
|
6819
|
+
"AWS::EC2::ClientVpnTargetNetworkAssociation",
|
|
6820
|
+
"AWS::EC2::NetworkInterfacePermission",
|
|
6821
|
+
"AWS::EC2::VPNGatewayRoutePropagation",
|
|
6822
|
+
"AWS::ElastiCache::SecurityGroup",
|
|
6823
|
+
"AWS::ElastiCache::SecurityGroupIngress",
|
|
6824
|
+
"AWS::ElasticLoadBalancing::LoadBalancer",
|
|
6825
|
+
"AWS::ElasticLoadBalancingV2::ListenerCertificate",
|
|
6826
|
+
"AWS::Elasticsearch::Domain",
|
|
6827
|
+
"AWS::EMR::Cluster",
|
|
6828
|
+
"AWS::EMR::InstanceFleetConfig",
|
|
6829
|
+
"AWS::EMR::InstanceGroupConfig",
|
|
6830
|
+
"AWS::FSx::FileSystem",
|
|
6831
|
+
"AWS::FSx::Snapshot",
|
|
6832
|
+
"AWS::FSx::StorageVirtualMachine",
|
|
6833
|
+
"AWS::FSx::Volume",
|
|
6834
|
+
"AWS::Glue::Classifier",
|
|
6835
|
+
"AWS::Glue::CustomEntityType",
|
|
6836
|
+
"AWS::Glue::DataCatalogEncryptionSettings",
|
|
6837
|
+
"AWS::Glue::DataQualityRuleset",
|
|
6838
|
+
"AWS::Glue::DevEndpoint",
|
|
6839
|
+
"AWS::Glue::MLTransform",
|
|
6840
|
+
"AWS::Glue::Partition",
|
|
6841
|
+
"AWS::Glue::TableOptimizer",
|
|
6842
|
+
"AWS::Greengrass::ConnectorDefinition",
|
|
6843
|
+
"AWS::Greengrass::ConnectorDefinitionVersion",
|
|
6844
|
+
"AWS::Greengrass::CoreDefinition",
|
|
6845
|
+
"AWS::Greengrass::CoreDefinitionVersion",
|
|
6846
|
+
"AWS::Greengrass::DeviceDefinition",
|
|
6847
|
+
"AWS::Greengrass::DeviceDefinitionVersion",
|
|
6848
|
+
"AWS::Greengrass::FunctionDefinition",
|
|
6849
|
+
"AWS::Greengrass::FunctionDefinitionVersion",
|
|
6850
|
+
"AWS::Greengrass::Group",
|
|
6851
|
+
"AWS::Greengrass::GroupVersion",
|
|
6852
|
+
"AWS::Greengrass::LoggerDefinition",
|
|
6853
|
+
"AWS::Greengrass::LoggerDefinitionVersion",
|
|
6854
|
+
"AWS::Greengrass::ResourceDefinition",
|
|
6855
|
+
"AWS::Greengrass::ResourceDefinitionVersion",
|
|
6856
|
+
"AWS::Greengrass::SubscriptionDefinition",
|
|
6857
|
+
"AWS::Greengrass::SubscriptionDefinitionVersion",
|
|
6858
|
+
"AWS::IAM::AccessKey",
|
|
6859
|
+
"AWS::IoT::PolicyPrincipalAttachment",
|
|
6860
|
+
"AWS::IoT::ThingPrincipalAttachment",
|
|
6861
|
+
"AWS::IoTThingsGraph::FlowTemplate",
|
|
6862
|
+
"AWS::KinesisAnalytics::Application",
|
|
6863
|
+
"AWS::KinesisAnalytics::ApplicationOutput",
|
|
6864
|
+
"AWS::KinesisAnalytics::ApplicationReferenceDataSource",
|
|
6865
|
+
"AWS::KinesisAnalyticsV2::ApplicationCloudWatchLoggingOption",
|
|
6866
|
+
"AWS::KinesisAnalyticsV2::ApplicationOutput",
|
|
6867
|
+
"AWS::KinesisAnalyticsV2::ApplicationReferenceDataSource",
|
|
6868
|
+
"AWS::LakeFormation::DataLakeSettings",
|
|
6869
|
+
"AWS::LakeFormation::Permissions",
|
|
6870
|
+
"AWS::LakeFormation::Resource",
|
|
6871
|
+
"AWS::ManagedBlockchain::Member",
|
|
6872
|
+
"AWS::ManagedBlockchain::Node",
|
|
6873
|
+
"AWS::MediaConvert::JobTemplate",
|
|
6874
|
+
"AWS::MediaConvert::Preset",
|
|
6875
|
+
"AWS::MediaConvert::Queue",
|
|
6876
|
+
"AWS::MediaLive::Channel",
|
|
6877
|
+
"AWS::MediaLive::Input",
|
|
6878
|
+
"AWS::MediaLive::InputSecurityGroup",
|
|
6879
|
+
"AWS::MediaStore::Container",
|
|
6880
|
+
"AWS::OpsWorks::App",
|
|
6881
|
+
"AWS::OpsWorks::ElasticLoadBalancerAttachment",
|
|
6882
|
+
"AWS::OpsWorks::Instance",
|
|
6883
|
+
"AWS::OpsWorks::Layer",
|
|
6884
|
+
"AWS::OpsWorks::Stack",
|
|
6885
|
+
"AWS::OpsWorks::UserProfile",
|
|
6886
|
+
"AWS::OpsWorks::Volume",
|
|
6887
|
+
"AWS::Pinpoint::ADMChannel",
|
|
6888
|
+
"AWS::Pinpoint::APNSChannel",
|
|
6889
|
+
"AWS::Pinpoint::APNSSandboxChannel",
|
|
6890
|
+
"AWS::Pinpoint::APNSVoipChannel",
|
|
6891
|
+
"AWS::Pinpoint::APNSVoipSandboxChannel",
|
|
6892
|
+
"AWS::Pinpoint::App",
|
|
6893
|
+
"AWS::Pinpoint::ApplicationSettings",
|
|
6894
|
+
"AWS::Pinpoint::BaiduChannel",
|
|
6895
|
+
"AWS::Pinpoint::Campaign",
|
|
6896
|
+
"AWS::Pinpoint::EmailChannel",
|
|
6897
|
+
"AWS::Pinpoint::EmailTemplate",
|
|
6898
|
+
"AWS::Pinpoint::EventStream",
|
|
6899
|
+
"AWS::Pinpoint::GCMChannel",
|
|
6900
|
+
"AWS::Pinpoint::PushTemplate",
|
|
6901
|
+
"AWS::Pinpoint::Segment",
|
|
6902
|
+
"AWS::Pinpoint::SMSChannel",
|
|
6903
|
+
"AWS::Pinpoint::SmsTemplate",
|
|
6904
|
+
"AWS::Pinpoint::VoiceChannel",
|
|
6905
|
+
"AWS::PinpointEmail::ConfigurationSet",
|
|
6906
|
+
"AWS::PinpointEmail::ConfigurationSetEventDestination",
|
|
6907
|
+
"AWS::PinpointEmail::DedicatedIpPool",
|
|
6908
|
+
"AWS::PinpointEmail::Identity",
|
|
6909
|
+
"AWS::QLDB::Ledger",
|
|
6910
|
+
"AWS::RDS::DBSecurityGroup",
|
|
6911
|
+
"AWS::RDS::DBSecurityGroupIngress",
|
|
6912
|
+
"AWS::Redshift::ClusterSecurityGroup",
|
|
6913
|
+
"AWS::Redshift::ClusterSecurityGroupIngress",
|
|
6914
|
+
"AWS::Route53::RecordSetGroup",
|
|
6915
|
+
"AWS::SageMaker::CodeRepository",
|
|
6916
|
+
"AWS::SageMaker::EndpointConfig",
|
|
6917
|
+
"AWS::SageMaker::NotebookInstance",
|
|
6918
|
+
"AWS::SageMaker::NotebookInstanceLifecycleConfig",
|
|
6919
|
+
"AWS::SageMaker::Workteam",
|
|
6920
|
+
"AWS::SDB::Domain",
|
|
6921
|
+
"AWS::ServiceCatalog::AcceptedPortfolioShare",
|
|
6922
|
+
"AWS::ServiceCatalog::CloudFormationProduct",
|
|
6923
|
+
"AWS::ServiceDiscovery::HttpNamespace",
|
|
6924
|
+
"AWS::ServiceDiscovery::Instance",
|
|
6925
|
+
"AWS::ServiceDiscovery::PublicDnsNamespace",
|
|
6926
|
+
"AWS::SES::ReceiptFilter",
|
|
6927
|
+
"AWS::SES::ReceiptRule",
|
|
6928
|
+
"AWS::SES::ReceiptRuleSet",
|
|
6929
|
+
"AWS::WAF::ByteMatchSet",
|
|
6930
|
+
"AWS::WAF::IPSet",
|
|
6931
|
+
"AWS::WAF::Rule",
|
|
6932
|
+
"AWS::WAF::SizeConstraintSet",
|
|
6933
|
+
"AWS::WAF::SqlInjectionMatchSet",
|
|
6934
|
+
"AWS::WAF::WebACL",
|
|
6935
|
+
"AWS::WAF::XssMatchSet",
|
|
6936
|
+
"AWS::WAFRegional::ByteMatchSet",
|
|
6937
|
+
"AWS::WAFRegional::GeoMatchSet",
|
|
6938
|
+
"AWS::WAFRegional::IPSet",
|
|
6939
|
+
"AWS::WAFRegional::RateBasedRule",
|
|
6940
|
+
"AWS::WAFRegional::RegexPatternSet",
|
|
6941
|
+
"AWS::WAFRegional::Rule",
|
|
6942
|
+
"AWS::WAFRegional::SizeConstraintSet",
|
|
6943
|
+
"AWS::WAFRegional::SqlInjectionMatchSet",
|
|
6944
|
+
"AWS::WAFRegional::WebACL",
|
|
6945
|
+
"AWS::WAFRegional::WebACLAssociation",
|
|
6946
|
+
"AWS::WAFRegional::XssMatchSet"
|
|
6947
|
+
]);
|
|
6948
|
+
|
|
6949
|
+
//#endregion
|
|
6950
|
+
//#region src/provisioning/unsupported-types.ts
|
|
6951
|
+
/**
|
|
6952
|
+
* Helpers for cdkd's genuinely-unsupported resource types.
|
|
6953
|
+
*
|
|
6954
|
+
* The data ({@link NON_PROVISIONABLE_TYPES}) is generated from the
|
|
6955
|
+
* provider-coverage audit (`vp run gen:unsupported-types`); this module adds
|
|
6956
|
+
* the runtime predicates + the actionable issue link used by the pre-flight
|
|
6957
|
+
* check (see {@link ../provisioning/provider-registry.ProviderRegistry.validateResourceTypes}).
|
|
6958
|
+
*/
|
|
6959
|
+
/**
|
|
6960
|
+
* True if AWS reports the type as `ProvisioningType: NON_PROVISIONABLE`
|
|
6961
|
+
* (Cloud Control API cannot create/update/delete it) and cdkd has no SDK
|
|
6962
|
+
* provider for it.
|
|
6963
|
+
*/
|
|
6964
|
+
function isNonProvisionable(resourceType) {
|
|
6965
|
+
return NON_PROVISIONABLE_TYPES.has(resourceType);
|
|
6966
|
+
}
|
|
6967
|
+
/**
|
|
6968
|
+
* A 1-click pre-filled GitHub issue link requesting cdkd support for a
|
|
6969
|
+
* resource type. Surfaced in the pre-flight error so a user hitting an
|
|
6970
|
+
* unsupported type lands directly in the "request support" flow.
|
|
6971
|
+
*/
|
|
6972
|
+
function unsupportedTypeIssueUrl(resourceType) {
|
|
6973
|
+
return `https://github.com/go-to-k/cdkd/issues/new?title=${encodeURIComponent(`Support resource type ${resourceType}`)}&labels=resource-support`;
|
|
6974
|
+
}
|
|
6975
|
+
|
|
6686
6976
|
//#endregion
|
|
6687
6977
|
//#region src/provisioning/cloud-control-provider.ts
|
|
6688
6978
|
/**
|
|
@@ -7058,6 +7348,7 @@ var CloudControlProvider = class {
|
|
|
7058
7348
|
"AWS::CertificateManager::Certificate"
|
|
7059
7349
|
]).has(resourceType)) return false;
|
|
7060
7350
|
if (resourceType.startsWith("Custom::") || resourceType.startsWith("AWS::CloudFormation::CustomResource")) return false;
|
|
7351
|
+
if (isNonProvisionable(resourceType)) return false;
|
|
7061
7352
|
return resourceType.startsWith("AWS::");
|
|
7062
7353
|
}
|
|
7063
7354
|
/**
|
|
@@ -7685,11 +7976,25 @@ var ProviderRegistry = class {
|
|
|
7685
7976
|
cloudControlProvider;
|
|
7686
7977
|
customResourceProvider;
|
|
7687
7978
|
skipResourceTypes = /* @__PURE__ */ new Set();
|
|
7979
|
+
allowedUnsupportedTypes = /* @__PURE__ */ new Set();
|
|
7688
7980
|
constructor() {
|
|
7689
7981
|
this.cloudControlProvider = new CloudControlProvider();
|
|
7690
7982
|
this.customResourceProvider = new CustomResourceProvider();
|
|
7691
7983
|
}
|
|
7692
7984
|
/**
|
|
7985
|
+
* Escape hatch for the `--allow-unsupported-types` CLI flag. Named types
|
|
7986
|
+
* bypass the pre-flight unsupported-type rejection and are routed through
|
|
7987
|
+
* Cloud Control optimistically (which will likely still fail for genuinely
|
|
7988
|
+
* NON_PROVISIONABLE types — but the choice is the user's). Per-type rather
|
|
7989
|
+
* than a blanket flag so the user explicitly acknowledges each type.
|
|
7990
|
+
*/
|
|
7991
|
+
allowUnsupportedTypes(resourceTypes) {
|
|
7992
|
+
for (const resourceType of resourceTypes) {
|
|
7993
|
+
this.allowedUnsupportedTypes.add(resourceType);
|
|
7994
|
+
this.logger.debug(`Allowing unsupported resource type via escape hatch: ${resourceType}`);
|
|
7995
|
+
}
|
|
7996
|
+
}
|
|
7997
|
+
/**
|
|
7693
7998
|
* Configure the response bucket for custom resources
|
|
7694
7999
|
* This allows Lambda handlers using cfn-response to send responses via S3
|
|
7695
8000
|
*/
|
|
@@ -7749,6 +8054,10 @@ var ProviderRegistry = class {
|
|
|
7749
8054
|
this.logger.debug(`Using Custom Resource provider for ${resourceType}`);
|
|
7750
8055
|
return this.customResourceProvider;
|
|
7751
8056
|
}
|
|
8057
|
+
if (this.allowedUnsupportedTypes.has(resourceType)) {
|
|
8058
|
+
this.logger.debug(`Routing escape-hatch-allowed type ${resourceType} through Cloud Control API`);
|
|
8059
|
+
return this.cloudControlProvider;
|
|
8060
|
+
}
|
|
7752
8061
|
throw new Error(`No provider available for resource type: ${resourceType}. This resource type is not supported by Cloud Control API and no SDK provider is registered.`);
|
|
7753
8062
|
}
|
|
7754
8063
|
/**
|
|
@@ -7762,6 +8071,7 @@ var ProviderRegistry = class {
|
|
|
7762
8071
|
*/
|
|
7763
8072
|
hasProvider(resourceType) {
|
|
7764
8073
|
if (this.shouldSkipResource(resourceType)) return true;
|
|
8074
|
+
if (this.allowedUnsupportedTypes.has(resourceType)) return true;
|
|
7765
8075
|
return this.providers.has(resourceType) || CloudControlProvider.isSupportedResourceType(resourceType) || resourceType.startsWith("Custom::") || resourceType === "AWS::CloudFormation::CustomResource";
|
|
7766
8076
|
}
|
|
7767
8077
|
/**
|
|
@@ -7784,6 +8094,7 @@ var ProviderRegistry = class {
|
|
|
7784
8094
|
getProviderType(resourceType) {
|
|
7785
8095
|
if (this.providers.has(resourceType)) return "sdk";
|
|
7786
8096
|
if (CloudControlProvider.isSupportedResourceType(resourceType)) return "cloud-control";
|
|
8097
|
+
if (this.allowedUnsupportedTypes.has(resourceType)) return "cloud-control";
|
|
7787
8098
|
return null;
|
|
7788
8099
|
}
|
|
7789
8100
|
/**
|
|
@@ -7797,7 +8108,12 @@ var ProviderRegistry = class {
|
|
|
7797
8108
|
validateResourceTypes(resourceTypes) {
|
|
7798
8109
|
const unsupportedTypes = [];
|
|
7799
8110
|
for (const resourceType of resourceTypes) if (!this.hasProvider(resourceType)) unsupportedTypes.push(resourceType);
|
|
7800
|
-
if (unsupportedTypes.length > 0)
|
|
8111
|
+
if (unsupportedTypes.length > 0) {
|
|
8112
|
+
const details = unsupportedTypes.map((type) => {
|
|
8113
|
+
return ` - ${type}\n ${isNonProvisionable(type) ? "AWS reports this type as NON_PROVISIONABLE (Cloud Control API cannot manage it) and cdkd has no SDK provider for it." : "cdkd does not currently support this type — no SDK provider is registered, and the type is either on cdkd's Cloud Control blocklist (pending a dedicated SDK provider) or is not an AWS:: namespace."}\n Request support: ${unsupportedTypeIssueUrl(type)}`;
|
|
8114
|
+
}).join("\n");
|
|
8115
|
+
throw new Error(`The following resource types are not supported by cdkd:\n` + details + `\n\nTo attempt deployment anyway (Cloud Control will likely fail for NON_PROVISIONABLE types), re-run with: --allow-unsupported-types ${unsupportedTypes.join(",")}`);
|
|
8116
|
+
}
|
|
7801
8117
|
this.logger.debug(`Validated ${resourceTypes.size} resource types: all have available providers`);
|
|
7802
8118
|
}
|
|
7803
8119
|
};
|
|
@@ -10000,4 +10316,4 @@ var DeployEngine = class {
|
|
|
10000
10316
|
|
|
10001
10317
|
//#endregion
|
|
10002
10318
|
export { CdkdError as $, shouldRetainResource as A, resolveSkipPrefix as B, IntrinsicFunctionResolver as C, TemplateParser as D, DagBuilder as E, Synthesizer as F, CFN_TEMPLATE_URL_LIMIT as G, resolveStateBucketWithDefaultAndSource as H, getDefaultStateBucketName as I, uploadCfnTemplate as J, MIGRATE_TMP_PREFIX as K, getLegacyStateBucketName as L, stringifyValue as M, WorkGraph as N, LockManager as O, buildDockerImage as P, AssetError as Q, resolveApp as R, assertRegionMatch as S, DiffCalculator as T, warnDeprecatedNoPrefixCliFlag as U, resolveStateBucketWithDefault as V, CFN_TEMPLATE_BODY_LIMIT as W, clearBucketRegionCache as X, AssemblyReader as Y, resolveBucketRegion as Z, matchesCdkPath as _, formatError as _t, withRetry as a, LockError as at, ProviderRegistry as b, withErrorHandling as bt, bold as c, PartialFailureError as ct, green as d, ResourceUpdateNotSupportedError as dt, ConfigError as et, red as f, RouteDiscoveryError as ft, CDK_PATH_TAG as g, SynthesisError as gt, collectInlinePolicyNamesManagedBySiblings as h, StateError as ht, withResourceDeadline as i, LocalStartServiceError as it, AssetPublisher as j, S3StateBackend as k, cyan as l, ProvisioningError as lt, IAMRoleProvider as m, StackTerminationProtectionError as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, LocalInvokeBuildError as nt, IMPLICIT_DELETE_DEPENDENCIES as o, MissingCdkCliError as ot, yellow as p, StackHasActiveImportsError as pt, findLargeInlineResources as q, DeployEngine as r, LocalMigrateError as rt, formatResourceLine as s, NestedStackChildDirectDestroyError as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, DependencyError as tt, gray as u, ResourceTimeoutError as ut, normalizeAwsTagsToCfn as v, isCdkdError as vt, applyRoleArnIfSet as w, CloudControlProvider as x, resolveExplicitPhysicalId as y, normalizeAwsError as yt, resolveCaptureObservedState as z };
|
|
10003
|
-
//# sourceMappingURL=deploy-engine-
|
|
10319
|
+
//# sourceMappingURL=deploy-engine-Yb3E5e9J.js.map
|