Pulumi Issue Report
Title
Assertion failed "Create cannot be called if the configuration is unknown" when alicloud provider returns VPC creation error
Type
Bug Report
Environment
- Pulumi CLI: v3.217.1
- Go Version: go1.24.12 linux/amd64 (also tested with go1.25.5 and go1.25.6 - same issue)
- OS: Linux (kernel 6.18.7)
- Affected Providers:
- pulumi-alicloud v3.93.0
- pulumi-kubernetes v4.24.1
- Backend: Pulumi Cloud (https://app.pulumi.com)
Description
When creating an Aliyun VPC resource, if the alicloud provider returns an error during resource creation, Pulumi crashes with an assertion failure instead of gracefully handling the provider error. The crash occurs with the message:
panic: fatal: An assertion has failed: Create cannot be called if the configuration is unknown
This results in:
- The entire pulumi up process crashing
- The stack being left in a locked state
- No clear error message about what actually went wrong with the Aliyun API call
Key Observation
- Preview: ✅ Success (28 resources planned)
- Deployment: ❌ Assertion panic when VPC creation fails
- Recovery: Requires
pulumi cancel to unlock the stack
Steps to Reproduce
- Configure a Pulumi stack with
cloud: aliyun (VPC creation mode)
- Use pulumi-alicloud provider with valid credentials
- Include at least one VPC resource:
vpc.NewNetwork(ctx, "ragflow-vpc", &vpc.NetworkArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
- Run
pulumi preview - completes successfully
- Run
pulumi up - crashes with assertion failure
Minimal Reproducible Configuration
# Pulumi.ali.yaml
config:
pulumi_ragflow:cloud: aliyun
pulumi_ragflow:region: cn-shanghai
alicloud:accessKey: <valid-access-key>
alicloud:secretKey: <valid-secret-key>
// main.go
network, err := vpc.NewNetwork(ctx, "ragflow-vpc", &vpc.NetworkArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
Actual Behavior
Console Output
Updating (ali)
View Live: https://app.pulumi.com/yuzhichang/pulumi_ragflow/ali/updates/2
+ alicloud:vpc:Network ragflow-vpc creating (0s)
error: [ERROR] terraform-provider-alicloud@v1.269.0/alicloud/resource_alicloud_vpc.go:255:
Resource alicloud_vpc CreateVpc Failed!!! [SDK alibaba-cloud-sdk-go ERROR]:
panic: fatal: An assertion has failed: Create cannot be called if the configuration is unknown
goroutine 221 [running]:
panic(...)
runtime/panic.go:802 +0x168
github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.Assertf(...)
github.com/pulumi/pulumi/sdk/v3/go/common/util/contract/assert.go:35
github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin.(*provider).Create(...)
github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider_plugin.go:1339
Stack Trace (Full)
github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*stepExecutor).worker
.../step_executor.go:661 +0x405
github.com/pulumi/pulumi/pkg/v3/resource/deploy.newStepExecutor.func3()
.../step_executor.go:730 +0x1d
github.com/pulumi/pulumi/pkg/v3/resource/deploy.PanicRecovery
.../goroutine_panic_recovery.go:44 +0x82
github.com/pulumi/pulumi/pkg/v3/resource/deploy.newStepExecutor.gowrap2()
.../step_executor.go:729 +0x25
runtime.goexit({})
runtime/asm_amd64.s:1693
Expected Behavior
- Clear error message: Display the full Aliyun SDK error instead of truncating it
- Graceful failure: Pulumi should handle provider errors without crashing
- Unlocks stack: Stack should remain usable after a provider error
- Retry capability: User should be able to fix the issue and retry without manual intervention
Actual Root Cause (Investigation)
The issue appears to be in how Pulumi's core engine handles provider errors during the Create operation:
- Aliyun provider fails to create VPC (returns error)
- Error message is truncated:
[SDK alibaba-cloud-sdk-go ERROR]: (no actual error details)
- Pulumi's assertion in
provider_plugin.go:1339 fails
- This triggers a panic instead of normal error handling
The assertion that fails:
// sdk/go/common/resource/plugin/provider_plugin.go:1339
contract.Assertf(unknown != nil, "Create cannot be called if the configuration is unknown")
Additional Context
Workaround That Works
Using cloud: existing mode (skipping VPC creation) works fine:
- Only uses Kubernetes provider
- No Aliyun VPC resources
- Deploys successfully
What Doesn't Work
- Downgrading Go versions (tested: 1.24.12, 1.25.5, 1.25.6)
- Different Pulumi versions (v3.217.0, v3.217.1)
- Reconfiguring Aliyun credentials
Impact
- Severity: High - Blocks deployment entirely
- Frequency: 100% reproducible when Aliyun VPC creation fails
- Affected Users: Anyone using pulumi-alicloud provider with VPC resources
Related Issues
Log Output
Full panic dump and goroutine traces are available in the attached file.
Suggested Fix
The issue should be fixed in the Pulumi core engine's error handling:
- Remove assertion or add better error handling in
provider_plugin.go:1339
- Propagate provider errors instead of panicking when configuration is unknown
- Display full error messages from providers (currently truncated)
- Keep stack unlocked when provider operations fail
The code location that needs fixing:
// File: sdk/go/common/resource/plugin/provider_plugin.go
// Line: ~1339
// Current code:
contract.Assertf(unknown != nil, "Create cannot be called if the configuration is unknown")
// Suggested fix:
if unknown == nil {
return nil, errors.New("provider failed to return resource configuration")
}
Would you like me to:
- Test with different provider versions?
- Provide additional diagnostic information?
- Test the fix once available?
Pulumi Issue Report
Title
Assertion failed "Create cannot be called if the configuration is unknown" when alicloud provider returns VPC creation error
Type
Bug Report
Environment
Description
When creating an Aliyun VPC resource, if the alicloud provider returns an error during resource creation, Pulumi crashes with an assertion failure instead of gracefully handling the provider error. The crash occurs with the message:
This results in:
Key Observation
pulumi cancelto unlock the stackSteps to Reproduce
cloud: aliyun(VPC creation mode)pulumi preview- completes successfullypulumi up- crashes with assertion failureMinimal Reproducible Configuration
Actual Behavior
Console Output
Stack Trace (Full)
Expected Behavior
Actual Root Cause (Investigation)
The issue appears to be in how Pulumi's core engine handles provider errors during the Create operation:
[SDK alibaba-cloud-sdk-go ERROR]:(no actual error details)provider_plugin.go:1339failsThe assertion that fails:
Additional Context
Workaround That Works
Using
cloud: existingmode (skipping VPC creation) works fine:What Doesn't Work
Impact
Related Issues
Log Output
Full panic dump and goroutine traces are available in the attached file.
Suggested Fix
The issue should be fixed in the Pulumi core engine's error handling:
provider_plugin.go:1339The code location that needs fixing:
Would you like me to: