Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare 2.18.3 release #208

Merged
merged 230 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
230 commits
Select commit Hold shift + click to select a range
8fd56bd
prepare release (#80) (#188)
sloloris Jan 20, 2022
aea6005
Do not allow 0% segment rule weights (#189)
ldhenry Jan 21, 2022
f1e972c
Fix flag trigger creation panic (#190)
ldhenry Jan 21, 2022
09a6fa3
Backmerge/release 2.4.1 (#191)
ldhenry Jan 21, 2022
e493b76
Add Slack webhooks to audit_log_subscription (#192)
ldhenry Feb 7, 2022
2512cf3
backmerge v2.5.0 (#193)
ldhenry Feb 8, 2022
f4332bc
Use jennifer to generate audit log subscription configs (#194)
ldhenry Feb 8, 2022
de0fe41
Run terraform provider acceptance tests daily and notify of failures …
ldhenry Feb 8, 2022
9a38dde
Update changelog branch (#195)
ldhenry Feb 9, 2022
d285706
[ sc-143291] update autogenerated audit_log_subscription configs (#197)
monsagri Mar 14, 2022
42d99ac
Increase checkpoint-api.harhicorp.com timeout to 10s (#198)
ldhenry Mar 17, 2022
04b73ff
Updated destination tests to use random env keys to avoid env conflic…
ctawiah Apr 6, 2022
b6bc3f2
Merge pull request #199 from launchdarkly/ctawiah/sc-148136/randomize…
ctawiah Apr 6, 2022
e722f06
[sc 148065] add approvals bypass to terraform docs (#200)
monsagri Apr 7, 2022
b88452a
Backmerge/release 2.6.0 (#201)
monsagri Apr 7, 2022
ae41bdb
fix doc issues (#202)
sloloris Apr 14, 2022
a402d11
[sc-149869] roll back documentation changes regarding (#203)
monsagri Apr 14, 2022
66d55a1
backmerge 2.6.1 (#204)
monsagri Apr 14, 2022
494df8f
Imiller/sc 151834/add base permissions to custom role resource (#205)
sloloris May 4, 2022
38d70bc
Backmerge/release 2.7.0 (#206)
sloloris May 5, 2022
6559f71
(bug-fix) Update modules to accept new API header
May 11, 2022
4795ea3
Merge pull request #207 from launchdarkly/fix-ci
lucywyman May 13, 2022
626aaae
Update circleci test timeout to 15 seconds
May 19, 2022
2c88570
Merge pull request #208 from launchdarkly/sunny/sc-153482/increase-ti…
lucywyman May 20, 2022
9084524
Regenerate auditlog configs to resolve CI failures (#211)
ldhenry Jun 30, 2022
54dbc29
Run make generate to supress CI failures (#212)
ldhenry Jul 11, 2022
b9a3419
added a check for environment and warning
Jul 12, 2022
c073a3b
fix go lint error
Jul 12, 2022
822f9d8
Merge branch 'main' into sunny/sc-158595/leftover-resources-cannot-be…
Jul 12, 2022
2ba884b
use environmentExists function
Jul 12, 2022
dd21dac
remove grafana
Jul 13, 2022
66c862c
fix: [sc-158595] leftover resources cannot be cleared out after launc…
Jul 13, 2022
88840f0
Update changelog with bug fix for datasource feature flag environment
Jul 13, 2022
33a1f9f
Merge pull request #215 from launchdarkly/sunny/update-changelog-data…
lucywyman Jul 14, 2022
7b218fe
added changes
Jul 26, 2022
c1a3b89
Merge pull request #216 from launchdarkly/backmerge/release-2.7.1
Jul 26, 2022
70c9c34
upgrade go version 1.18.1 (#217)
sloloris Jul 27, 2022
8bee33e
Backmerge public/release v2.7.1 3 (#219)
ldhenry Jul 27, 2022
402b508
Remove invalid integration configurations (#221)
ldhenry Jul 28, 2022
db398b8
Add blacklist to manifest codegen and remove Zapier. (#222)
ldhenry Jul 28, 2022
b9e966d
Backmerge release 2.7.2 (#223)
ldhenry Jul 28, 2022
e7d7f77
Update Go api client to 10.0.1
Jun 28, 2022
6a6345e
Fix up v10 migration PR
Jul 28, 2022
11e3b82
Merge pull request #225 from launchdarkly/migrate-terraform-to-v10
lucywyman Jul 28, 2022
e9c8d43
[SC-160359] Create Teams resource and datasource
Jun 28, 2022
1d1e3d3
Fix up documentation
Aug 3, 2022
70e838e
Make lists unsorted to avoid unnecessary change detection
Aug 3, 2022
8fb4544
Update website/docs/d/team.html.markdown
lucywyman Aug 3, 2022
a97b4ae
Make lists unsorted to avoid unnecessary change detection
Aug 3, 2022
1cd0737
Merge pull request #224 from launchdarkly/dominickagnello/sc-160359/u…
lucywyman Aug 4, 2022
da5dacd
prepare 2.6.0 release (#91)
monsagri Apr 7, 2022
43ee03b
prepare 2.6.1 release (#94)
monsagri Apr 14, 2022
519707a
Prepare 2.7.1 release (#103)
Jul 25, 2022
1d371d9
Prepare release 2.7.1 2 (#104)
sloloris Jul 27, 2022
6276ea6
fix merge issue in Circle config (#105)
ldhenry Jul 27, 2022
76f1bcf
Release 2.7.2 (#106)
ldhenry Jul 28, 2022
416ec8b
prepare 2.8.0 release
Aug 4, 2022
8569589
Merge pull request #227 from launchdarkly/backmerge/release-2.8.0
lucywyman Aug 4, 2022
f21dd2c
[SC-163244] Add no-access role for team member resource
Aug 5, 2022
aded53f
Merge pull request #228 from launchdarkly/lucyvoigt/sc-163244/add-no-…
lucywyman Aug 5, 2022
f8caaea
Backmerge 2.9.0 release
Aug 5, 2022
72236a5
[sc-147722] add codeowners file (#230)
monsagri Aug 9, 2022
fd4a7de
Merge pull request #229 from launchdarkly/backmerge/release-2.9.0
lucywyman Aug 10, 2022
c60959a
Dominickagnello/sc 163883/open a pr against the terraform provider (#…
Blugil Aug 10, 2022
8ceb94b
add conditional so that new action only runs in private repo
Aug 10, 2022
229b5b9
Remove example.com email addresses from acceptance tests (#234)
ldhenry Aug 10, 2022
d459813
Retry failed acceptance tests once
Aug 10, 2022
e23033f
Merge pull request #235 from launchdarkly/retry-failed-tests-once
lucywyman Aug 10, 2022
124c1da
Merge pull request #233 from launchdarkly/dominickagnello/sc-163883/o…
lucywyman Aug 11, 2022
362669f
[SC-163262] Suppress diff when value_type doesn't change
Aug 5, 2022
c1ff182
Update launchdarkly/clause_helper.go
lucywyman Aug 23, 2022
a83f848
Merge pull request #236 from launchdarkly/lucyvoigt/sc-163262/don-t-s…
lucywyman Aug 24, 2022
e7affce
[bot] Regenerate integration configs (#237)
github-actions[bot] Aug 24, 2022
b8c9085
Update feature_flag_environmewnt to only create patch statements when…
ldhenry Aug 24, 2022
07e3cc0
merge public/main (#239)
ldhenry Aug 24, 2022
8311a3a
Imiller/sc 166499/defaults for boolean flags do not apply to existing…
sloloris Sep 1, 2022
9e135b6
Backmerge public (#241)
ldhenry Sep 1, 2022
c65030c
Imiller/sc 168660/terraform issue importing project with environments…
sloloris Sep 13, 2022
628672e
[SC-169876] Correctly set bucketBy to nil when empty
Sep 20, 2022
a438dfa
[SC-168865] Print error message with API errors
Sep 13, 2022
c7c9269
Merge pull request #242 from launchdarkly/lucyvoigt/sc-168865/hi-team…
lucywyman Sep 26, 2022
3dcf1bc
Merge pull request #244 from launchdarkly/lucyvoigt/sc-169876/launchd…
lucywyman Sep 26, 2022
3a6f10e
[SC-170290] Add ignore_changes guide to Terraform docs
Sep 28, 2022
8134e76
Merge pull request #245 from launchdarkly/lucyvoigt/sc-170290/update-…
lucywyman Sep 30, 2022
5f2984c
Backmerge 2.9.3 release
Oct 3, 2022
384cfb9
Merge pull request #246 from launchdarkly/backmerge/release-2.9.3
lucywyman Oct 3, 2022
259ab96
[SC-174121] Docs bug fixes
Oct 26, 2022
f8d6a58
Merge pull request #247 from launchdarkly/lucyvoigt/sc-174121/fix-gui…
lucywyman Oct 26, 2022
fae2eba
Imiller/sc 162868/update documentation on using feature flag env sett…
sloloris Oct 31, 2022
94298b1
update links to docs.launchdarkly
mmrj Jan 9, 2023
0940048
Apply some additional copy suggestions from code review
mmrj Jan 9, 2023
b88eb72
add changelog entry
mmrj Jan 10, 2023
5eb15a1
Update CHANGELOG.md
sloloris Jan 10, 2023
7342d64
Merge pull request #251 from launchdarkly/mollyjones2723/sc-182866/in…
mmrj Jan 10, 2023
dfafc3b
should not be able to set targets with empty values (#252)
sloloris Jan 10, 2023
15ee255
fix test (#255)
sloloris Jan 10, 2023
33de477
fix retry command (#254)
sloloris Jan 10, 2023
3d214ef
Update generated audit log config (#267)
sloloris Jan 27, 2023
76a985f
merge main from public?
sloloris Jan 27, 2023
f792697
backmerge (#268)
sloloris Jan 30, 2023
a2b4c4a
[bot] Regenerate integration configs (#269)
github-actions[bot] Feb 1, 2023
2289644
Add optional targeting rule descriptions (#270)
ldhenry Feb 1, 2023
f240372
[bot] Regenerate integration configs
Blugil Feb 8, 2023
143d6d0
Merge pull request #272 from launchdarkly/regenerate-integration-conf…
lucywyman Feb 9, 2023
0d4a2e5
[bot] Regenerate integration configs
Blugil Feb 9, 2023
f6b2ccd
Merge pull request #273 from launchdarkly/regenerate-integration-conf…
lucywyman Feb 9, 2023
8d57914
add ldrelease metadata (#275)
monsagri Feb 16, 2023
4fd103c
[sc 189042] update project releaser config (#276)
monsagri Feb 21, 2023
30edd7c
Releasing version 2.9.6
Feb 21, 2023
98b5c1a
[sc 189042] update project releaser config permissions (#277)
monsagri Feb 21, 2023
a9cee2a
Releasing version 2.9.6
Feb 21, 2023
562f945
[sc 189042] update project releaser artifacts (#278)
monsagri Feb 21, 2023
81b0692
Releasing version 2.9.6
Feb 21, 2023
8233722
add update-version back in (#279)
monsagri Feb 21, 2023
7f383af
Releasing version 2.9.7
Feb 21, 2023
db1bbff
fix changelog (#280)
monsagri Feb 21, 2023
e3061c6
Releasing version 2.9.7
Feb 21, 2023
66c0c5b
(maint) Document 'archived' attribute of feature_flag
Feb 21, 2023
a834b44
[sc 189042] automate terraform provider releases 2 (#282)
monsagri Feb 22, 2023
23dcf51
Merge pull request #281 from launchdarkly/add-archive-docs
lucywyman Feb 22, 2023
0d0a853
Imiller/sc 189789/investigate workarounds for default CSA issue (#283)
sloloris Feb 27, 2023
f567041
Remove tests (#284)
sloloris Feb 27, 2023
8203c0a
Maint/fix backlog conflict (#285)
monsagri Feb 27, 2023
8cb1cee
merge from public after release
Feb 27, 2023
584b69d
Add support for Custom Contexts (#249)
sloloris Feb 28, 2023
d2c3bd8
merge from public after release
Feb 28, 2023
1e3785e
[bot] Regenerate integration configs (#286)
github-actions[bot] Mar 6, 2023
47f57b1
Bump golang.org/x/net from 0.1.0 to 0.7.0 (#288)
dependabot[bot] Mar 9, 2023
d3eb324
Update CODEOWNERS (#289)
ldhenry Mar 9, 2023
5131b70
Upgrade to Go 1.19 and bump golangci-lint in pre-commit (#290)
ldhenry Mar 9, 2023
bced6a8
[sc-190487] add randomization_units (optional) to metric resource (#287)
goldfrapp04 Mar 10, 2023
1529d77
merge from public after release
Mar 10, 2023
a957055
Bump go to v1.19 in remaining places (#291)
ldhenry Mar 10, 2023
f8f1326
merge from public after release
Mar 10, 2023
6d65531
Add pull request template (#292)
sloloris Mar 15, 2023
86eb3b7
[bot] Regenerate integration configs (#293)
github-actions[bot] Apr 4, 2023
3eab336
[bot] Regenerate integration configs (#294)
github-actions[bot] Apr 18, 2023
0c44fb7
[bot] Regenerate integration configs (#295)
github-actions[bot] May 10, 2023
b53545c
Imiller/sc 202319/terraform provider panics if empty fallthrough (#296)
sloloris May 11, 2023
745ed90
update changelog version (#297)
sloloris May 15, 2023
1b648b0
backmerge (#298)
monsagri Jun 28, 2023
d23e6bd
backmerge (#299)
monsagri Jun 28, 2023
deff2a7
merge from public after release
Jun 28, 2023
9522b0c
[bot] Regenerate integration configs (#300)
github-actions[bot] Jul 4, 2023
19423e3
Bump google.golang.org/grpc from 1.46.0 to 1.53.0
dependabot[bot] Jul 5, 2023
2483db2
Merge pull request #301 from launchdarkly/dependabot/go_modules/googl…
lucywyman Jul 5, 2023
402f8e4
Add support for future terraform-plugin-framework resources using tf5…
ldhenry Jul 14, 2023
3efcfe2
Add launchdarkly_team_role_mapping resource (#303)
ldhenry Jul 17, 2023
753d9ef
merge from public after release
Jul 17, 2023
06fb5e1
Add GPG TTY to release script (#304)
ldhenry Jul 17, 2023
75d2804
Backmerge public (#305)
ldhenry Jul 17, 2023
9d3a407
backmerge public
ldhenry Jul 17, 2023
51cf422
Remove old changelog
ldhenry Jul 17, 2023
cca070e
Merge pull request #306 from launchdarkly/hbarrow/backmerge-2
ldhenry Jul 17, 2023
148c158
merge from public after release
Jul 17, 2023
49bacd0
Update dry run script and gpg command (#307)
ldhenry Jul 17, 2023
d9634b1
merge from public after release
Jul 17, 2023
e550f5a
Extend GPG passphrase cache TTL to fix release pipeline (#308)
ldhenry Jul 18, 2023
088fae0
backmerge public
ldhenry Jul 18, 2023
811c428
Merge pull request #309 from launchdarkly/hbarrow/backmerge-3
ldhenry Jul 18, 2023
9e27b11
Fix team_role_mapping header (#310)
ldhenry Jul 18, 2023
4577840
merge from public after release
Jul 18, 2023
513ce91
Fix grammar on launchdarkly_team_role_mapping docs
ldhenry Jul 18, 2023
c9d7d9d
Merge pull request #311 from launchdarkly/hbarrow/sc-209434/add-new-r…
ldhenry Jul 18, 2023
6d6b760
Update team_role_mapping documentation to include team sync with SCIM…
ldhenry Jul 19, 2023
fab317f
Use lowercase t
ldhenry Jul 19, 2023
5938276
Merge pull request #312 from launchdarkly/hbarrow/sc-209434/add-new-r…
ldhenry Jul 19, 2023
96b3d7c
merge from public after release
Jul 19, 2023
4815ecf
Add support for environment pagination in launchdarkly_project resour…
ldhenry Jul 26, 2023
741f9fd
merge from public after release
Jul 26, 2023
98bdd16
[bot] Regenerate integration configs (#315)
github-actions[bot] Jul 31, 2023
71c7b25
update relay documentation to adhere to the proper metadata (#171) (#…
ldhenry Aug 3, 2023
d144384
merge from public after release
Aug 3, 2023
37ae424
[Part 1]: Use tfplugindocs to generate documentation from the provide…
ldhenry Aug 10, 2023
ec5ae5f
Generate `launchdarkly_feature_flag_environment` resource and data so…
ldhenry Aug 10, 2023
efe1e16
Fix forProject bug and add new test (#320)
ldhenry Aug 10, 2023
1e450d5
Increase max project key length to 100 (#322)
ldhenry Aug 10, 2023
4481abf
merge from public after release
Aug 10, 2023
49ae664
Update file extensions and change guide title (#323)
ldhenry Aug 11, 2023
333057f
Add `http_timeout` provider option (#321)
ldhenry Aug 11, 2023
cc01451
merge from public after release
Aug 11, 2023
caefe27
Generate `launchdarkly_feature_flag` resource and data source documen…
ldhenry Aug 14, 2023
262475e
Add docs team as CODEOWNERS for /docs directory (#326)
ldhenry Aug 17, 2023
c164530
Fix typo in webhook example code (#180) (#327)
ldhenry Aug 30, 2023
b2f21c8
merge from public after release
Aug 30, 2023
1300320
Add 404 retries to team role mapping resource (#329)
ldhenry Sep 26, 2023
21ef81d
launchdarkly_environment: only add tags to patch array when they chan…
ldhenry Sep 26, 2023
79844ac
merge from public after release
Sep 26, 2023
9563d98
Bump golang.org/x/net from 0.11.0 to 0.17.0
dependabot[bot] Oct 11, 2023
60dae81
Merge pull request #330 from launchdarkly/dependabot/go_modules/golan…
lucywyman Oct 12, 2023
1a8db1c
Merge remote-tracking branch 'public/main' into hbarrow/backmerge-pub
ldhenry Oct 16, 2023
a61a08d
Add big segment fields to segment schema and add tests
ldhenry Oct 16, 2023
7e81ee2
Merge pull request #331 from launchdarkly/hbarrow/sc-220820/review-me…
ldhenry Oct 16, 2023
cfdc1c8
Generate launchdarkly_segment resource and data source docs (#332)
ldhenry Oct 17, 2023
90bef27
merge from public after release
Oct 17, 2023
753c0f1
Bump google.golang.org/grpc from 1.56.1 to 1.56.3
dependabot[bot] Oct 25, 2023
f5274a5
Merge pull request #333 from launchdarkly/dependabot/go_modules/googl…
lucywyman Oct 26, 2023
35e2260
added kind
Nov 30, 2023
2efd7c2
Add service_kind and service_config to environment approval settings …
ldhenry Dec 8, 2023
c73b983
merge from public after release
Dec 8, 2023
fa5f9cd
Bump golang.org/x/crypto from 0.14.0 to 0.17.0
dependabot[bot] Dec 18, 2023
1346851
Merge pull request #336 from launchdarkly/dependabot/go_modules/golan…
lucywyman Dec 19, 2023
9d1bec3
update to v14
Jan 5, 2024
e56a78a
Update ldapi to v14
Jan 5, 2024
662bd2c
upgrade go version
Jan 10, 2024
5cab1c4
Upgrade go version to 1.20.3
Jan 10, 2024
3cca4c3
Bump github.com/cloudflare/circl from 1.3.3 to 1.3.7
dependabot[bot] Jan 16, 2024
41c829b
Merge pull request #338 from launchdarkly/dependabot/go_modules/githu…
lucywyman Jan 16, 2024
8c5adcc
Add chronosphere integration config (#342)
ldhenry Feb 5, 2024
cd57386
ensure off variation resets to correct default value when removing fe…
sloloris Feb 20, 2024
74d3d01
Imiller/sc 234019/add ability to set team maintainers for feature fla…
sloloris Feb 22, 2024
a2c9b4f
Merge branch 'main' into sunny/sc-225614/add-kind-to-env-rep-in-terra…
Feb 22, 2024
d67516e
Update from kind to critical
Feb 22, 2024
c0699ee
remove unreleased changes from changelog
sloloris Feb 23, 2024
53b25ca
merge from public after release
Feb 23, 2024
147d7f4
explicitly define variations when defaults are defined & fix metric s…
sloloris Mar 12, 2024
56afe33
merge from public after release
Mar 14, 2024
7a22868
Update invalid flag action in webhook data source test (#349)
ldhenry Mar 18, 2024
6466158
Bump google.golang.org/protobuf from 1.31.0 to 1.33.0 (#348)
dependabot[bot] Mar 18, 2024
c0d79d2
updated to api-client-go to v15
Mar 21, 2024
35f8f77
Merge pull request #350 from launchdarkly/sunny/update-go-client-version
Mar 21, 2024
9306636
Merge branch 'main' into sunny/sc-225614/add-kind-to-env-rep-in-terra…
Mar 21, 2024
4b21abf
Update example feature_flag_environment resource name to reduce confu…
ldhenry Mar 22, 2024
3463798
merge from public after release
Mar 25, 2024
6f6a4b9
generate docs
Mar 28, 2024
31a498c
add test
Mar 28, 2024
1009993
Add kind to Environment
Apr 9, 2024
ddeecfe
Bump golang.org/x/net from 0.17.0 to 0.23.0
dependabot[bot] Apr 19, 2024
20856ca
Merge pull request #353 from launchdarkly/dependabot/go_modules/golan…
lucywyman Apr 19, 2024
a65ea61
Add examples that showcase the use of all clause operators (#355)
ldhenry May 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/data-sources/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ data "launchdarkly_environment" "example" {
- `key` (String) The project-unique key for the environment.
- `project_key` (String) The environment's project key.

### Optional

- `critical` (Boolean) Denotes whether the environment is critical.

### Read-Only

- `api_key` (String, Sensitive) The environment's SDK key.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ resource "launchdarkly_environment" "approvals_example" {

- `approval_settings` (Block List) (see [below for nested schema](#nestedblock--approval_settings))
- `confirm_changes` (Boolean) Set to `true` if this environment requires confirmation for flag and segment changes. This field will default to `false` when not set.
- `critical` (Boolean) Denotes whether the environment is critical.
- `default_track_events` (Boolean) Set to `true` to enable data export for every flag created in this environment after you configure this argument. This field will default to `false` when not set. To learn more, read [Data Export](https://docs.launchdarkly.com/home/data-export).
- `default_ttl` (Number) The TTL for the environment. This must be between 0 and 60 minutes. The TTL setting only applies to environments using the PHP SDK. This field will default to `0` when not set. To learn more, read [TTL settings](https://docs.launchdarkly.com/home/organize/environments#ttl-settings).
- `require_comments` (Boolean) Set to `true` if this environment requires comments for flag and segment changes. This field will default to `false` when not set.
Expand Down
112 changes: 111 additions & 1 deletion docs/resources/feature_flag_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This resource allows you to create and manage environment-specific feature flags
## Example Usage

```terraform
# This example shows the use of prerequisites, targets, context targets, rules, and fallthrough for a feature flag environment
resource "launchdarkly_feature_flag_environment" "number_ff_env" {
flag_id = launchdarkly_feature_flag.number.id
env_key = launchdarkly_environment.staging.key
Expand Down Expand Up @@ -68,6 +69,115 @@ resource "launchdarkly_feature_flag_environment" "number_ff_env" {
}
off_variation = 2
}

# This example shows the minimum configuration required to create a feature flag environment
resource "launchdarkly_feature_flag_environment" "basic_flag_environment" {
flag_id = launchdarkly_feature_flag.basic_flag.id
env_key = "development"

on = true

fallthrough {
variation = 1
}
off_variation = 0
}

# This example shows a feature flag environment with a targeting rule that uses every clause operator
resource "launchdarkly_feature_flag_environment" "big_flag_environment" {
flag_id = launchdarkly_feature_flag.big_flag.id
env_key = "development"

on = true

rules {
description = "Example targeting rule with every clause operator"
clauses {
attribute = "username"
op = "in" // Maps to 'is one of' in the UI
values = ["henrietta powell", "wally waterbear"]
}
clauses {
attribute = "username"
op = "endsWith" // Maps to 'ends with' in the UI
values = ["powell", "waterbear"]
}
clauses {
attribute = "username"
op = "startsWith" // Maps to 'starts with' in the UI
values = ["henrietta", "wally"]
}
clauses {
attribute = "username"
op = "matches" // Maps to 'matches regex' in the UI
values = ["henr*"]
}
clauses {
attribute = "username"
op = "contains" // Maps to 'contains' in the UI
values = ["water"]
}
clauses {
attribute = "pageVisits"
op = "lessThan" // Maps to 'less than (<)' in the UI
values = [100]
}
clauses {
attribute = "pageVisits"
op = "lessThanOrEqual" // Maps to 'less than or equal to (<=)' in the UI
values = [100]
}
clauses {
attribute = "pageVisits"
op = "greaterThan" // Maps to 'greater than (>)' in the UI
values = [100]
}
clauses {
attribute = "pageVisits"
op = "greaterThanOrEqual" // Maps to 'greater than or equal to (>=)' in the UI
values = [100]
}
clauses {
attribute = "creationDate"
op = "before" // Maps to 'before' in the UI
values = ["2024-05-03T15:57:30Z"]
}
clauses {
attribute = "creationDate"
op = "after" // Maps to 'after' in the UI
values = ["2024-05-03T15:57:30Z"]
}
clauses {
attribute = "version"
op = "semVerEqual" // Maps to 'semantic version is one of (=)' in the UI
values = ["1.0.0", "1.0.1"]
context_kind = "application"
}
clauses {
attribute = "version"
op = "semVerLessThan" // Maps to 'semantic version less than (<)' in the UI
values = ["1.0.0"]
context_kind = "application"
}
clauses {
attribute = "version"
op = "semVerGreaterThan" // Maps to 'semantic version greater than (>)' in the UI
values = ["1.0.0"]
context_kind = "application"
}
clauses {
attribute = "context"
op = "segmentMatch" // Maps to 'Context is in' in the UI
values = ["test-segment"]
}
variation = 0
}

fallthrough {
variation = 1
}
off_variation = 0
}
```

<!-- schema generated by tfplugindocs -->
Expand Down Expand Up @@ -140,7 +250,7 @@ Optional:
Required:

- `attribute` (String) The user attribute to operate on
- `op` (String) The operator associated with the rule clause. Available options are `in`, `endsWith`, `startsWith`, `matches`, `contains`, `lessThan`, `lessThanOrEqual`, `greaterThanOrEqual`, `before`, `after`, `segmentMatch`, `semVerEqual`, `semVerLessThan`, and `semVerGreaterThan`.
- `op` (String) The operator associated with the rule clause. Available options are `in`, `endsWith`, `startsWith`, `matches`, `contains`, `lessThan`, `lessThanOrEqual`, `greaterThanOrEqual`, `before`, `after`, `segmentMatch`, `semVerEqual`, `semVerLessThan`, and `semVerGreaterThan`. Read LaunchDarkly's [Operators](https://docs.launchdarkly.com/sdk/concepts/flag-evaluation-rules#operators) documentation for more information.
- `values` (List of String) The list of values associated with the rule clause.

Optional:
Expand Down
93 changes: 92 additions & 1 deletion docs/resources/segment.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This resource allows you to create and manage segments within your LaunchDarkly
## Example Usage

```terraform
# This example shows the use of tags, targets, context targets, and rules for a segment
resource "launchdarkly_segment" "example" {
key = "example-segment-key"
project_key = launchdarkly_project.example.key
Expand All @@ -41,6 +42,7 @@ resource "launchdarkly_segment" "example" {
}
}

# This example shows a segment configured to have an unbounded number of individual targets
resource "launchdarkly_segment" "big-example" {
key = "example-big-segment-key"
project_key = launchdarkly_project.example.key
Expand All @@ -51,6 +53,95 @@ resource "launchdarkly_segment" "big-example" {
unbounded = true
unbounded_context_kind = "user"
}

# This example shows a segment with a targeting rule that uses all clause operators
resource "launchdarkly_segment" "segment_with_all_clause_operators" {
name = "Segment with all clause operators"
key = "segment-operators"
project_key = "projectx"
env_key = "development"

rules {
clauses {
attribute = "username"
op = "in" // Maps to 'is one of' in the UI
values = ["henrietta powell", "wally waterbear"]
}
clauses {
attribute = "username"
op = "endsWith" // Maps to 'ends with' in the UI
values = ["powell", "waterbear"]
}
clauses {
attribute = "username"
op = "startsWith" // Maps to 'starts with' in the UI
values = ["henrietta", "wally"]
}
clauses {
attribute = "username"
op = "matches" // Maps to 'matches regex' in the UI
values = ["henr*"]
}
clauses {
attribute = "username"
op = "contains" // Maps to 'contains' in the UI
values = ["water"]
}
clauses {
attribute = "pageVisits"
op = "lessThan" // Maps to 'less than (<)' in the UI
values = [100]
}
clauses {
attribute = "pageVisits"
op = "lessThanOrEqual" // Maps to 'less than or equal to (<=)' in the UI
values = [100]
}
clauses {
attribute = "pageVisits"
op = "greaterThan" // Maps to 'greater than (>)' in the UI
values = [100]
}
clauses {
attribute = "pageVisits"
op = "greaterThanOrEqual" // Maps to 'greater than or equal to (>=)' in the UI
values = [100]
}
clauses {
attribute = "creationDate"
op = "before" // Maps to 'before' in the UI
values = ["2024-05-03T15:57:30Z"]
}
clauses {
attribute = "creationDate"
op = "after" // Maps to 'after' in the UI
values = ["2024-05-03T15:57:30Z"]
}
clauses {
attribute = "version"
op = "semVerEqual" // Maps to 'semantic version is one of (=)' in the UI
values = ["1.0.0", "1.0.1"]
context_kind = "application"
}
clauses {
attribute = "version"
op = "semVerLessThan" // Maps to 'semantic version less than (<)' in the UI
values = ["1.0.0"]
context_kind = "application"
}
clauses {
attribute = "version"
op = "semVerGreaterThan" // Maps to 'semantic version greater than (>)' in the UI
values = ["1.0.0"]
context_kind = "application"
}
clauses {
attribute = "context"
op = "segmentMatch" // Maps to 'Context is in' in the UI
values = ["test-segment"]
}
}
}
```

<!-- schema generated by tfplugindocs -->
Expand Down Expand Up @@ -114,7 +205,7 @@ Optional:
Required:

- `attribute` (String) The user attribute to operate on
- `op` (String) The operator associated with the rule clause. Available options are `in`, `endsWith`, `startsWith`, `matches`, `contains`, `lessThan`, `lessThanOrEqual`, `greaterThanOrEqual`, `before`, `after`, `segmentMatch`, `semVerEqual`, `semVerLessThan`, and `semVerGreaterThan`.
- `op` (String) The operator associated with the rule clause. Available options are `in`, `endsWith`, `startsWith`, `matches`, `contains`, `lessThan`, `lessThanOrEqual`, `greaterThanOrEqual`, `before`, `after`, `segmentMatch`, `semVerEqual`, `semVerLessThan`, and `semVerGreaterThan`. Read LaunchDarkly's [Operators](https://docs.launchdarkly.com/sdk/concepts/flag-evaluation-rules#operators) documentation for more information.
- `values` (List of String) The list of values associated with the rule clause.

Optional:
Expand Down
110 changes: 110 additions & 0 deletions examples/resources/launchdarkly_feature_flag_environment/resource.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This example shows the use of prerequisites, targets, context targets, rules, and fallthrough for a feature flag environment
resource "launchdarkly_feature_flag_environment" "number_ff_env" {
flag_id = launchdarkly_feature_flag.number.id
env_key = launchdarkly_environment.staging.key
Expand Down Expand Up @@ -47,3 +48,112 @@ resource "launchdarkly_feature_flag_environment" "number_ff_env" {
}
off_variation = 2
}

# This example shows the minimum configuration required to create a feature flag environment
resource "launchdarkly_feature_flag_environment" "basic_flag_environment" {
flag_id = launchdarkly_feature_flag.basic_flag.id
env_key = "development"

on = true

fallthrough {
variation = 1
}
off_variation = 0
}

# This example shows a feature flag environment with a targeting rule that uses every clause operator
resource "launchdarkly_feature_flag_environment" "big_flag_environment" {
flag_id = launchdarkly_feature_flag.big_flag.id
env_key = "development"

on = true

rules {
description = "Example targeting rule with every clause operator"
clauses {
attribute = "username"
op = "in" // Maps to 'is one of' in the UI
values = ["henrietta powell", "wally waterbear"]
}
clauses {
attribute = "username"
op = "endsWith" // Maps to 'ends with' in the UI
values = ["powell", "waterbear"]
}
clauses {
attribute = "username"
op = "startsWith" // Maps to 'starts with' in the UI
values = ["henrietta", "wally"]
}
clauses {
attribute = "username"
op = "matches" // Maps to 'matches regex' in the UI
values = ["henr*"]
}
clauses {
attribute = "username"
op = "contains" // Maps to 'contains' in the UI
values = ["water"]
}
clauses {
attribute = "pageVisits"
op = "lessThan" // Maps to 'less than (<)' in the UI
values = [100]
}
clauses {
attribute = "pageVisits"
op = "lessThanOrEqual" // Maps to 'less than or equal to (<=)' in the UI
values = [100]
}
clauses {
attribute = "pageVisits"
op = "greaterThan" // Maps to 'greater than (>)' in the UI
values = [100]
}
clauses {
attribute = "pageVisits"
op = "greaterThanOrEqual" // Maps to 'greater than or equal to (>=)' in the UI
values = [100]
}
clauses {
attribute = "creationDate"
op = "before" // Maps to 'before' in the UI
values = ["2024-05-03T15:57:30Z"]
}
clauses {
attribute = "creationDate"
op = "after" // Maps to 'after' in the UI
values = ["2024-05-03T15:57:30Z"]
}
clauses {
attribute = "version"
op = "semVerEqual" // Maps to 'semantic version is one of (=)' in the UI
values = ["1.0.0", "1.0.1"]
context_kind = "application"
}
clauses {
attribute = "version"
op = "semVerLessThan" // Maps to 'semantic version less than (<)' in the UI
values = ["1.0.0"]
context_kind = "application"
}
clauses {
attribute = "version"
op = "semVerGreaterThan" // Maps to 'semantic version greater than (>)' in the UI
values = ["1.0.0"]
context_kind = "application"
}
clauses {
attribute = "context"
op = "segmentMatch" // Maps to 'Context is in' in the UI
values = ["test-segment"]
}
variation = 0
}

fallthrough {
variation = 1
}
off_variation = 0
}
Loading