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

Can't depend on ServiceAccount id when creating ApiKey #101

Open
alexxv opened this issue Aug 31, 2021 · 2 comments
Open

Can't depend on ServiceAccount id when creating ApiKey #101

alexxv opened this issue Aug 31, 2021 · 2 comments

Comments

@alexxv
Copy link

alexxv commented Aug 31, 2021

Hey,

I am using your provider in Python (cdktf).
Trying to to generate ServiceAccount and after that to add an ApiKey for it.

        service_account = \
            ServiceAccount(tf_stack,
                       id='sa-123',
                       description='',
                       name="Account name",
                       provider=cc_provider)



        api_key = ApiKey(tf_stack,
                         id='api-key-1',
                         environment_id="env-xxxx",
                         cluster_id="lkc-xxxx",
                         user_id=service_account.id,
                         provider=cc_provider)

Since ServiceAccount.id is string and ApiKey.user_id is number I can't chain those two.
Any chance ApiKey.user_id type can be changed to union of string and number, so one could pass a ${confluentcloud_service_account.xxxx_provider123_11117791.id} into it, as well as number.

Does this sound a legit change?

Thanks

Alex

@Mongey
Copy link
Owner

Mongey commented Aug 31, 2021

👋 yep, sounds like it should be a string -- I'm guessing the underlying client we're using currently expects it to be an int.

@awitterackspace
Copy link

Hi, was there a workaround for this? I'm also curious how a service account id (ie. sa-4yrop6) could be a number...?

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

3 participants