https://github.com/ko-build/terraform-provider-ko
Build and deploy Go applications with Terraform
https://github.com/ko-build/terraform-provider-ko
container-image ko terraform-provider
Last synced: about 2 months ago
JSON representation
Build and deploy Go applications with Terraform
- Host: GitHub
- URL: https://github.com/ko-build/terraform-provider-ko
- Owner: ko-build
- License: mpl-2.0
- Created: 2022-06-24T17:35:35.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T12:00:14.000Z (about 1 year ago)
- Last Synced: 2024-05-29T03:26:39.112Z (about 1 year ago)
- Topics: container-image, ko, terraform-provider
- Language: Go
- Homepage: https://registry.terraform.io/providers/ko-build/ko
- Size: 5.79 MB
- Stars: 26
- Watchers: 3
- Forks: 10
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform Provider for `ko`
🚨 **This is a work in progress.** 🚨
https://registry.terraform.io/providers/ko-build/ko
## Usage
This provides a `ko_build` resource that will build the referenced Go application specified by the `importpath`, push an image to the configured container repository, and make the image's reference available to other Terraform resources.
```
provider "ko" {}resource "ko_build" "example" {
importpath = "github.com/ko-build/terraform-provider-ko/cmd/test"
}
```See provider examples:
- [Google Cloud Run](./provider-examples/cloudrun/README.md)
- [AWS Lambda](./provider-examples/lambda/README.md)
- [AWS ECS](./provider-examples/ecs/README.md)
- [AWS App Runner](./provider-examples/apprunner/README.md)
- [AWS Lightsail](./provider-examples/lightsail/README.md)
- [fly.io](./provider-examples/fly.io/README.md)
- [Kubernetes](./provider-examples/kubernetes/README.md)The image will be rebuilt every time it's _referenced_, and will only report as having changed if the image that was built was different since the last time the image resource was read.
This means that `terraform plan` will rebuild all referenced images, but only show diffs if rebuilds resulted in new images since last time the plan was made.