Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mlafeldt/terraform-provider-launchdarkly
Terraform Provider for LaunchDarkly
https://github.com/mlafeldt/terraform-provider-launchdarkly
feature-flags feature-toggles golang launchdarkly terraform terraform-provider
Last synced: 3 months ago
JSON representation
Terraform Provider for LaunchDarkly
- Host: GitHub
- URL: https://github.com/mlafeldt/terraform-provider-launchdarkly
- Owner: mlafeldt
- License: mpl-2.0
- Archived: true
- Created: 2018-07-25T17:17:20.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-27T21:15:17.000Z (over 4 years ago)
- Last Synced: 2024-01-20T23:34:41.705Z (5 months ago)
- Topics: feature-flags, feature-toggles, golang, launchdarkly, terraform, terraform-provider
- Language: Go
- Homepage:
- Size: 56.6 KB
- Stars: 13
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-launchdarkly - mlafeldt/terraform-provider-launchdarkly
README
# Terraform Provider for LaunchDarkly
**Deprecated! Please use the [official provider](https://github.com/terraform-providers/terraform-provider-launchdarkly).**
## Using the Provider
### Supported Resources
- `launchdarkly_project`
- `launchdarkly_environment`
- `launchdarkly_feature_flag`### Example
```hcl
resource "launchdarkly_project" "example" {
name = "Example Project"
key = "example"
}resource "launchdarkly_environment" "staging" {
name = "Staging"
key = "staging"
color = "0000ff"project = "${launchdarkly_project.example.key}"
}resource launchdarkly_feature_flag "example" {
key = "some.example.flag"
name = "Some example flag"tags = [
"hello",
"world",
]project = "${launchdarkly_project.example.key}"
}output "staging_api_key" {
value = "${launchdarkly_environment.staging.api_key}"
}
```## Installing the Provider
You'll first need [Go](http://www.golang.org) installed on your machine (version 1.9+ is *required*). You'll also need to correctly set up a [GOPATH](http://golang.org/doc/code.html#GOPATH).
To build and install the provider from source, do the following:
```console
mkdir -p $GOPATH/src/github.com/mlafeldt
cd $GOPATH/src/github.com/mlafeldt
git clone https://github.com/mlafeldt/terraform-provider-launchdarkly
cd terraform-provider-launchdarkly
make install-deps
make install
```## Developing the Provider
To compile the provider, run `make build`. This will build the provider and put the provider binary in the current directory.
```console
cd $GOPATH/src/github.com/mlafeldt/terraform-provider-launchdarkly
make install-deps
make build
...
./terraform-provider-launchdarkly
...
```In order to test the binary with Terraform, create a .tf file in the current directory and run `make apply` or `make destroy`.
```console
vim example.tf
...
make apply
...
make destroy
...
```## Known Issues
- Creating a new project via the LaunchDarkly API will, unfortunately, also create two environments by default (Production and Test). It's not possible to delete both since at least one must exist. The `launchdarkly_project` and `launchdarkly_environment` resources don't handle this case in a good way yet. As a workaround, it's possible to import these special environments via `terraform import`. See .
- Even if we could solve the previous issue, there would still be the problem that there must be at least one project, making it impossible to have a clean slate using Terraform.
- `launchdarkly_feature_flag` doesn't support custom variations yet (bool only).