-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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/aws: repository_url
is computed for aws_ecr_repository
#5524
Conversation
return nil | ||
} | ||
|
||
func buildRepositoryUrl(repo *ecr.Repository, meta interface{}) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to make this function less greedy in terms of arguments. e.g.
func buildRepositoryUrl(repo *ecr.Repository, region string) string {
Besides the nitpick with arguments this LGTM. |
7c79053
to
7c5ab40
Compare
@radeksimko made the change as requested. Makes sense :) Will merge when it goes green! |
provider/aws: `repository_url` is computed for `aws_ecr_repository`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please removing the https://
part, the https://
will cause 500 for ecs agent
return nil | ||
} | ||
|
||
func buildRepositoryUrl(repo *ecr.Repository, region string) string { | ||
return fmt.Sprintf("https://%s.dkr.ecr.%s.amazonaws.com/%s", *repo.RegistryId, region, *repo.RepositoryName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why https ? just return fmt.Sprintf("%s.dkr.ecr.%s.amazonaws.com/%s", *repo.RegistryId, region, *repo.RepositoryName)
is okay!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the same issue. I'd like to use this in a container definition template and the HTTPS breaks it.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
As requested in #5518, we can compute the repository_url for ECR using a known format:
FYI, I didn't want to hardcode an account_id into the tests :)
But when I run this locally, I get the following output: