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

Adding Terraform Build Pack #45

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

sharepointoscar
Copy link

Wanted to have someone take a look at the draft Terraform Build Pack. I have tested it locally, it runs as expected.

- docker: {}
tagPolicy:
envTemplate:
template: '{{.DOCKER_REGISTRY}}/REPLACE_ME_ORG/REPLACE_ME_APP_NAME:{{.DIGEST_HEX}}'
Copy link
Contributor

Choose a reason for hiding this comment

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

{{.DIGEST_HEX}} is no longer supported in skaffold

chartPath: charts/REPLACE_ME_APP_NAME
setValueTemplates:
image.repository: '{{.DOCKER_REGISTRY}}/REPLACE_ME_ORG/REPLACE_ME_APP_NAME'
image.tag: '{{.DIGEST_HEX}}'
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@garethjevans
Copy link
Contributor

@sharepointoscar I may have mis-understood here, but my assumption was that a terraform buildpack wouldn't create an "app" that can be deployed to k8s? It would create something that could be validated / executed against a cloud provider (or something that is terraform managed).

@sharepointoscar
Copy link
Author

@garethjevans That is correct, was an oversight on my part and thanks for the quick review. I think what I want my Dockerfile to have is just the ENTRYPOINT as it is now, so that the image is called to execute with any params. Let me remove the app related stuff on the Dockerfile! And also change the .DIGEST_HEX as you pointed out.

@vfarcic
Copy link
Contributor

vfarcic commented Apr 13, 2020

Do we need to create an image with Dockerfile? Shouldn't the pipeline reference an image with Terraform and execute commands using checked out code (e.g., terraform ...)?

@vfarcic
Copy link
Contributor

vfarcic commented Apr 13, 2020

The pipeline.yaml seems to be the same as for most of the other apps. I'm not sure that'll work with Terraform. I would assume that on PRs we'd run terraform plan so that someone can approve them, and on the master branch terraform apply --input false (or something similar).

@vfarcic
Copy link
Contributor

vfarcic commented Apr 13, 2020

What is the plan with the credentials? I assume they would be provided as a k8s secret or from Vault and injected through the pipeline.

@Junkratz
Copy link

@sharepointoscar Hi, how do you perform testing using Terraform? Thank you.

@heylong6551
Copy link

hello, can I know the status of this issue? I'm planning to do a terraform build pack as well, hope can contribute :)

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.

5 participants