-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Labels
area/codegenAffects quality or correctness of generated codeAffects quality or correctness of generated codekind/bugSome behavior is incorrect or out of specSome behavior is incorrect or out of specresolution/fixedThis issue was fixedThis issue was fixed
Description
When generating CRDs code for .NET the generated code has no import for the correct KubernetesResource base class, as well as using the CrdsResourceType attribute, which is nowhere to be found.
Steps to reproduce
- run
./crd2pulumi -d cert-manager.crds.yaml - open the
Pulumi.Crds.csprojproject - the project has errors in all the generated CDR code files
Expected: the generated project compiles
Actual: the generated project doesn't compile
Example:
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Crds.Certmanager.V1
{
/// <summary>
/// A Certificate resource should be created to ensure an up to date and signed x509 certificate is stored in the Kubernetes Secret resource named in `spec.secretName`.
/// The stored certificate will be renewed before it expires (as configured by `spec.renewBefore`).
/// </summary>
[CrdsResourceType("kubernetes:cert-manager.io/v1:Certificate")]
public partial class Certificate : KubernetesResource
{In this file, the KubernetesResource is not resolved in any using namespace. Adding this:
using Pulumi.crds;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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/codegenAffects quality or correctness of generated codeAffects quality or correctness of generated codekind/bugSome behavior is incorrect or out of specSome behavior is incorrect or out of specresolution/fixedThis issue was fixedThis issue was fixed