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

provider: adjust credential logic for hub-stage #45

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Conversation

nicks
Copy link
Contributor

@nicks nicks commented Aug 28, 2024

Signed-off-by: Nick Santos nick.santos@docker.com

@nicks nicks requested a review from a team as a code owner August 28, 2024 17:01
@nicks
Copy link
Contributor Author

nicks commented Aug 28, 2024

(based on some other uses of docker/login-action i saw in the org for using hub-stage)

Signed-off-by: Nick Santos <nick.santos@docker.com>
@@ -23,7 +23,4 @@ func testAccPreCheck(t *testing.T) {
if v := os.Getenv("DOCKER_USERNAME"); v == "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't expect DOCKER_USERNAME to be set either with the new auth method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya...i hit this too.

the way that the AWS provider handles this is that there's a aws_caller_identity data resource
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity

and then you'd use that in the acceptance tests, rather than pulling from DOCKER_USERNAME. what do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i like that, do you know any api's off the top of your head that could get us that info?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, for the base case, we don't need to even call any apis, the provider can return what it has 😛
#46

@nicks
Copy link
Contributor Author

nicks commented Aug 28, 2024

acceptance test run with this change - https://github.com/docker/terraform-provider-docker/actions/runs/10601181940

@nicks nicks merged commit 6eab26c into main Aug 28, 2024
4 checks passed
@nicks nicks deleted the nicks/creds-2 branch August 28, 2024 18:35
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

Successfully merging this pull request may close these issues.

2 participants