crossplane-contrib / provider-jet-rancher

Apache License 2.0
3 stars 4 forks source link

Custom ExternalName functions for SecretV2 #14

Closed sboschman closed 1 year ago

sboschman commented 1 year ago

Description of your changes

Added custom ExternalName logic for rancher2_secret_v2 resource as it did not like the default name or identifier functions. As already mentioned in #12 .

CannotObserveExternalResource", "message": "cannot run refresh: refresh failed: Getting secret V2: Cluster ID and/or Secret V2 ID is nil

Identifier format is based on the terraform import documentation:

$ terraform import rancher2_secret_v2.foo ./

I have:

How has this code been tested

Tested with the example.

NAME                   READY   SYNCED   EXTERNAL-NAME          AGE
crossplane-secret-v2   True    True     crossplane-secret-v2   82s
% k describe secret crossplane-secret-v2
Name:         crossplane-secret-v2
Namespace:    default
Labels:       <none>
Annotations:  <none>

Type:  Opaque

Data
====
foo:  10 bytes