You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Pulumi OCI provider v3.9.0 has incomplete TypeScript schema for oci.certificatesmanagement.Certificate resource's certificateConfig property, preventing users from importing external certificates with config_type: "IMPORTED".
Issues Identified:
Missing TypeScript properties for IMPORTED certificates (certificatePem, privateKeyPem, certChainPem)
import*asocifrom"@pulumi/oci";constcertificate=newoci.certificatesmanagement.Certificate("test-cert",{compartmentId: "ocid1.compartment.oc1...",name: "test-imported-certificate",certificateConfig: {configType: "IMPORTED",certificatePem: "-----BEGIN CERTIFICATE-----\n...",// ❌ TS2322: Property does not existprivateKeyPem: "-----BEGIN PRIVATE KEY-----\n...",// ❌ TS2322: Property does not existcertChainPem: "-----BEGIN CERTIFICATE-----\n...",// ❌ TS2322: Property does not exist},});
TypeScript Error:
error TS2322: Type '{ configType: string; certificatePem: string; privateKeyPem: string; }'
is not assignable to type 'Input<CertificateCertificateConfig>'.
Object literal may only specify known properties, and 'certificatePem' does not exist
in type 'Input<CertificateCertificateConfig>'.
2. Workaround with as any (Runtime Validation Error)
error: oci:CertificatesManagement/certificate:Certificate resource 'test-cert' has a problem:
expected certificate_config.0.config_type to be one of
["ISSUED_BY_INTERNAL_CA" "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA"],
got IMPORTED.
Examine values at 'test-cert.certificateConfig.configType'.
Note: This runtime error was encountered when attempting to use a custom ManagedCertificate component wrapper around the OCI resource. The provider explicitly rejects IMPORTED at runtime, not just at TypeScript compile time.
📊 Comparison: Terraform vs Pulumi
Feature
Terraform OCI v7.20.0
Pulumi OCI v3.9.0
Status
config_type: "IMPORTED"
✅ Supported
❌ Rejected
MISSING
certificate_pem property
✅ Exists
❌ Missing
MISSING
private_key_pem property
✅ Exists
❌ Missing
MISSING
cert_chain_pem property
✅ Exists
❌ Missing
MISSING
private_key_pem_passphrase
✅ Exists
❌ Missing
MISSING
Enum values in docs
✅ Documented
❌ Generic string
UNDOCUMENTED
Import external certs
✅ Works
❌ Impossible
BLOCKED
💡 Real-World Use Case: mTLS with External Certificates
Architecture Requirement:
Cloudflare Origin CA (15-year cert)
↓
OCI Certificates Service (IMPORTED) ← ❌ BLOCKED BY THIS BUG
↓
Load Balancer Listener (certificateIds + trustedCertificateAuthorityIds)
↓
mTLS enabled ✅
Why IMPORTED is Critical:
OCI Load Balancer has two certificate storage options:
The Terraform OCI provider likely uses conditional schema fields (such as ConflictsWith or ExactlyOneOf constraints) to define mutually exclusive property sets for each config_type:
ISSUED_BY_INTERNAL_CA → requires: issuer_certificate_authority_id, subject, etc.
Possible explanation: If pulumi-terraform-bridge doesn't fully handle these conditional field relationships during schema generation, it may only emit properties for one variant (ISSUED_BY_INTERNAL_CA), inadvertently omitting IMPORTED-specific properties.
This would explain why:
✅ TypeScript interface is missing IMPORTED properties
✅ Runtime validation rejects IMPORTED value
✅ Terraform (upstream) works correctly
✅ Proposed Solution
1. Fix TypeScript Schema Generation
Update CertificateCertificateConfig interface to include ALL properties from Terraform provider:
interfaceCertificateCertificateConfig{configType: pulumi.Input<"IMPORTED"|"ISSUED_BY_INTERNAL_CA"|"MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA">;// Properties for IMPORTEDcertificatePem?: pulumi.Input<string>;privateKeyPem?: pulumi.Input<string>;certChainPem?: pulumi.Input<string>;privateKeyPemPassphrase?: pulumi.Input<string>;// Properties for ISSUED_BY_INTERNAL_CAcertificateProfileType?: pulumi.Input<string>;csrPem?: pulumi.Input<string>;issuerCertificateAuthorityId?: pulumi.Input<string>;// ... rest of existing properties}
2. Fix Runtime Validation
Ensure provider accepts IMPORTED config_type at runtime (currently hardcoded to reject it).
3. Update Documentation
Show configType as enum with all valid values
Document IMPORTED-specific properties
Add example for importing external certificates
4. Investigate tfbridge Conditional Fields
Check if pulumi-terraform-bridge properly handles:
ConflictsWith relationships
ExactlyOneOf constraints
Conditional schema properties
🔧 Current Workaround (Not Ideal)
Hybrid Terraform + Pulumi:
# 1. Use Terraform to import certificatecd terraform-cert-import
terraform apply
# 2. Get OCID and pass to Pulumi
CERT_OCID=$(terraform output -raw certificate_id)
pulumi config set certificateOcid "$CERT_OCID"# 3. Reference in Pulumi
pulumi up
Problems:
❌ Requires maintaining two IaC tools
❌ Manual certificate rotation
❌ Complex deployment workflow
❌ Defeats purpose of using Pulumi
📊 Impact
This bug affects:
✅ Cloudflare Origin CA integration with OCI
✅ Let's Encrypt certificate imports
✅ Any external CA certificate imports (commercial CAs, corporate CAs, etc.)
✅ mTLS configurations on OCI Load Balancers
✅ Users migrating from Terraform to Pulumi (feature regression)
Bug Report: OCI Certificates Management Certificate - Missing IMPORTED config_type support
🐛 Bug Description
The Pulumi OCI provider v3.9.0 has incomplete TypeScript schema for
oci.certificatesmanagement.Certificateresource'scertificateConfigproperty, preventing users from importing external certificates withconfig_type: "IMPORTED".Issues Identified:
certificatePem,privateKeyPem,certChainPem)configTypefield (shown as genericstring)📦 Environment
🔍 Root Cause Analysis
1. TypeScript Interface Incomplete
Inspected
node_modules/@pulumi/oci/types/input.d.ts:Verified: Searched entire
@pulumi/ocipackage - these properties do not exist anywhere.2. Terraform OCI Provider Has Complete Schema
Source: https://docs.oracle.com/en-us/iaas/tools/terraform-provider-oci/7.0.0/docs/r/certificates_management_certificate.html
Valid
config_typevalues in Terraform:IMPORTED✅ISSUED_BY_INTERNAL_CA✅MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA✅3. Documentation Issues
Pulumi Registry: https://www.pulumi.com/registry/packages/oci/api-docs/certificatesmanagement/certificate/
Problems:
configTypeshown as genericstring(no enum values listed)certificatePem,privateKeyPem,certChainPemnot documentedExpected: Documentation should show:
🔬 Steps to Reproduce
1. Attempt to Use IMPORTED (TypeScript Error)
TypeScript Error:
2. Workaround with
as any(Runtime Validation Error)Runtime Error Observed:
Note: This runtime error was encountered when attempting to use a custom ManagedCertificate component wrapper around the OCI resource. The provider explicitly rejects IMPORTED at runtime, not just at TypeScript compile time.
📊 Comparison: Terraform vs Pulumi
config_type: "IMPORTED"certificate_pempropertyprivate_key_pempropertycert_chain_pempropertyprivate_key_pem_passphrasestring💡 Real-World Use Case: mTLS with External Certificates
Architecture Requirement:
Why IMPORTED is Critical:
OCI Load Balancer has two certificate storage options:
Load Balancer Certificate (uses
certificateNamealias)trustedCertificateAuthorityIds)TrustedCertificateAuthorityIds cannot be specified in conjunction with certificateAliasOCI Certificates Service (uses
certificateIdsOCID)trustedCertificateAuthorityIdsConclusion: Without IMPORTED support, mTLS with external certificates is impossible in Pulumi OCI.
🔍 Possible Root Cause: tfbridge Conditional Schema Fields
Related Issues in pulumi-terraform-bridge:
Working Hypothesis:
The Terraform OCI provider likely uses conditional schema fields (such as
ConflictsWithorExactlyOneOfconstraints) to define mutually exclusive property sets for eachconfig_type:IMPORTED→ requires:certificate_pem,private_key_pem,cert_chain_pemISSUED_BY_INTERNAL_CA→ requires:issuer_certificate_authority_id,subject, etc.Possible explanation: If
pulumi-terraform-bridgedoesn't fully handle these conditional field relationships during schema generation, it may only emit properties for one variant (ISSUED_BY_INTERNAL_CA), inadvertently omitting IMPORTED-specific properties.This would explain why:
✅ Proposed Solution
1. Fix TypeScript Schema Generation
Update
CertificateCertificateConfiginterface to include ALL properties from Terraform provider:2. Fix Runtime Validation
Ensure provider accepts
IMPORTEDconfig_type at runtime (currently hardcoded to reject it).3. Update Documentation
configTypeas enum with all valid values4. Investigate tfbridge Conditional Fields
Check if
pulumi-terraform-bridgeproperly handles:ConflictsWithrelationshipsExactlyOneOfconstraints🔧 Current Workaround (Not Ideal)
Hybrid Terraform + Pulumi:
Problems:
📊 Impact
This bug affects:
📎 Additional Context
Versions Confirmed:
Testing Availability:
I'm available to:
Related Documentation:
🙏 Thank You
This is a critical blocker for implementing production-grade mTLS with external certificates on OCI via Pulumi.
The bug has existed across multiple provider versions without being reported, suggesting many users may be:
Any help resolving this would be greatly appreciated! 🚀
Labels:
bug,schema,certificates,provider/oci,tfbridgePriority: High (blocks mTLS implementation, feature parity gap with Terraform)