https://github.com/codefresh-io/terraform-provider-codefresh
Terraform provider for the Codefresh API
https://github.com/codefresh-io/terraform-provider-codefresh
cicd codefresh terraform terraform-provider
Last synced: 4 months ago
JSON representation
Terraform provider for the Codefresh API
- Host: GitHub
- URL: https://github.com/codefresh-io/terraform-provider-codefresh
- Owner: codefresh-io
- License: mpl-2.0
- Created: 2020-05-11T11:50:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-09-26T13:30:15.000Z (4 months ago)
- Last Synced: 2025-09-26T14:44:23.664Z (4 months ago)
- Topics: cicd, codefresh, terraform, terraform-provider
- Language: Go
- Homepage: https://registry.terraform.io/providers/codefresh-io/codefresh
- Size: 5.36 MB
- Stars: 18
- Watchers: 10
- Forks: 24
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Terraform Provider for Codefresh
This is the official Terraform Provider for Codefresh.
Terraform Registry: [registry.terraform.io/providers/codefresh-io/codefresh](https://registry.terraform.io/providers/codefresh-io/codefresh/latest)
## Requirements
- [Terraform](https://www.terraform.io/downloads.html) `1.x.x`
## Download the Provider
Download and extract terraform-provider-codefresh from [releases](https://github.com/codefresh-io/terraform-provider-codefresh/releases)
## Using the Provider
In `versions.tf`:
```terraform
terraform {
required_providers {
codefresh = {
version = "x.y.z" # Optional but recommended; replace with latest semantic version
source = "codefresh-io/codefresh"
}
}
}
```
## Building the Provider Locally
```sh
make install
```
## [Provider Documentation](./docs)
The documentation is generated using [tfplugindocs](https://github.com/hashicorp/terraform-plugin-docs).
See: [CONTRIBUTING.md](./CONTRIBUTING.md#documentation)
## To configure Codefresh provider:
```hcl
provider "codefresh" {
api_url = "" # Default value - https://g.codefresh.io/api
token = "" # If token isn't set the provider expects the $CODEFRESH_API_KEY env variable
}
```
Get an API key from [Codefresh](https://g.codefresh.io/user/settings) and set the following scopes:
- Environments-V2
- Pipeline
- Project
- Repos
- Step-Type
- Step-Types
- View
```bash
export CODEFRESH_API_KEY='xyz'
```
## Testing the Provider
**NOTE:** Acceptance tests create real resources, including admin resources (accounts, users) so make sure that `CODEFRESH_API_KEY` is set to an account that you are ok with being modified.
```bash
make testacc
```
## Contributors
## Acknowledgements
_This provider was initialized by [LightStep](https://lightstep.com/)_.
## License
Copyright 2023 Codefresh.
The Codefresh Provider is available under [MPL2.0 license](./LICENSE).