-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing import and attribute in .NET generated code #49
Comments
Same issue here, the code generated with the latest release in both linux and windows is missing the correct imports, CrdsResourceType and the Utilities class, even after importing the generated namespace, is conflicting with the namespace Pulumi.Utilities. |
First time using the tool. I'm trying to convert the traefik crds (https://github.com/traefik/traefik/tree/master/docs/content/reference/dynamic-configuration/traefik.containo.us_*.yaml) and i got the following errors: Missing import (^1.0.5)Namespace conflict (^1.0.5)Stop the conflict if edited manually: Missing reference (^1.0.6)This last one i couldn't find a reference anywhere in pulumi's organization. |
I had the same problem. I fixed it by adding the flag The missing internal sealed class CrdsResourceTypeAttribute : Pulumi.ResourceTypeAttribute
{
public CrdsResourceTypeAttribute(string type) : base(type, Utilities.Version)
{
}
} |
Added to epic https://github.com/pulumi/home/issues/3431 |
This issue has been addressed in PR #143 and shipped in release v1.5.0. |
When generating CRDs code for .NET the generated code has no import for the correct
KubernetesResource
base class, as well as using theCrdsResourceType
attribute, which is nowhere to be found.Steps to reproduce
./crd2pulumi -d cert-manager.crds.yaml
Pulumi.Crds.csproj
projectExpected: the generated project compiles
Actual: the generated project doesn't compile
Example:
In this file, the
KubernetesResource
is not resolved in anyusing
namespace. Adding this:solves the issue, but it must be done in all the files.
Also, the
CrdsResourceType
attribute is not resolved, and I cannot find it anywhere.The text was updated successfully, but these errors were encountered: