Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version
Terraform v1.15.8
on darwin_arm64
provider registry.terraform.io/streamnative/pulsar v0.11.0
Affected Resource(s)
Terraform Configuration Files
# A tenant that already exists, but the namespace "my-tenant/missing-ns" does NOT.
resource "pulsar_permission_grant" "example" {
namespace = "my-tenant/missing-ns"
role = "my-role"
actions = ["produce", "consume"]
}
Debug Output
N/A
Panic Output
N/A
Expected Behavior
terraform plan should fail with a clear diagnostic when the grant references a namespace that does not exist, so the misconfiguration is caught at CI time, before the change is merged.
Actual Behavior
terraform plan succeeds (a false green). The failure only surfaces at terraform apply as a 404 Namespace not found error from the Pulsar API — after the change has already been merged and the CD pipeline runs.
The root cause is that pulsar_permission_grant performs no namespace-existence validation during plan. Since plan does not make live API calls for the resource, the missing dependency is silently ignored until apply.
Steps to Reproduce
- Ensure a tenant exists (e.g. my-tenant) but a namespace under it (e.g. my-tenant/missing-ns) does not.
- Declare a pulsar_permission_grant targeting my-tenant/missing-ns.
- Run terraform plan → it succeeds (no error).
- Run terraform apply → it fails with 404 Namespace not found.
Important Factoids
N/A
References
Community Note
Terraform Version
Terraform v1.15.8
on darwin_arm64
provider registry.terraform.io/streamnative/pulsar v0.11.0
Affected Resource(s)
pulsar_permission_grantTerraform Configuration Files
Debug Output
N/A
Panic Output
N/A
Expected Behavior
terraform plan should fail with a clear diagnostic when the grant references a namespace that does not exist, so the misconfiguration is caught at CI time, before the change is merged.
Actual Behavior
terraform plan succeeds (a false green). The failure only surfaces at terraform apply as a 404 Namespace not found error from the Pulsar API — after the change has already been merged and the CD pipeline runs.
The root cause is that pulsar_permission_grant performs no namespace-existence validation during plan. Since plan does not make live API calls for the resource, the missing dependency is silently ignored until apply.
Steps to Reproduce
Important Factoids
N/A
References