Importing custom resource fails with unknown resource type error
See original GitHub issueWhile trying to import a redis
custom resource to pulumi
I’m getting an unknown resource type
error.
Expected behavior
Importing the resource should work
Current behavior
Trying to import the resource via the cli
or json
file always results in error and failure to import.
Steps to reproduce
- Install amaizfinance/redis-operator - download the
deploy
directory and runkubectl apply -k deploy/
- Create an example
redis
instance -kubectl apply -f https://raw.githubusercontent.com/amaizfinance/redis-operator/master/example/k8s_v1alpha1_redis_cr.yaml
- Try to import to
pulumi
-pulumi import kubernetes:k8s.amaiz.com/v1alpha1:Redis example example
Always throws the same error:
Previewing import (dev):
Type Name Plan Info
pulumi:pulumi:Stack redis-dev 1 error
= └─ kubernetes:k8s.amaiz.com/v1alpha1:Redis example import 1 error
Diagnostics:
kubernetes:k8s.amaiz.com/v1alpha1:Redis (example):
error: Preview failed: unknown resource type 'kubernetes:k8s.amaiz.com/v1alpha1:Redis'
pulumi:pulumi:Stack (redis-dev):
error: preview failed
This seems to happen just on import. While using crd2pulumi
and creating a programmatic instance of redis
, pulumi
is able to create and manage the resource just fine.
pulumi
version - v2.23.1
pulumi-kubernetes
- 2.8.3
go
- 1.16.2
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Puppet : Custom resource creation failed - Server Fault
Show activity on this post. I have tried to create a custom resource type on Puppet which creates a file. However, after adding...
Read more >CloudFormation template error: Custom Resource is ... - GitHub
Referencing a Custom resource with a custom type in a JSON CloudFormation template shows an error that the resources is an unknown resource...
Read more >Resolve change set errors in CloudFormation - Amazon AWS
This error is thrown when an existing resource is modified during a resource import operation. During an import operation, create, update, and ...
Read more >Top 10 Serverless Deployment Errors (and How to Fix Them)
Failed to provision resources for stack. A failure occured for CloudFormation resource '<resource-name>' of type 'AWS::Batch::ComputeEnvironment ...
Read more >Error messages - Resource Manager - Google Cloud
The request failed because it is trying to execute an unknown method or operation. SERVICE_UNAVAILABLE (503). Error code, Description. backendError, A backend ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Can confirm that using that using the
import
option on the resource allows to import the resource properly topulumi
. Thanks for the help @lblackstone.I would still love to see it working using the
cli
but programmaticimport
is a good solution as wellAs far as I know, this isn’t possible currently. I think you could still manually import the resource using the import option on the resource rather than using the
pulumi import
command. This blog post gives an example of this for a different resource type.