Skip to content

Commit

Permalink
prepare 2.21.0 release (#220)
Browse files Browse the repository at this point in the history
* Imiller/sc 151834/add base permissions to custom role resource (#205)

* update changelog

* messed up the version number

* add base permissions to custom role resource & doc

* update tests

* Backmerge/release 2.7.0 (#206)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* prepare 2.6.1 release (#94)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge/release 2.6.0 (#201)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* fix doc issues (#202)

* [sc-149869] roll back documentation changes regarding (#203)

* Revert "[sc 148065] add approvals bypass to terraform docs (#200)"

This reverts commit e722f061047d0d433c8a5fbcc76fbe4e45eedef7.

* update changelog

* update changelog

* prepare 2.6.1 release

* Merge remote-tracking branch public/main into release-2.6.1

* update changelog

* update readme

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* Prepare 2.7.0 release (#98)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge/release 2.6.0 (#201)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* fix doc issues (#202)

* [sc-149869] roll back documentation changes regarding (#203)

* Revert "[sc 148065] add approvals bypass to terraform docs (#200)"

This reverts commit e722f061047d0d433c8a5fbcc76fbe4e45eedef7.

* update changelog

* update changelog

* backmerge 2.6.1 (#204)

* Imiller/sc 151834/add base permissions to custom role resource (#205)

* update changelog

* messed up the version number

* add base permissions to custom role resource & doc

* update tests

* auto-generate integration configs

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Fabian <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Fabian <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>
Co-authored-by: Fabian <[email protected]>

* (bug-fix) Update modules to accept new API header

Hashicorp [recently added a Release
API](https://www.hashicorp.com/blog/announcing-the-hashicorp-releases-api)
that includes a new `Content-Type` header
`application/vnd+hashicorp.releases-api.v0+json`. This gets used
somewhere in making requests, but the `hc-install` Go library was
previously at version 0.3.1 which raised an error when it encountered
this header. V0.3.2 accepts the header, so this updates the Go modules
in this repo using `go get -u && go mod tidy`.

* Update circleci test timeout to 15 seconds

The circleci test failed because the test took 10.10 seconds. So let's update the timeout to 15 seconds from 10.
link to old test failure:
https://app.circleci.com/pipelines/github/launchdarkly/terraform-provider-launchdarkly-private/1452/workflows/51a2008f-0c3e-4b7d-af3b-3c1d84387b84/jobs/1847?invite=true#step-113-330%7CError

* Regenerate auditlog configs to resolve CI failures (#211)

* Regenerate auditlog configs

* Run make generate again

* Run make generate to supress CI failures (#212)

* added a check for environment and warning

* fix go lint error

* use environmentExists function

* remove grafana

* Update changelog with bug fix for datasource feature flag environment

* added changes

* upgrade go version 1.18.1 (#217)

* upgrade go version

* Upgrade to go 1.18.1

* Upgrade go version everywhere

* Upgrade circle linter to V2

* Add cache prefix to linter

* Turn cache prefix into string

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge public/release v2.7.1 3 (#219)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* prepare 2.6.1 release (#94)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge/release 2.6.0 (#201)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* fix doc issues (#202)

* [sc-149869] roll back documentation changes regarding (#203)

* Revert "[sc 148065] add approvals bypass to terraform docs (#200)"

This reverts commit e722f061047d0d433c8a5fbcc76fbe4e45eedef7.

* update changelog

* update changelog

* prepare 2.6.1 release

* Merge remote-tracking branch public/main into release-2.6.1

* update changelog

* update readme

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* Prepare 2.7.0 release (#98)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge/release 2.6.0 (#201)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* fix doc issues (#202)

* [sc-149869] roll back documentation changes regarding (#203)

* Revert "[sc 148065] add approvals bypass to terraform docs (#200)"

This reverts commit e722f061047d0d433c8a5fbcc76fbe4e45eedef7.

* update changelog

* update changelog

* backmerge 2.6.1 (#204)

* Imiller/sc 151834/add base permissions to custom role resource (#205)

* update changelog

* messed up the version number

* add base permissions to custom role resource & doc

* update tests

* auto-generate integration configs

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Fabian <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* Prepare 2.7.1 release (#103)

- Datasource `launchdarkly_feature_flag_environment` now checks whether the environment exists and print out a more descriptive error. [#101](https://github.com/launchdarkly/terraform-provider-launchdarkly/issues/101)

* Prepare release 2.7.1 2 (#104)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge/release 2.6.0 (#201)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* fix doc issues (#202)

* [sc-149869] roll back documentation changes regarding (#203)

* Revert "[sc 148065] add approvals bypass to terraform docs (#200)"

This reverts commit e722f061047d0d433c8a5fbcc76fbe4e45eedef7.

* update changelog

* update changelog

* backmerge 2.6.1 (#204)

* Imiller/sc 151834/add base permissions to custom role resource (#205)

* update changelog

* messed up the version number

* add base permissions to custom role resource & doc

* update tests

* Backmerge/release 2.7.0 (#206)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* prepare 2.6.1 release (#94)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge/release 2.6.0 (#201)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* fix doc issues (#202)

* [sc-149869] roll back documentation changes regarding (#203)

* Revert "[sc 148065] add approvals bypass to terraform docs (#200)"

This reverts commit e722f061047d0d433c8a5fbcc76fbe4e45eedef7.

* update changelog

* update changelog

* prepare 2.6.1 release

* Merge remote-tracking branch public/main into release-2.6.1

* update changelog

* update readme

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* Prepare 2.7.0 release (#98)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge/release 2.6.0 (#201)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* fix doc issues (#202)

* [sc-149869] roll back documentation changes regarding (#203)

* Revert "[sc 148065] add approvals bypass to terraform docs (#200)"

This reverts commit e722f061047d0d433c8a5fbcc76fbe4e45eedef7.

* update changelog

* update changelog

* backmerge 2.6.1 (#204)

* Imiller/sc 151834/add base permissions to custom role resource (#205)

* update changelog

* messed up the version number

* add base permissions to custom role resource & doc

* update tests

* auto-generate integration configs

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Fabian <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Fabian <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>
Co-authored-by: Fabian <[email protected]>

* (bug-fix) Update modules to accept new API header

Hashicorp [recently added a Release
API](https://www.hashicorp.com/blog/announcing-the-hashicorp-releases-api)
that includes a new `Content-Type` header
`application/vnd+hashicorp.releases-api.v0+json`. This gets used
somewhere in making requests, but the `hc-install` Go library was
previously at version 0.3.1 which raised an error when it encountered
this header. V0.3.2 accepts the header, so this updates the Go modules
in this repo using `go get -u && go mod tidy`.

* Update circleci test timeout to 15 seconds

The circleci test failed because the test took 10.10 seconds. So let's update the timeout to 15 seconds from 10.
link to old test failure:
https://app.circleci.com/pipelines/github/launchdarkly/terraform-provider-launchdarkly-private/1452/workflows/51a2008f-0c3e-4b7d-af3b-3c1d84387b84/jobs/1847?invite=true#step-113-330%7CError

* Regenerate auditlog configs to resolve CI failures (#211)

* Regenerate auditlog configs

* Run make generate again

* Run make generate to supress CI failures (#212)

* added a check for environment and warning

* fix go lint error

* use environmentExists function

* remove grafana

* Update changelog with bug fix for datasource feature flag environment

* added changes

* upgrade go version 1.18.1 (#217)

* upgrade go version

* Upgrade to go 1.18.1

* Upgrade go version everywhere

* Upgrade circle linter to V2

* Add cache prefix to linter

* Turn cache prefix into string

Co-authored-by: Henry Barrow <[email protected]>

* remove checked in testing examples

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Fabian <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>
Co-authored-by: Fabian <[email protected]>
Co-authored-by: Lucy Voigt <[email protected]>
Co-authored-by: Lucy Voigt <[email protected]>
Co-authored-by: Sunny Guduru <[email protected]>

* fix merge issue in Circle config (#105)

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Fabian <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>
Co-authored-by: Fabian <[email protected]>
Co-authored-by: Sunny Guduru <[email protected]>
Co-authored-by: Lucy Voigt <[email protected]>
Co-authored-by: Lucy Voigt <[email protected]>

* Remove invalid integration configurations (#221)

* Add blacklist to manifest codegen and remove Zapier. (#222)

* Update blacklist to codegen and remove Zapier

* Update changelog

* Backmerge release 2.7.2 (#223)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* prepare 2.6.1 release (#94)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge/release 2.6.0 (#201)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* fix doc issues (#202)

* [sc-149869] roll back documentation changes regarding (#203)

* Revert "[sc 148065] add approvals bypass to terraform docs (#200)"

This reverts commit e722f061047d0d433c8a5fbcc76fbe4e45eedef7.

* update changelog

* update changelog

* prepare 2.6.1 release

* Merge remote-tracking branch public/main into release-2.6.1

* update changelog

* update readme

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* Prepare 2.7.0 release (#98)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge/release 2.6.0 (#201)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* fix doc issues (#202)

* [sc-149869] roll back documentation changes regarding (#203)

* Revert "[sc 148065] add approvals bypass to terraform docs (#200)"

This reverts commit e722f061047d0d433c8a5fbcc76fbe4e45eedef7.

* update changelog

* update changelog

* backmerge 2.6.1 (#204)

* Imiller/sc 151834/add base permissions to custom role resource (#205)

* update changelog

* messed up the version number

* add base permissions to custom role resource & doc

* update tests

* auto-generate integration configs

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Fabian <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* Prepare 2.7.1 release (#103)

- Datasource `launchdarkly_feature_flag_environment` now checks whether the environment exists and print out a more descriptive error. [#101](https://github.com/launchdarkly/terraform-provider-launchdarkly/issues/101)

* Prepare release 2.7.1 2 (#104)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge/release 2.6.0 (#201)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* fix doc issues (#202)

* [sc-149869] roll back documentation changes regarding (#203)

* Revert "[sc 148065] add approvals bypass to terraform docs (#200)"

This reverts commit e722f061047d0d433c8a5fbcc76fbe4e45eedef7.

* update changelog

* update changelog

* backmerge 2.6.1 (#204)

* Imiller/sc 151834/add base permissions to custom role resource (#205)

* update changelog

* messed up the version number

* add base permissions to custom role resource & doc

* update tests

* Backmerge/release 2.7.0 (#206)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* prepare 2.6.1 release (#94)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge/release 2.6.0 (#201)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* fix doc issues (#202)

* [sc-149869] roll back documentation changes regarding (#203)

* Revert "[sc 148065] add approvals bypass to terraform docs (#200)"

This reverts commit e722f061047d0d433c8a5fbcc76fbe4e45eedef7.

* update changelog

* update changelog

* prepare 2.6.1 release

* Merge remote-tracking branch public/main into release-2.6.1

* update changelog

* update readme

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* Prepare 2.7.0 release (#98)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Backmerge/release 2.6.0 (#201)

* prepare release (#80)

* Prepare 2.4.1 release (#82)

* prepare 2.5.0 release (#87)

Co-authored-by: Isabelle Miller <[email protected]>

* prepare 2.6.0 release (#91)

* prepare release (#80) (#188)

* Do not allow 0% segment rule weights (#189)

* Prevent users from setting a 0% rollout

* Update changelog

* Fix bug

* Fix flag trigger creation panic (#190)

* Backmerge/release 2.4.1 (#191)

* Backmerge v2.4.1

* fix merge conflicts

* Add Slack webhooks to audit_log_subscription (#192)

* backmerge v2.5.0 (#193)

* Use jennifer to generate audit log subscription configs (#194)

* Run terraform provider acceptance tests daily and notify of failures (#196)

* Update changelog branch (#195)

* [ sc-143291] update autogenerated audit_log_subscription configs  (#197)

* update autogenerated configs to account for hideMemberDetails change to DDog integration

* update changelog

* Add test

* Update CHANGELOG.md

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* Increase checkpoint-api.harhicorp.com timeout to 10s (#198)

* Updated destination tests to use random env keys to avoid env conflict errors

* [sc 148065] add approvals bypass to terraform docs (#200)

* update docs to mention bypassing approval requests

* update changelog

* typo

* Apply suggestions from code review

Co-authored-by: Henry Barrow <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>

* prepare 2.5.1 release

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Clifford Tawiah <[email protected]>
Co-authored-by: Cliff Tawiah <[email protected]>

* fix doc issues (#202)

* [sc-149869] roll back documentation changes regarding (#203)

* Revert "[sc 148065] add approvals bypass to terraform docs (#200)"

This reverts commit e722f061047d0d433c8a5fbcc76fbe4e45eedef7.

* update changelog

* update changelog

* backmerge 2.6.1 (#204)

* Imiller/sc 151834/add base permissions to custom role resource (#205)

* update changelog

* messed up the version number

* add base permissions to custom role resource & doc

* update tests

* auto-generate integration configs

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Fabian <[email protected]>
Co-authored-by: Clifford Tawiah <ctawiah@launchdarkl…
  • Loading branch information
24 people authored Oct 24, 2024
1 parent 6e34cf5 commit 772ed84
Show file tree
Hide file tree
Showing 10 changed files with 556 additions and 20 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/jira-linker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Jira Issue Linker

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
jira-issue-link:
runs-on: ubuntu-latest
if: github.repository == 'launchdarkly/terraform-provider-launchdarkly-private'
steps:
- uses: launchdarkly-labs/ld-gh-actions-jira@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
jira-base-url: ${{ secrets.JIRA_BASE_URL }}
jira-username: ${{ secrets.JIRA_USERNAME }}
jira-api-token: ${{ secrets.JIRA_API_TOKEN }}
2 changes: 1 addition & 1 deletion docs/data-sources/audit_log_subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data "launchdarkly_audit_log_subscription" "test" {
### Required

- `id` (String) The audit log subscription ID.
- `integration_key` (String) The integration key. Supported integration keys are `chronosphere`, `cloudtrail`, `datadog`, `dynatrace`, `elastic`, `grafana`, `honeycomb`, `last9`, `logdna`, `msteams`, `new-relic-apm`, `signalfx`, `slack`, and `splunk`.
- `integration_key` (String) The integration key. Supported integration keys are `chronosphere`, `cloudtrail`, `datadog`, `dynatrace`, `elastic`, `grafana`, `honeycomb`, `kosli`, `last9`, `logdna`, `msteams`, `new-relic-apm`, `signalfx`, `slack`, and `splunk`.

### Read-Only

Expand Down
9 changes: 7 additions & 2 deletions docs/data-sources/metric.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,25 @@ data "launchdarkly_metric" "example" {

### Read-Only

- `analysis_type` (String) The method for analyzing metric events. Available choices are `mean` and `percentile`.
- `description` (String) The description of the metric's purpose.
- `event_key` (String) The event key for your metric (if custom metric)
- `id` (String) The ID of this resource.
- `is_active` (Boolean) Whether a metric is a active.
- `include_units_without_events` (Boolean) Include units that did not send any events and set their value to 0.
- `is_active` (Boolean, Deprecated) Ignored. All metrics are considered active.
- `is_numeric` (Boolean) Whether a `custom` metric is a numeric metric or not.
- `kind` (String) The metric type. Available choices are `click`, `custom`, and `pageview`.
- `maintainer_id` (String) The LaunchDarkly member ID of the member who will maintain the metric. If not set, the API will automatically apply the member associated with your Terraform API key or the most recently-set maintainer
- `name` (String) The human-friendly name for the metric.
- `percentile_value` (Number) The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysis_type is percentile.
- `randomization_units` (Set of String) A set of one or more context kinds that this metric can measure events from. Metrics can only use context kinds marked as "Available for experiments." For more information, read [Allocating experiment audiences](https://docs.launchdarkly.com/home/creating-experiments/allocation).
- `selector` (String) The CSS selector for your metric (if click metric)
- `success_criteria` (String) The success criteria for your metric (if numeric metric)
- `success_criteria` (String) The success criteria for your metric (if numeric metric). Available choices are `HigherThanBaseline` and `LowerThanBaseline`.
- `tags` (Set of String) Tags associated with your resource.
- `unit` (String) (Required for kind `custom`) The unit for numeric `custom` metrics.
- `unit_aggregation_type` (String) The method by which multiple unit event values are aggregated. Available choices are `average` and `sum`.
- `urls` (List of Object) List of nested `url` blocks describing URLs that you want to associate with the metric. (see [below for nested schema](#nestedatt--urls))
- `version` (Number) Version of the metric

<a id="nestedatt--urls"></a>
### Nested Schema for `urls`
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/audit_log_subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ resource "launchdarkly_audit_log_subscription" "example" {
### Required

- `config` (Map of String) The set of configuration fields corresponding to the value defined for `integration_key`. Refer to the `formVariables` field in the corresponding `integrations/<integration_key>/manifest.json` file in [this repo](https://github.com/launchdarkly/integration-framework/tree/master/integrations) for a full list of fields for the integration you wish to configure. **IMPORTANT**: Please note that Terraform will only accept these in snake case, regardless of the case shown in the manifest.
- `integration_key` (String) The integration key. Supported integration keys are `chronosphere`, `cloudtrail`, `datadog`, `dynatrace`, `elastic`, `grafana`, `honeycomb`, `last9`, `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.
- `integration_key` (String) The integration key. Supported integration keys are `chronosphere`, `cloudtrail`, `datadog`, `dynatrace`, `elastic`, `grafana`, `honeycomb`, `kosli`, `last9`, `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.
- `name` (String) A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.
- `on` (Boolean) Whether or not you want your subscription enabled, i.e. to actively send events.
- `statements` (Block List, Min: 1) A block representing the resources to which you wish to subscribe. (see [below for nested schema](#nestedblock--statements))
Expand Down
9 changes: 7 additions & 2 deletions docs/resources/metric.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,26 @@ resource "launchdarkly_metric" "example" {

### Optional

- `analysis_type` (String) The method for analyzing metric events. Available choices are `mean` and `percentile`.
- `description` (String) The description of the metric's purpose.
- `event_key` (String) The event key for your metric (if custom metric)
- `is_active` (Boolean) Whether a metric is a active.
- `include_units_without_events` (Boolean) Include units that did not send any events and set their value to 0.
- `is_active` (Boolean, Deprecated) Ignored. All metrics are considered active.
- `is_numeric` (Boolean) Whether a `custom` metric is a numeric metric or not.
- `maintainer_id` (String) The LaunchDarkly member ID of the member who will maintain the metric. If not set, the API will automatically apply the member associated with your Terraform API key or the most recently-set maintainer
- `percentile_value` (Number) The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysis_type is percentile.
- `randomization_units` (Set of String) A set of one or more context kinds that this metric can measure events from. Metrics can only use context kinds marked as "Available for experiments." For more information, read [Allocating experiment audiences](https://docs.launchdarkly.com/home/creating-experiments/allocation).
- `selector` (String) The CSS selector for your metric (if click metric)
- `success_criteria` (String) The success criteria for your metric (if numeric metric)
- `success_criteria` (String) The success criteria for your metric (if numeric metric). Available choices are `HigherThanBaseline` and `LowerThanBaseline`.
- `tags` (Set of String) Tags associated with your resource.
- `unit` (String) (Required for kind `custom`) The unit for numeric `custom` metrics.
- `unit_aggregation_type` (String) The method by which multiple unit event values are aggregated. Available choices are `average` and `sum`.
- `urls` (Block List) List of nested `url` blocks describing URLs that you want to associate with the metric. (see [below for nested schema](#nestedblock--urls))

### Read-Only

- `id` (String) The ID of this resource.
- `version` (Number) Version of the metric

<a id="nestedblock--urls"></a>
### Nested Schema for `urls`
Expand Down
18 changes: 18 additions & 0 deletions launchdarkly/integration_configs_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions launchdarkly/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const (
//gofmts:sort
ACTIONS = "actions"
ACTION_SET = "action_set"
ANALYSIS_TYPE = "analysis_type"
API_KEY = "api_key"
APPROVAL_SETTINGS = "approval_settings"
ARCHIVED = "archived"
Expand Down Expand Up @@ -56,6 +57,7 @@ const (
INCLUDED = "included"
INCLUDED_CONTEXTS = "included_contexts"
INCLUDE_IN_SNIPPET = "include_in_snippet"
INCLUDE_UNITS_WITHOUT_EVENTS = "include_units_without_events"
INLINE_ROLES = "inline_roles"
INSTRUCTIONS = "instructions"
INTEGRATION_KEY = "integration_key"
Expand All @@ -79,6 +81,7 @@ const (
ON_VARIATION = "on_variation"
OP = "op"
PATTERN = "pattern"
PERCENTILE_VALUE = "percentile_value"
POLICY = "policy"
POLICY_STATEMENTS = "policy_statements"
PREREQUISITES = "prerequisites"
Expand Down Expand Up @@ -113,6 +116,7 @@ const (
UNBOUNDED = "unbounded"
UNBOUNDED_CONTEXT_KIND = "unbounded_context_kind"
UNIT = "unit"
UNIT_AGGREGATION_TYPE = "unit_aggregation_type"
URL = "url"
URLS = "urls"
USING_ENVIRONMENT_ID = "using_environment_id"
Expand All @@ -123,5 +127,6 @@ const (
VARIATION = "variation"
VARIATIONS = "variations"
VARIATION_TYPE = "variation_type"
VERSION = "version"
WEIGHT = "weight"
)
47 changes: 45 additions & 2 deletions launchdarkly/metrics_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ func baseMetricSchema(isDataSource bool) map[string]*schema.Schema {
Type: schema.TypeBool,
Optional: !isDataSource,
Computed: isDataSource,
Description: "Whether a metric is a active.",
Description: "Ignored. All metrics are considered active.",
Default: false,
Deprecated: "No longer in use. This field will be removed in a future major release of the LaunchDarkly provider.",
},
IS_NUMERIC: {
Type: schema.TypeBool,
Expand Down Expand Up @@ -92,7 +93,7 @@ func baseMetricSchema(isDataSource bool) map[string]*schema.Schema {
SUCCESS_CRITERIA: {
Type: schema.TypeString,
Optional: !isDataSource,
Description: "The success criteria for your metric (if numeric metric)",
Description: "The success criteria for your metric (if numeric metric). Available choices are `HigherThanBaseline` and `LowerThanBaseline`.",
ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HigherThanBaseline", "LowerThanBaseline"}, false)),
Computed: true,
ComputedWhen: []string{KIND},
Expand All @@ -115,6 +116,41 @@ func baseMetricSchema(isDataSource bool) map[string]*schema.Schema {
Computed: true,
Description: `A set of one or more context kinds that this metric can measure events from. Metrics can only use context kinds marked as "Available for experiments." For more information, read [Allocating experiment audiences](https://docs.launchdarkly.com/home/creating-experiments/allocation).`,
},
INCLUDE_UNITS_WITHOUT_EVENTS: {
Type: schema.TypeBool,
Optional: !isDataSource,
Computed: true,
Description: "Include units that did not send any events and set their value to 0.",
},
UNIT_AGGREGATION_TYPE: {
Type: schema.TypeString,
Optional: !isDataSource,
Computed: isDataSource,
Description: "The method by which multiple unit event values are aggregated. Available choices are `average` and `sum`.",
ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"average", "sum"}, false)),
Default: "average",
},
ANALYSIS_TYPE: {
Type: schema.TypeString,
Optional: !isDataSource,
Computed: isDataSource,
Description: "The method for analyzing metric events. Available choices are `mean` and `percentile`.",
ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"mean", "percentile"}, false)),
Default: "mean",
},
PERCENTILE_VALUE: {
Type: schema.TypeInt,
Optional: !isDataSource,
Computed: isDataSource,
Description: "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysis_type is percentile.",
ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 99)),
Default: nil,
},
VERSION: {
Type: schema.TypeInt,
Computed: true,
Description: "Version of the metric",
},
}

if isDataSource {
Expand Down Expand Up @@ -161,6 +197,13 @@ func metricRead(ctx context.Context, d *schema.ResourceData, metaRaw interface{}
_ = d.Set(EVENT_KEY, metric.EventKey)
_ = d.Set(SUCCESS_CRITERIA, metric.SuccessCriteria)
_ = d.Set(RANDOMIZATION_UNITS, metric.RandomizationUnits)
if metric.EventDefault != nil && metric.EventDefault.Disabled != nil {
_ = d.Set(INCLUDE_UNITS_WITHOUT_EVENTS, !*metric.EventDefault.Disabled)
}
_ = d.Set(UNIT_AGGREGATION_TYPE, metric.UnitAggregationType)
_ = d.Set(ANALYSIS_TYPE, metric.AnalysisType)
_ = d.Set(PERCENTILE_VALUE, metric.PercentileValue)
_ = d.Set(VERSION, metric.Version)

d.SetId(projectKey + "/" + key)

Expand Down
85 changes: 73 additions & 12 deletions launchdarkly/resource_launchdarkly_metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ func customizeMetricDiff(ctx context.Context, diff *schema.ResourceDiff, v inter
successCriteriaInConfig := config.GetAttr(SUCCESS_CRITERIA)
unitInConfig := config.GetAttr(UNIT)
eventKeyInConfig := config.GetAttr(EVENT_KEY)
analysisTypeInConfig := diff.Get(ANALYSIS_TYPE).(string)
percentileValueInConfig := config.GetAttr(PERCENTILE_VALUE)
includeUnitsWithoutEventsInConfig := config.GetAttr(INCLUDE_UNITS_WITHOUT_EVENTS)

// Different validation logic depending on which kind of metric we are creating
switch kindInConfig {
Expand Down Expand Up @@ -112,6 +115,39 @@ func customizeMetricDiff(ctx context.Context, diff *schema.ResourceDiff, v inter
}
}

if analysisTypeInConfig == "percentile" {
if percentileValueInConfig.IsNull() {
return fmt.Errorf("percentile_value is required when analysis_type is percentile")
}
if includeUnitsWithoutEventsInConfig.True() {
return fmt.Errorf("include_units_without_events is not supported for percentile metrics")
}
} else if !percentileValueInConfig.IsNull() {
return fmt.Errorf("%s type metrics can not have percentile values", analysisTypeInConfig)
}

// If anything is changed at all, expect a new value will be computed for "version"
if len(diff.GetChangedKeysPrefix("")) > 0 {
err := diff.SetNewComputed(VERSION)
if err != nil {
return err
}
}

if includeUnitsWithoutEventsInConfig.IsNull() {
if analysisTypeInConfig == "percentile" {
err := diff.SetNew(INCLUDE_UNITS_WITHOUT_EVENTS, false)
if err != nil {
return err
}
} else {
err := diff.SetNew(INCLUDE_UNITS_WITHOUT_EVENTS, true)
if err != nil {
return err
}
}
}

return nil
}

Expand Down Expand Up @@ -163,20 +199,32 @@ func resourceMetricCreate(ctx context.Context, d *schema.ResourceData, metaRaw i
unit := d.Get(UNIT).(string)
selector := d.Get(SELECTOR).(string)
eventKey := d.Get(EVENT_KEY).(string)
unitAggregationType := d.Get(UNIT_AGGREGATION_TYPE).(string)
analysisType := d.Get(ANALYSIS_TYPE).(string)
includeUnitsWithoutEvents := d.Get(INCLUDE_UNITS_WITHOUT_EVENTS).(bool)
eventDefaultDisabled := !includeUnitsWithoutEvents

metric := ldapi.MetricPost{
Name: &name,
Key: key,
Description: &description,
Tags: tags,
Kind: kind,
IsActive: &isActive,
IsNumeric: &isNumeric,
Selector: &selector,
Urls: urls,
RandomizationUnits: randomizationUnits,
Unit: &unit,
EventKey: &eventKey,
Name: &name,
Key: key,
Description: &description,
Tags: tags,
Kind: kind,
IsActive: &isActive,
IsNumeric: &isNumeric,
Selector: &selector,
Urls: urls,
RandomizationUnits: randomizationUnits,
Unit: &unit,
EventKey: &eventKey,
UnitAggregationType: &unitAggregationType,
AnalysisType: &analysisType,
EventDefault: &ldapi.MetricEventDefaultRep{Disabled: &eventDefaultDisabled},
}
percentileValueData, hasPercentile := d.GetOk(PERCENTILE_VALUE)
if hasPercentile {
percentileValue := int32(percentileValueData.(int))
metric.PercentileValue = &percentileValue
}
// Only add successCriteria if it has a value - empty string causes API errors
_, ok := d.GetOk(SUCCESS_CRITERIA)
Expand Down Expand Up @@ -251,6 +299,9 @@ func resourceMetricUpdate(ctx context.Context, d *schema.ResourceData, metaRaw i
unit := d.Get(UNIT).(string)
selector := d.Get(SELECTOR).(string)
eventKey := d.Get(EVENT_KEY).(string)
unitAggregationType := d.Get(UNIT_AGGREGATION_TYPE).(string)
analysisType := d.Get(ANALYSIS_TYPE).(string)
includeUnitsWithoutEvents := d.Get(INCLUDE_UNITS_WITHOUT_EVENTS).(bool)

patch := []ldapi.PatchOperation{
patchReplace("/name", name),
Expand All @@ -263,6 +314,16 @@ func resourceMetricUpdate(ctx context.Context, d *schema.ResourceData, metaRaw i
patchReplace("/unit", unit),
patchReplace("/selector", selector),
patchReplace("/eventKey", eventKey),
patchReplace("/unitAggregationType", unitAggregationType),
patchReplace("/analysisType", analysisType),
patchReplace("/eventDefault/disabled", !includeUnitsWithoutEvents),
}

percentileValueData, ok := d.GetOk(PERCENTILE_VALUE)
if ok {
patch = append(patch, patchReplace("/percentileValue", int32(percentileValueData.(int))))
} else {
patch = append(patch, patchReplace("/percentileValue", nil))
}

// Only update successCriteria if it is specified in the schema (enum values)
Expand Down
Loading

0 comments on commit 772ed84

Please sign in to comment.