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.16.0 release #189

Merged
merged 194 commits into from
Oct 17, 2023
Merged
Changes from 1 commit
Commits
Show all changes
194 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
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
Prev Previous commit
Next Next commit
Generate launchdarkly_feature_flag resource and data source documen…
…tation. (#324)

* Generate feature flag resource documentation

* Generate feature flag data source documentation

* Use addForceNewDescription in more places
  • Loading branch information
ldhenry authored Aug 14, 2023
commit caefe278d853e7d497dfe1fa9476398d90108de5
4 changes: 2 additions & 2 deletions docs/data-sources/audit_log_subscription.md
Original file line number Diff line number Diff line change
@@ -27,8 +27,8 @@ data "launchdarkly_audit_log_subscription" "test" {

### Required

- `id` (String) The audit log subscription ID
- `integration_key` (String) The integration key. Supported integration keys are `cloudtrail`, `datadog`, `dynatrace`, `elastic`, `grafana`, `honeycomb`, `logdna`, `msteams`, `new-relic-apm`, `signalfx`, `slack`, and `splunk`. A change in this field will force the destruction of the existing resource and the creation of a new one.
- `id` (String) The audit log subscription ID.
- `integration_key` (String) The integration key. Supported integration keys are `cloudtrail`, `datadog`, `dynatrace`, `elastic`, `grafana`, `honeycomb`, `logdna`, `msteams`, `new-relic-apm`, `signalfx`, `slack`, and `splunk`.

### Read-Only

2 changes: 1 addition & 1 deletion docs/data-sources/environment.md
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ data "launchdarkly_environment" "example" {

### Required

- `key` (String) The project-unique key for the environment. A change in this field will force the destruction of the existing resource and the creation of a new one.
- `key` (String) The project-unique key for the environment.
- `project_key` (String) The environment's project key.

### Read-Only
105 changes: 48 additions & 57 deletions docs/data-sources/feature_flag.md
Original file line number Diff line number Diff line change
@@ -1,93 +1,84 @@
---
layout: "launchdarkly"
page_title: "LaunchDarkly: launchdarkly_feature_flag"
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "launchdarkly_feature_flag Data Source - launchdarkly"
subcategory: ""
description: |-
Get information about LaunchDarkly feature flags.
Provides a LaunchDarkly feature flag data source.
This data source allows you to retrieve feature flag information from your LaunchDarkly organization.
---

# launchdarkly_feature_flag
# launchdarkly_feature_flag (Data Source)

Provides a LaunchDarkly feature flag data source.

This data source allows you to retrieve feature flag information from your LaunchDarkly organization.

## Example Usage

```hcl
```terraform
data "launchdarkly_feature_flag" "example" {
key = "example-flag"
project_key = "example-project"
}
```

## Argument Reference
<!-- schema generated by tfplugindocs -->
## Schema

- `project_key` - (Required) The feature flag's project key.
### Required

- `key` - (Required) The unique feature flag key that references the flag in your application code.
- `key` (String) The unique feature flag key that references the flag in your application code.
- `project_key` (String) The feature flag's project key.

## Attributes Reference
### Read-Only

In addition to the arguments above, the resource exports the following attributes if set:
- `archived` (Boolean) Specifies whether the flag is archived or not. Note that you cannot create a new flag that is archived, but can update a flag to be archived.
- `client_side_availability` (List of Object) (see [below for nested schema](#nestedatt--client_side_availability))
- `custom_properties` (Set of Object) List of nested blocks describing the feature flag's [custom properties](https://docs.launchdarkly.com/home/connecting/custom-properties) (see [below for nested schema](#nestedatt--custom_properties))
- `defaults` (List of Object) A block containing the indices of the variations to be used as the default on and off variations in all new environments. Flag configurations in existing environments will not be changed nor updated if the configuration block is removed. (see [below for nested schema](#nestedatt--defaults))
- `description` (String) The feature flag's description.
- `id` (String) The ID of this resource.
- `include_in_snippet` (Boolean, Deprecated) Specifies whether this flag should be made available to the client-side JavaScript SDK using the client-side Id. This value gets its default from your project configuration if not set. `include_in_snippet` is now deprecated. Please migrate to `client_side_availability.using_environment_id` to maintain future compatibility.
- `maintainer_id` (String) The feature flag maintainer's 24 character alphanumeric team member ID. If not set, it will automatically be or stay set to the member ID associated with the API key used by your LaunchDarkly Terraform provider or the most recently-set maintainer.
- `name` (String) The feature flag's human-readable name
- `tags` (Set of String) Tags associated with your resource.
- `temporary` (Boolean) Specifies whether the flag is a temporary flag.
- `variation_type` (String) The uniform type for all variations. Can be either "boolean", "string", "number", or "json".
- `variations` (List of Object) An array of possible variations for the flag (see [below for nested schema](#nestedatt--variations))

- `id` - The unique feature flag ID in the format `project_key/flag_key`.
<a id="nestedatt--client_side_availability"></a>
### Nested Schema for `client_side_availability`

- `name` - The human-readable name of the feature flag.
Read-Only:

- `variation_type` - The feature flag's variation type: `boolean`, `string`, `number` or `json`.
- `using_environment_id` (Boolean)
- `using_mobile_key` (Boolean)

- `variations` - List of nested blocks describing the variations associated with the feature flag. To learn more, read [Nested Variations Blocks](#nested-variations-blocks).

- `defaults` - A map describing the index of the variation served when the flag is on for new environments. To learn more, read [Nested Defaults Blocks](#nested-defaults-blocks).
<a id="nestedatt--custom_properties"></a>
### Nested Schema for `custom_properties`

- `description` - The feature flag's description.
Read-Only:

- `tags` - Set of feature flag tags.
- `key` (String)
- `name` (String)
- `value` (List of String)

- `maintainer_id` - The feature flag maintainer's 24 character alphanumeric team member ID.

- `temporary` - Whether the flag is a temporary flag.
<a id="nestedatt--defaults"></a>
### Nested Schema for `defaults`

- `archived` - Whether the flag is archived.
Read-Only:

- `include_in_snippet` - **Deprecated** A boolean describing whether this flag has been made available to the client-side Javescript SDK using the client-side ID only. `include_in_snippet` is now deprecated. Please retrieve information from `client_side_availability.using_environment_id` to maintain future compatability.
- `off_variation` (Number)
- `on_variation` (Number)

- `client_side_availability` - A map describing whether this flag has been made available to the client-side JavaScript SDK. To learn more, read [Nested Client-Side Availability Block](#nested-client-side-availability-block).

- `custom_properties` - List of nested blocks describing the feature flag's [custom properties](https://docs.launchdarkly.com/home/connecting/custom-properties). To learn more, read [Nested Custom Properties](#nested-custom-properties).
<a id="nestedatt--variations"></a>
### Nested Schema for `variations`

### Nested Variations Blocks
Read-Only:

Nested `variations` blocks have the following attributes:

- `value` - The variation value.

- `name` - The name of the variation.

- `description` - The variation's description.

### Nested Defaults Blocks

Nested `defaults` blocks have the following structure:

- `on_variation` - (Required) The index of the variation the flag will default to in all new environments when on.

- `off_variation` - (Required) The index of the variation the flag will default to in all new environments when off.

### Nested Client-Side Availability Block

The nested `client_side_availability` block has the following attributes:

- `using_environment_id` - When set to true, this flag is available to SDKs using the client-side ID.

- `using_mobile_key` - When set to true, this flag is available to SDKs using a mobile key.

### Nested Custom Properties

Nested `custom_properties` have the following attributes:

- `key` - The unique custom property key.

- `name` - The name of the custom property.

- `value` - The list of custom property value strings.
- `description` (String)
- `name` (String)
- `value` (String)
4 changes: 2 additions & 2 deletions docs/data-sources/feature_flag_environment.md
Original file line number Diff line number Diff line change
@@ -27,8 +27,8 @@ data "launchdarkly_feature_flag_environment" "example" {

### Required

- `env_key` (String) The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- `flag_id` (String) The feature flag's unique `id` in the format `project_key/flag_key`. A change in this field will force the destruction of the existing resource and the creation of a new one.
- `env_key` (String) The environment key.
- `flag_id` (String) The feature flag's unique `id` in the format `project_key/flag_key`.

### Read-Only

134 changes: 64 additions & 70 deletions docs/resources/feature_flag.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
---
layout: "launchdarkly"
page_title: "LaunchDarkly: launchdarkly_feature_flag"
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "launchdarkly_feature_flag Resource - launchdarkly"
subcategory: ""
description: |-
Create and manage LaunchDarkly feature flags.
Provides a LaunchDarkly feature flag resource.
This resource allows you to create and manage feature flags within your LaunchDarkly organization.
---

# launchdarkly_feature_flag
# launchdarkly_feature_flag (Resource)

Provides a LaunchDarkly feature flag resource.

This resource allows you to create and manage feature flags within your LaunchDarkly organization.

## Example Usage

```hcl
```terraform
resource "launchdarkly_feature_flag" "building_materials" {
project_key = launchdarkly_project.example.key
key = "building-materials"
@@ -38,12 +40,12 @@ resource "launchdarkly_feature_flag" "building_materials" {
}

client_side_availability {
using_environment_id = false
using_mobile_key = true
}
using_environment_id = false
using_mobile_key = true
}

defaults {
on_variation = 2
on_variation = 2
off_variation = 0
}

@@ -54,9 +56,7 @@ resource "launchdarkly_feature_flag" "building_materials" {
"building-materials",
]
}
```

```hcl
resource "launchdarkly_feature_flag" "json_example" {
project_key = "example-project"
key = "json-example"
@@ -73,98 +73,92 @@ resource "launchdarkly_feature_flag" "json_example" {
}

defaults {
on_variation = 1
on_variation = 1
off_variation = 0
}
}
```

## Argument Reference
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `key` (String) The unique feature flag key that references the flag in your application code. A change in this field will force the destruction of the existing resource and the creation of a new one.
- `name` (String) The human-readable name of the feature flag.
- `project_key` (String) The feature flag's project key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- `variation_type` (String) The feature flag's variation type: `boolean`, `string`, `number` or `json`.

- `project_key` - (Required) The feature flag's project key. A change in this field will force the destruction of the existing resource and the creation of a new one.
### Optional

- `key` - (Required) The unique feature flag key that references the flag in your application code. A change in this field will force the destruction of the existing resource and the creation of a new one.
- `archived` (Boolean) Specifies whether the flag is archived or not. Note that you cannot create a new flag that is archived, but can update a flag to be archived.
- `client_side_availability` (Block List) (see [below for nested schema](#nestedblock--client_side_availability))
- `custom_properties` (Block Set, Max: 64) List of nested blocks describing the feature flag's [custom properties](https://docs.launchdarkly.com/home/connecting/custom-properties) (see [below for nested schema](#nestedblock--custom_properties))
- `defaults` (Block List, Max: 1) A block containing the indices of the variations to be used as the default on and off variations in all new environments. Flag configurations in existing environments will not be changed nor updated if the configuration block is removed. (see [below for nested schema](#nestedblock--defaults))
- `description` (String) The feature flag's description.
- `include_in_snippet` (Boolean, Deprecated) Specifies whether this flag should be made available to the client-side JavaScript SDK using the client-side Id. This value gets its default from your project configuration if not set. `include_in_snippet` is now deprecated. Please migrate to `client_side_availability.using_environment_id` to maintain future compatibility.
- `maintainer_id` (String) The feature flag maintainer's 24 character alphanumeric team member ID. If not set, it will automatically be or stay set to the member ID associated with the API key used by your LaunchDarkly Terraform provider or the most recently-set maintainer.
- `tags` (Set of String) Tags associated with your resource.
- `temporary` (Boolean) Specifies whether the flag is a temporary flag.
- `variations` (Block List) An array of possible variations for the flag (see [below for nested schema](#nestedblock--variations))

- `name` - (Required) The human-readable name of the feature flag.
### Read-Only

- `variation_type` - (Required) The feature flag's variation type: `boolean`, `string`, `number` or `json`.
- `id` (String) The ID of this resource.

- `variations` - (Required) List of nested blocks describing the variations associated with the feature flag. You must specify at least two variations. To learn more, read [Nested Variations Blocks](#nested-variations-blocks).
<a id="nestedblock--client_side_availability"></a>
### Nested Schema for `client_side_availability`

- `defaults` - (Optional) A block containing the indices of the variations to be used as the default on and off variations in all new environments. Flag configurations in existing environments will not be changed nor updated if the configuration block is removed. To learn more, read [Nested Defaults Blocks](#nested-defaults-blocks).
Optional:

- `description` - (Optional) The feature flag's description.
- `using_environment_id` (Boolean) Whether this flag is available to SDKs using the client-side ID.
- `using_mobile_key` (Boolean) Whether this flag is available to SDKs using a mobile key.

- `tags` - (Optional) Set of feature flag tags.

- `maintainer_id` - (Optional) The feature flag maintainer's 24 character alphanumeric team member ID. If not set, it will automatically be or stay set to the member ID associated with the API key used by your LaunchDarkly Terraform provider or the most recently-set maintainer.
<a id="nestedblock--custom_properties"></a>
### Nested Schema for `custom_properties`

- `temporary` - (Optional) Specifies whether the flag is a temporary flag.
Required:

- `archived` - (Optional) Specifies whether the flag is archived or not. Note that you cannot create a new flag that is archived, but can update a flag to be archived.
- `key` (String) The unique custom property key.
- `name` (String) The name of the custom property.
- `value` (List of String) The list of custom property value strings.

- `include_in_snippet` - **Deprecated** (Optional) Specifies whether this flag should be made available to the client-side JavaScript SDK using the client-side Id. This value gets its default from your project configuration if not set. `include_in_snippet` is now deprecated. Please migrate to `client_side_availability.using_environment_id` to maintain future compatability.

- `client_side_availability` - (Optional) A block describing whether this flag should be made available to the client-side JavaScript SDK using the client-side Id, mobile key, or both. This value gets its default from your project configuration if not set. Once set, if removed, it will retain its last set value. To learn more, read [Nested Client-Side Availability Block](#nested-client-side-availability-block).
<a id="nestedblock--defaults"></a>
### Nested Schema for `defaults`

- `custom_properties` - (Optional) List of nested blocks describing the feature flag's [custom properties](https://docs.launchdarkly.com/home/connecting/custom-properties). To learn more, read [Nested Custom Properties](#nested-custom-properties).
Required:

### Nested Variations Blocks
- `off_variation` (Number) The index of the variation the flag will default to in all new environments when off.
- `on_variation` (Number) The index of the variation the flag will default to in all new environments when on.

Nested `variations` blocks have the following structure:

- `value` - (Required) The variation value. The value's type must correspond to the `variation_type` argument. For example: `variation_type = "boolean"` accepts only `true` or `false`. The `"number"` variation type accepts both floats and ints, but please note that any trailing zeroes on floats will be trimmed (i.e. `1.1` and `1.100` will both be converted to `1.1`).
<a id="nestedblock--variations"></a>
### Nested Schema for `variations`

Required:

- `value` (String) The variation value. The value's type must correspond to the `variation_type` argument. For example: `variation_type = "boolean"` accepts only `true` or `false`. The `number` variation type accepts both floats and ints, but please note that any trailing zeroes on floats will be trimmed (i.e. `1.1` and `1.100` will both be converted to `1.1`).

If you wish to define an empty string variation, you must still define the value field on the variations block like so:

```
```terraform
variations {
value = ""
}
```

- `name` - (Optional) The name of the variation.

- `description` - (Optional) The variation's description.

### Nested Defaults Blocks

Nested `defaults` blocks have the following structure:

- `on_variation` - (Required) The index of the variation the flag will default to in all new environments when on.

- `off_variation` - (Required) The index of the variation the flag will default to in all new environments when off.

### Nested Client-Side Availability Block
Optional:

The nested `client_side_availability` block has the following structure:

- `using_environment_id` - (Optional) Whether this flag is available to SDKs using the client-side ID.

- `using_mobile_key` - (Optional) Whether this flag is available to SDKs using a mobile key.

### Nested Custom Properties

Nested `custom_properties` have the following structure:

- `key` - (Required) The unique custom property key.

- `name` - (Required) The name of the custom property.

- `value` - (Required) The list of custom property value strings.

## Attributes Reference

In addition to the arguments above, the resource exports the following attribute:

- `id` - The unique feature flag ID in the format `project_key/flag_key`.
- `description` (String) The variation's description.
- `name` (String) The name of the variation.

## Import

You can import a feature flag using the feature flag's ID in the format `project_key/flag_key`.

For example:
Import is supported using the following syntax:

```
$ terraform import launchdarkly_feature_flag.building_materials example-project/building-materials
```shell
# Import a feature flag using the feature flag's ID in the format `project_key/flag_key`.
terraform import launchdarkly_feature_flag.building_materials example-project/building-materials
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data "launchdarkly_feature_flag" "example" {
key = "example-flag"
project_key = "example-project"
}
2 changes: 2 additions & 0 deletions examples/resources/launchdarkly_feature_flag/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Import a feature flag using the feature flag's ID in the format `project_key/flag_key`.
terraform import launchdarkly_feature_flag.building_materials example-project/building-materials
Loading