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

registry_name should not be a required attribute for digitalocean_container_registry_docker_credentials #1322

Open
iainsproat opened this issue Jan 31, 2025 · 2 comments
Labels
api-parity Feature supported in the DigitalOcean API not yet implemented in Terraform bug

Comments

@iainsproat
Copy link

iainsproat commented Jan 31, 2025

Bug Report

Describe the bug

The documentation and resource for container_registry_docker_credentials states that registry_name is a required attribute.

However, the API does not require it: https://docs.digitalocean.com/reference/api/digitalocean/#tag/Container-Registry/operation/registry_get_dockerCredentials (presumably because it can be implied, as there can only be one registry per DigitalOcean Team.)

Additionally, the documentation could be improved by making the relationship between Team (implied by the API token) and a Registry clear.

Affected Resource(s)

  • digitalocean_container_registry_docker_credentials

Expected Behavior

  • registry_name should not be required (and should probably not be an attribute)

Actual Behavior

  • registry_name is documented as required

Steps to Reproduce

We can test this by entering the name of a container registry of a different DigitalOcean Team (or presumably a non-existent registry, though i haven't tested this), and view the Docker credential API token instead being added to the Team associated with the API token used by the DigitalOcean Terraform provider.

Terraform Configuration Files

Terraform version

Debug Output

Panic Output

Additional context

Important Factoids

References

@iainsproat iainsproat added the bug label Jan 31, 2025
@danaelhe
Copy link
Member

Thanks for this write up! You're correct, the API does not require registry_name, so the provider should not either. Will update the provider as soon as we can. Also, thanks for the feedback on documentation- we will update that as well.

@danaelhe
Copy link
Member

danaelhe commented Feb 5, 2025

Spent some time looking at this and it's unfortunately not as easy as a fix as I'd hope without introducing a breaking change. Will need to put some more time/thought into it. Will add it to our backlog and prioritize when we have more capacity as it's not a blocking bug. More than happy to review a PR from the community if you'd like to see it resolved more quickly!

@danaelhe danaelhe added the api-parity Feature supported in the DigitalOcean API not yet implemented in Terraform label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-parity Feature supported in the DigitalOcean API not yet implemented in Terraform bug
Projects
None yet
Development

No branches or pull requests

2 participants