Skip to content
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

Use user email to observe user resource #47

Open
JeppeAlstrup opened this issue Jun 13, 2024 · 1 comment
Open

Use user email to observe user resource #47

JeppeAlstrup opened this issue Jun 13, 2024 · 1 comment

Comments

@JeppeAlstrup
Copy link

JeppeAlstrup commented Jun 13, 2024

Hi,

Similar to: https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/data-sources/user where it is possible to observe an already created user by just specifying the users email, I'm wondering if this is even supported?

It seems that currently, this can only be done by specifying the ID of the user and marking the management policies as observed, e.g.:

apiVersion: user.pagerduty.crossplane.io/v1alpha1
kind: User
metadata:
    annotations:
        crossplane.io/external-name: {{ $user_id}}
        {{ setResourceNameAnnotation "pagerduty-user" }}
    labels:
        testlabel: test
spec:
    providerConfigRef:
        name: default
    managementPolicies: 
        - "Observe"

I tried looking into the following section in the readme, but I cannot seem to map external-name to the email property.

Either way, since I need something similar for the team resource, and really want to get rid of my terraform provider, I would like to understand if this is actually supported out of the box - and if not, I guess it could be a neat feature to add to the provider.

@JeppeAlstrup JeppeAlstrup changed the title Use user email to observe resource Use user email to observe user resource Jun 13, 2024
@haarchri
Copy link
Member

we have no support for tf data sources in upjet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants