-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.tf
51 lines (43 loc) · 1.26 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
variable "ld_access_token" {}
provider "launchdarkly" {
access_token = "${var.ld_access_token}"
}
resource "launchdarkly_project" "my-project" {
key = "my-project-key"
name = "test"
}
resource "launchdarkly_environment" "dev" {
project_key = "${launchdarkly_project.my-project.key}"
name = "Development"
key = "dev"
color = "FF00FF"
}
resource "launchdarkly_environment" "hipaa" {
project_key = "${launchdarkly_project.my-project.key}"
name = "HIPAA"
key = "hipaa"
color = "FF00FF"
}
resource "launchdarkly_feature_flag" "my-flag" {
project_key = "${launchdarkly_project.my-project.key}"
key = "my-flag"
name = "My Super Flag"
description = "description!!"
tags = ["foo", "bar", "spam"]
custom_properties = [{
key = "some.property"
name = "Some Property"
value = ["value1", "value2", "value3"]
}]
}
data "launchdarkly_project" "data_project" {
key = "${launchdarkly_environment.dev.project_key}"
}
data "launchdarkly_environment" "data_environment" {
project_key = "${launchdarkly_environment.dev.project_key}"
key = "${launchdarkly_environment.dev.key}"
}
data "launchdarkly_feature_flag" "data_feature_flag" {
project_key = "${launchdarkly_environment.dev.project_key}"
key = "${launchdarkly_feature_flag.my-flag.key}"
}