crossplane-contrib / provider-upjet-aws

Official AWS Provider for Crossplane by Upbound.
https://marketplace.upbound.io/providers/upbound/provider-aws
Apache License 2.0
143 stars 120 forks source link

[Bug]: certificate.acm.aws.upbound.io cannot get tags #1202

Closed fernandezcuesta closed 5 months ago

fernandezcuesta commented 6 months ago

Is there an existing issue for this?

Affected Resource(s)

acmpca.aws.upbound.io/v1beta1 - Certificate

Resource MRs required to reproduce the bug

apiVersion: acmpca.aws.upbound.io/v1beta1
kind: Certificate
metadata:
  annotations:
    crossplane.io/composition-resource-name: aws-acm-private-ca-certificate
  name: certificate-root-us-east-1
spec:
  forProvider:
    certificateAuthorityArn: # patched
    certificateSigningRequestSecretRef:
      key: certificate_signing_request
      name: acmpca-signing-certificate-root-us-east-1
      namespace: crossplane-system
    region: us-east-1
    signingAlgorithm: SHA384WITHECDSA
    tags:
      foo: bar
    templateArn: arn:aws:acm-pca:::template/RootCACertificate/V1
    validity:
    - type: END_DATE
      value: "2051-12-31T23:59:59.99Z"
  providerConfigRef:
    name: default
  writeConnectionSecretToRef:
    name: certificate-root-us-east-1
    namespace: crossplane-system

Steps to Reproduce

SImply create an ACM-PCA Certificate with tags, as suggested by the API.

What happened?

The following validation error is prompted:

Warning  ComposeResources  3m44s (x34 over 4m46s)  defined/compositeresourcedefinition.apiextensions.crossplane.io  cannot compose resources: cannot apply composed resource "aws-acm-private-ca-certificate": failed to create typed patch object (/certificate-root-us-east-1; acmpca.aws.upbound.io/v1beta1, Kind=Certificate): .spec.forProvider.tags: field not declared in schema

Relevant Error Output Snippet

No response

Crossplane Version

universal-crossplane-1.15.0-up.1

Provider Version

0.47.1

Kubernetes Version

v1.28.5-eks-5e0fdde

Kubernetes Distribution

EKS

Additional Info

No response

turkenf commented 5 months ago

Hi @fernandezcuesta,

Thank you for raising this issue.

I did a quick check and saw that it doesn't have a parameter to directly add tags to the Certificate.acmpca resource. For instance, this is possible in the CertificateAuthority.acmpca and Certificate.acm APIs.

So since this is expected behavior I'm closing this issue for now.