-
Notifications
You must be signed in to change notification settings - Fork 19
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
Error when updating token resource in 0.3.10 #280
Comments
Thanks for the issue. We will try to reproduce it. Could you please tell us what dbt Cloud tenant you are on? US MT, EMEA MT, ST (Single Tenant)? |
We are using EMEA: https://emea.dbt.com/api |
Thanks @kpucynski . Looking into this now. This appears to be a bug with a new feature that is conditionally enabled. |
Do you still have an issue with the latest releases? It might have gone now as the env level permissions should be active for all accounts. |
Closing for now. We can reopen if there is still an issue. |
@b-per, We have just tested code with new 0.3.22 provider version and get the same issue:
|
0.3.8 still no issues. |
@b-per can you reopen the issue? |
I just reopened it but we haven't been able to reproduce it. We can try again. |
I just retried your code with 10 projects on the latest provider
And I can't reproduce the issue. Could you please share your dbt Cloud Account ID? |
Good/Bad news. I created 40 projects on the fly and can now reproduce the issue when trying to assign permissions for 40 projects! |
The issue here is that when a lot of permissions are assigned to a token, we don't return all of them and actually need to loop through the paginated results. So, we need to add pagination in GetServiceTokenPermissions. terraform-provider-dbtcloud/pkg/dbt_cloud/service_token.go Lines 47 to 65 in cc7fa2d
this is the reply we get when we query a token with more than 100 permissions
I checked the permissions for groups and it looks that endpoints are slightly different so we might not have the same problem there. Can you or the team work on a fix here or do you want me to do it? |
Describe the bug
In the new provider version 0.3.10 updating
dbtcloud_service_token
resource is failing.Error message
Resource configuration
Service tokens are configured with the loop.
Affected token have around 50 project IDs assigned.
Expected behavior
Token updated in place.
Config (please complete the following information):
Additional context
Downgrade to version 0.3.8 solves the problem and update is passing.
The text was updated successfully, but these errors were encountered: