Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/turnerlabs/terraform-provider-harbor
A Terraform provider for managing Harbor infrastructure
https://github.com/turnerlabs/terraform-provider-harbor
go harbor iac infrastructure-as-code provider terraform
Last synced: 3 months ago
JSON representation
A Terraform provider for managing Harbor infrastructure
- Host: GitHub
- URL: https://github.com/turnerlabs/terraform-provider-harbor
- Owner: turnerlabs
- License: other
- Created: 2017-03-06T14:05:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-16T22:29:01.000Z (almost 7 years ago)
- Last Synced: 2024-11-16T12:00:20.120Z (3 months ago)
- Topics: go, harbor, iac, infrastructure-as-code, provider, terraform
- Language: Go
- Homepage:
- Size: 15.8 MB
- Stars: 4
- Watchers: 6
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
terraform-provider-harbor
==========================A [Terraform](https://www.terraform.io/) provider for managing [Harbor](https://github.com/turnerlabs/harbor) resources.
### Benefits
- infrastructure as code (versionable and reproducible infrastructure)
- all of your infrastructure declared in a single place, format, command
- native integration with the vast landscape of existing terraform providers
- user doesn't have to understand idiosyncrasies of ShipIt and Trigger, and what types of changes require setting replicas = 0 and triggering
- HTTPS/TLS setup via IaC
- AWS Tag integration
- AWS Route53 integration (outputs managed load balancer information)
- AWS ACM integration
- AWS Role integration (coming)
- works with changes made in GUI or CLI
- leverages terraform's first class support state synchronization[![asciicast](https://asciinema.org/a/IxeoNYl7RmmSTwYMURtODytHO.png)](https://asciinema.org/a/IxeoNYl7RmmSTwYMURtODytHO?autoplay=1)
### Installation
- install plugin (depends on terraform v0.10.0 or later)
```
curl -s get-tf.harbor.turnerlabs.io | sh
```- install [harbor-compose](https://github.com/turnerlabs/harbor-compose) which is required for authentication and for deploying your application images and environment variables on to the infrastructure
```
curl -s get-cli.harbor.turnerlabs.io | sh
```- *note that you can install the pre-release (develop branch) using this command
```
curl -s beta.get-tf.harbor.turnerlabs.io | sh
```[Provider Documentation](wiki)
### Usage example
```hcl
provider "harbor" {
credentials = "${file("~/.harbor/credentials")}"
}resource "harbor_shipment" "app" {
shipment = "my-app"
group = "mss"
}resource "harbor_shipment_env" "dev" {
shipment = "${harbor_shipment.app.id}"
environment = "dev"
barge = "digital-sandbox"
replicas = 4
monitored = falsecontainer {
name = "my-app"port {
protocol = "http"
public_port = 80
value = 5000
healthcheck = "/health"
}
}
}output "dns_name" {
value = "${harbor_shipment_env.dev.dns_name}"
}
```### Other examples
- [Log Shipping](examples/log-shipping)
- [DNS and TLS/HTTPS using AWS](examples/dns-ssl)
- [TLS/HTTPS using an IAM certificate](examples/iam-cert)
- [Multiple Environments](examples/multi-environment)
- [ALB Load Balancer](examples/lb-alb)