-
Notifications
You must be signed in to change notification settings - Fork 6
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
Tests and semaphoreci integration #2
Conversation
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.
lgtm
Hi Marius, The code is still a bit messy but it should be clear what we're doing here:
Executing the test with However, we currently can't run the test with our (https://hub.docker.com/r/mineiros/build-tools)[build-tools} docker image. If we'd like to be able to run the test inside a docker container, we need to add docker as a dependency to the build-tools image and start a privileged container. I don't think that this is a good practice though. I would suggest, that we use a packer image to create and push the test docker image. However, that would come with a few downsides:
wdyt @mariux ? |
We shouldn't approve PR's with failing tests though... |
7bea34b
to
537c203
Compare
537c203
to
a7f2067
Compare
For now, I chose the easiest way possible: Docker out of Docker |
…he created repository.
Ready for review @mariux |
I just saw that whenever we use |
|
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.
we should discuss how we want to deliver outputs... as this duplicates exported data and creates documentation overhead.
outputs.tf
Outdated
output "repository_arn" { | ||
description = "The ARN of the repository." | ||
value = try(aws_ecr_repository.repository[0].arn, null) | ||
} | ||
|
||
output "repository_id" { | ||
description = "The Id of the repository." | ||
value = try(aws_ecr_repository.repository[0].id, null) | ||
} | ||
|
||
output "repository_url" { | ||
description = "The URL of the repository." | ||
value = try(aws_ecr_repository.repository[0].repository_url, null) | ||
} | ||
|
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? you can get them from the repository itself
module.name.repository.arn
module.name.repository_arn
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.
fixed in aaa3cc7
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.
My take on outputs:
I don't have a strong opinion yet but here are some bullet points that lead me in the direction of explicit outputs:
- returning the whole object doesn't really create a contract / valid API. What if the internal representation changes due to Provider upgrade? The module won't be able to guarantee backward compatibility anymore. If we return explicit outputs we can guarantee BC.
- What does the user really want? Returning the whole resource will most likely end in a scenario in which the user only uses 20% of the outputs anyways ... do we really need all information?
- We might return sensitive outputs per default if we always return the whole object?
- No convenient API - the user would need to check the terraform providers documentation to get an overview of the outputs.
I will post this in the related trello task also.
wdyt?
Also: I think we might be ready to get this merged now ? :)
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.
Lgtm
Implement an integration test: