Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Extend "SetIdentifierArgumentFn" interface to support additional parameters like "metadata.name" #280

Open
ezgidemirel opened this issue Apr 28, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@ezgidemirel
Copy link
Member

What problem are you facing?

Currently, "SetIdentifierArgumentFn" functions can only take "spec.forProvider" and "external-name" parameters. I'd like to pass "metadata.name" field for configuring resources like AWS MQ broker. In this resource, "broker-name" is required and the external name is generated by the cloud provider.

How could Terrajet help solve your problem?

Providing an additional mechanism to configure jet-based resources.

@ezgidemirel ezgidemirel added the enhancement New feature or request label Apr 28, 2022
@muvaf
Copy link
Member

muvaf commented May 12, 2022

In this resource, "broker-name" is required and the external name is generated by the cloud provider.

How would metadata.name help in this case?

@ezgidemirel
Copy link
Member Author

Instead of having a spec field called brokerName, I'd like to use metadata.name for XRM compliance.

@muvaf
Copy link
Member

muvaf commented May 29, 2022

When a resource has a name but also queried by an assigned ID, I usually treat the name just like a tag or label since it's not used to identify the resource. XRM suggests that the external name, i.e. the identifier in the external system, should be defaulted to metadata.name so I think it should be fine to keep it in the schema as required. What do you think?

@ytsarev
Copy link
Member

ytsarev commented May 30, 2022

@muvaf I hit the same in https://github.com/crossplane-contrib/provider-jet-datadog/blob/main/examples/monitor/monitor.yaml#L8, I want to use metadata.name without semantical duplication in spec . At the same time I cannot use NameAsIdentifier as the resource is always identified by some integer number https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/monitor#import

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants