Skip to content

Commit

Permalink
Prepare 1.6.0 release (#59)
Browse files Browse the repository at this point in the history
* Prep for migration release (#75)

* add goreleaser.yml

* Update changelog

* fix version number

* Add GH actions for release (#76)

* Add GH actions for release

* Bump travis version

* Update readme

* Automatically add changelog entry to release (#77)

* Update go.mod and automatically set version header (#78)

* Add access tokens (#79)

* prepare 1.2.2 release (#24)

* Fix non-empty plan when creating a team member with a custom role (#63)

* Fix handling of missing user target variation in API response (#64)

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

* v1.2.2

* Cleanup after v1.2.2 release

* [ch85469] first pass at tokens

* Update launchdarkly/resource_launchdarkly_access_token.go

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

* add links to sensitive data callout

* expiry and permission fixes

* update markdown

* use latest openapi client

* keys

* tidy

* fixes

* docs update

* Fix go.mod and vendoring

* Remove henry's fmt.Printf

* Clean up go.mod

* clean up go.mod even further

* address some of review

* custom role keys instead of ids

* remove unused var

* reintroduce removed code

* remove references to deleted key

* Remove fmt.Println

* formatting fixes

* fix tests

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: tf-release-bot <[email protected]>

* Release 1.4.0 (#80)

* update changelog for 1.4.0

* prepare 1.4.0 release (#37)

* Prep for migration release (#75)

* add goreleaser.yml

* Update changelog

* fix version number

* Add GH actions for release (#76)

* Add GH actions for release

* Bump travis version

* Update readme

* Automatically add changelog entry to release (#77)

* Update go.mod and automatically set version header (#78)

* Add access tokens (#79)

* prepare 1.2.2 release (#24)

* Fix non-empty plan when creating a team member with a custom role (#63)

* Fix handling of missing user target variation in API response (#64)

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

* v1.2.2

* Cleanup after v1.2.2 release

* [ch85469] first pass at tokens

* Update launchdarkly/resource_launchdarkly_access_token.go

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

* add links to sensitive data callout

* expiry and permission fixes

* update markdown

* use latest openapi client

* keys

* tidy

* fixes

* docs update

* Fix go.mod and vendoring

* Remove henry's fmt.Printf

* Clean up go.mod

* clean up go.mod even further

* address some of review

* custom role keys instead of ids

* remove unused var

* reintroduce removed code

* remove references to deleted key

* Remove fmt.Println

* formatting fixes

* fix tests

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: tf-release-bot <[email protected]>

* update changelog for 1.4.0

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: tf-release-bot <[email protected]>

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Isabelle Miller <[email protected]>
Co-authored-by: tf-release-bot <[email protected]>

* Ensure ommitted optional feature_flag_environment properties do not make changes when creating (#82)

* Ensure optional feature flag environment properties really are optional

* Update changelog

* Imiller/ch78293/make terraform project data source (#73)

* add stub schema

* add read function that gets project by key

* fix syntax issues

* add test helper functions

* add dataSourceProject to the provider

* add test for an existing resource
add test for an existing data source

* add getProjectByKey method

* name should be optional

* fix test

* add rate limiting to api hit in test to avoid 429 error

* add include_in_snippet to project resource

* extract projectRead into a helper function

* set id for data source but not resource

* add comment

* remove redundant get function

* fix tests

* add include_in_snippet to project resource update test

* replace travis with circleCI to run full tests (#84)

* Add .circleci/config.yml

* specify working directory

* update run command

* comment out run command to see if it will build

* uncomment run & clean up'
:

* fix formatting

* change go version to 1.14

* add make vet

* fix indentation

* scrap travis

* don't run this test in parallel, see if it works

* that wasn't it

* add a 200ms sleep after creating custom roles to see if it fixes the not found error

* limit to 3 packages at a time

* try running just one package at a time?

* try a sleep of 1 second after custom role creation

* only clean team members that are pending invite

* run only team member tests

* run only create test

* only run update with custom role

* try all the team member tests again with seat limit flag off

* run all team member tests separately

* add test clean account

* remove -p and add custom props

* through test acc access token

* fix test name typo

* add all tests separately

* remove sleep

* don't run cleaner test

* run creates separately

* forgot to commit test name change

* run all four tests separately

* Imiller/ch78864/make environment data source (#83)

* add stub schema

* add read function that gets project by key

* fix syntax issues

* add test helper functions

* add dataSourceProject to the provider

* add test for an existing resource
add test for an existing data source

* add getProjectByKey method

* name should be optional

* fix test

* add rate limiting to api hit in test to avoid 429 error

* add include_in_snippet to project resource

* extract projectRead into a helper function

* set id for data source but not resource

* add comment

* remove redundant get function

* fix tests

* add include_in_snippet to project resource update test

* extract read into helper funciton

* stub data source

* add isDataSource param to env read helper

* actually add data source to provider

* fix schema

* add bad env test + scaffolding

* make a separate schema for env data source because of differing required/optional fields

* add test to check that it can get env

* add id check to test

* fix travis build

* remove unnecessary fields from config

* refactor schemas to use overlapping baes

* scrap redundant config

* Update launchdarkly/environments_helper.go

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

* Update launchdarkly/environments_helper.go

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

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

* Imiller/ch87115/make feature flag data source (#85)

* add stub schema

* add read function that gets project by key

* fix syntax issues

* add test helper functions

* add dataSourceProject to the provider

* add test for an existing resource
add test for an existing data source

* add getProjectByKey method

* name should be optional

* fix test

* add rate limiting to api hit in test to avoid 429 error

* add include_in_snippet to project resource

* extract projectRead into a helper function

* set id for data source but not resource

* add comment

* remove redundant get function

* fix tests

* add include_in_snippet to project resource update test

* extract read into helper funciton

* stub data source

* add isDataSource param to env read helper

* actually add data source to provider

* fix schema

* add bad env test + scaffolding

* make a separate schema for env data source because of differing required/optional fields

* add test to check that it can get env

* add id check to test

* fix travis build

* remove unnecessary fields from config

* stub data source

* extract read from resource into helper & stub data source

* extract test helpers into a test_utils file

* add ff data source to provider

* make variation_type optional

* pass bool through read function to differentiate between resource and data source

* add no match test

* add scaffold helper function

* add exists test

* refactor schemas to use overlapping baes

* refactor to use overlapping base schema b/w resource and data source

* scrap redundant config

* scrap redundant config

* fix merge issue

* fix merge again

* Imiller/ch88747/make feature flag environment a data source (#86)

* add stub schema

* add read function that gets project by key

* fix syntax issues

* add test helper functions

* add dataSourceProject to the provider

* add test for an existing resource
add test for an existing data source

* add getProjectByKey method

* name should be optional

* fix test

* add rate limiting to api hit in test to avoid 429 error

* add include_in_snippet to project resource

* extract projectRead into a helper function

* set id for data source but not resource

* add comment

* remove redundant get function

* fix tests

* add include_in_snippet to project resource update test

* extract read into helper funciton

* stub data source

* add isDataSource param to env read helper

* actually add data source to provider

* fix schema

* add bad env test + scaffolding

* make a separate schema for env data source because of differing required/optional fields

* add test to check that it can get env

* add id check to test

* fix travis build

* remove unnecessary fields from config

* stub data source

* extract read from resource into helper & stub data source

* extract test helpers into a test_utils file

* add ff data source to provider

* make variation_type optional

* pass bool through read function to differentiate between resource and data source

* add no match test

* add scaffold helper function

* add exists test

* refactor schemas to use overlapping baes

* refactor to use overlapping base schema b/w resource and data source

* stub data source file

* extract schema into helper function

* extract read function into helper

* basic data source

* move flagIdToKeys into feature flag helper

* stub test config

* scrap redundant config

* scrap redundant config

* move patchFlagEnvPath() into helper

* add test scaffolding function

* stub nomatch test

* i did a very dumb thing - fix test

* fix test again

* return flag instead of config

* add exists test

* change all read functions to generic featureFlagEnvironmentRead

* move test helper into data source

* clean up test utils

* move helper to correct file and update test to patch everything

* check all the things

* fix assertions

* oops found a bug

* fix error typo (#89)

* Resolve issues with nested environments (#87)

* Imiller/ch87117/make webhook data source (#88)

* add stub schema

* add read function that gets project by key

* fix syntax issues

* add test helper functions

* add dataSourceProject to the provider

* add test for an existing resource
add test for an existing data source

* add getProjectByKey method

* name should be optional

* fix test

* add rate limiting to api hit in test to avoid 429 error

* add include_in_snippet to project resource

* extract projectRead into a helper function

* set id for data source but not resource

* add comment

* remove redundant get function

* fix tests

* add include_in_snippet to project resource update test

* extract read into helper funciton

* stub data source

* add isDataSource param to env read helper

* actually add data source to provider

* fix schema

* add bad env test + scaffolding

* make a separate schema for env data source because of differing required/optional fields

* add test to check that it can get env

* add id check to test

* fix travis build

* remove unnecessary fields from config

* stub data source

* extract read from resource into helper & stub data source

* extract test helpers into a test_utils file

* add ff data source to provider

* make variation_type optional

* pass bool through read function to differentiate between resource and data source

* add no match test

* add scaffold helper function

* add exists test

* refactor schemas to use overlapping baes

* refactor to use overlapping base schema b/w resource and data source

* stub data source file

* extract schema into helper function

* extract read function into helper

* basic data source

* move flagIdToKeys into feature flag helper

* stub test config

* scrap redundant config

* scrap redundant config

* move patchFlagEnvPath() into helper

* add test scaffolding function

* stub nomatch test

* i did a very dumb thing - fix test

* fix test again

* return flag instead of config

* add exists test

* add a webhooks helper file

* extract out base schema from resource

* extract out read function

* fix typo & stub data source

* change all read functions to generic featureFlagEnvironmentRead

* move test helper into data source

* clean up test utils

* move helper to correct file and update test to patch everything

* check all the things

* fix assertions

* oops found a bug

* oops make enabled optional

* refactor read

* forgot to define func param type

* stub tests

* add webhook & ff-env data sources to provider

* no match test

* set id for data source in read

* add webhook exists test

* change webhook_id to id

* add policy to test

* Imiller/ch87116/make segment data source (#91)

* add stub schema

* add read function that gets project by key

* fix syntax issues

* add test helper functions

* add dataSourceProject to the provider

* add test for an existing resource
add test for an existing data source

* add getProjectByKey method

* name should be optional

* fix test

* add rate limiting to api hit in test to avoid 429 error

* add include_in_snippet to project resource

* extract projectRead into a helper function

* set id for data source but not resource

* add comment

* remove redundant get function

* fix tests

* add include_in_snippet to project resource update test

* extract read into helper funciton

* stub data source

* add isDataSource param to env read helper

* actually add data source to provider

* fix schema

* add bad env test + scaffolding

* make a separate schema for env data source because of differing required/optional fields

* add test to check that it can get env

* add id check to test

* fix travis build

* remove unnecessary fields from config

* stub data source

* extract read from resource into helper & stub data source

* extract test helpers into a test_utils file

* add ff data source to provider

* make variation_type optional

* pass bool through read function to differentiate between resource and data source

* add no match test

* add scaffold helper function

* add exists test

* refactor schemas to use overlapping baes

* refactor to use overlapping base schema b/w resource and data source

* stub data source file

* extract schema into helper function

* extract read function into helper

* basic data source

* move flagIdToKeys into feature flag helper

* stub test config

* scrap redundant config

* scrap redundant config

* move patchFlagEnvPath() into helper

* add test scaffolding function

* stub nomatch test

* i did a very dumb thing - fix test

* fix test again

* return flag instead of config

* add exists test

* add a webhooks helper file

* extract out base schema from resource

* extract out read function

* fix typo & stub data source

* change all read functions to generic featureFlagEnvironmentRead

* move test helper into data source

* clean up test utils

* move helper to correct file and update test to patch everything

* check all the things

* fix assertions

* oops found a bug

* oops make enabled optional

* refactor read

* forgot to define func param type

* stub tests

* add webhook & ff-env data sources to provider

* no match test

* set id for data source in read

* add webhook exists test

* extract out resource schema

* extract out hte read function

* add data source to provider

* check accTest in webhook test

* differentiate read for resource & ds

* data source

* add no match test

* set id for data sources in read

* add exists test

* extract out resource schema

* extract out hte read function

* fix merge conflict

* make project key required on segment resource

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

* change webhook_id to id

* add policy to test

* change name from optional to computed

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

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

* Add nested environments documentation (#90)

* Use GetOKExists for off_variation and improve feature_flag_environment read efficiency (#93)

* Use GetOKExists for off_variation and improve read efficiency

* Add a json feature flag example with default variations (#94)

* Imiller/ch90407/write docs for new data sources (#92)

* add stub schema

* add read function that gets project by key

* fix syntax issues

* add test helper functions

* add dataSourceProject to the provider

* add test for an existing resource
add test for an existing data source

* add getProjectByKey method

* name should be optional

* fix test

* add rate limiting to api hit in test to avoid 429 error

* add include_in_snippet to project resource

* extract projectRead into a helper function

* set id for data source but not resource

* add comment

* remove redundant get function

* fix tests

* add include_in_snippet to project resource update test

* extract read into helper funciton

* stub data source

* add isDataSource param to env read helper

* actually add data source to provider

* fix schema

* add bad env test + scaffolding

* make a separate schema for env data source because of differing required/optional fields

* add test to check that it can get env

* add id check to test

* fix travis build

* remove unnecessary fields from config

* stub data source

* extract read from resource into helper & stub data source

* extract test helpers into a test_utils file

* add ff data source to provider

* make variation_type optional

* pass bool through read function to differentiate between resource and data source

* add no match test

* add scaffold helper function

* add exists test

* refactor schemas to use overlapping baes

* refactor to use overlapping base schema b/w resource and data source

* stub data source file

* extract schema into helper function

* extract read function into helper

* basic data source

* move flagIdToKeys into feature flag helper

* stub test config

* scrap redundant config

* scrap redundant config

* move patchFlagEnvPath() into helper

* add test scaffolding function

* stub nomatch test

* i did a very dumb thing - fix test

* fix test again

* return flag instead of config

* add exists test

* add a webhooks helper file

* extract out base schema from resource

* extract out read function

* fix typo & stub data source

* change all read functions to generic featureFlagEnvironmentRead

* move test helper into data source

* clean up test utils

* move helper to correct file and update test to patch everything

* check all the things

* fix assertions

* oops found a bug

* oops make enabled optional

* refactor read

* forgot to define func param type

* stub tests

* add webhook & ff-env data sources to provider

* no match test

* set id for data source in read

* add webhook exists test

* extract out resource schema

* extract out hte read function

* add data source to provider

* check accTest in webhook test

* differentiate read for resource & ds

* data source

* add no match test

* set id for data sources in read

* add exists test

* extract out resource schema

* extract out hte read function

* fix merge conflict

* make project key required on segment resource

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

* change webhook_id to id

* add policy to test

* add new include_in_snippet arg to proj resource doc

* add project ds doc

* project key should be required in env ds

* add env ds doc

* update schema fields in ff ds

* fix typos

* feature flag ds doc

* no validation function on computed schema type

* fix feature_flag_env data source & tests

* add feature_flag_environment data source doc

* remove extra dashes for consistency

* add webhook ds doc

* fix typo

* refactor a bit for conciseness

* fix error in segment resource doc

* add segment doc

* differentiate reads between resource and ds for ff-env

* change name from optional to computed

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

* minor fixes

* fix hcl example formatting

* change resource to data source

* update some wording & add ds links to website sidebar

* go get new api version & go mod vendor

* add client_side_availability ky

* add client side availability to flag data source

* switch out snippet for client side availability in project data source

* convert client side availability struct to appropriate map for data source

* update project test

* update feature flag read to set csa

* update feature flag data source test

* change include_in_snippet to client_side_availability in project & ff ds docs

* set include_in_snippet for feature flag resource instead of csa

* add csa block section to project & ff docs

* fix alignment

* update changelog

* singularize 'block'

* update wording

* update wording

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

* change SDKS to SDKs

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

* change SDKS to SDKs

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

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

* Imiller/ch96679/figure out provider configuration for terraform (#96)

* add 0.13 syntax to doc

* add example for tf 0.13

* update example readme

* make provider config note a blockquote

* update links

* Add support for number and boolean targeting rule clause values (#98)

* Add rule clause value type

* update website and changelog

* Fix percentage rollout weight in example (#99)

* update LD client (#102)

* update client

* some files didn't get added

* try to circumvent 409 test failures with unique project ke ys

* try again

* try again

* defer takedowns

* fix a few more conflict issues

* move a few more deletes into defers

* fix test error messages

* missed one

* add missing takedown

* oops that was deleting an uncreated resource

* Update Go to 1.16 and remove vendor directory (#106)

* Imiller/ch113418/upgrade ld client with go 1.16 (#107)

* go get

* revendor everything

* fix all updated property names

* scrap vendor directory

* Rename `launchdarkly_webhook` enabled->on (#104)

* Update destination schema to support v2 (#103)

* Update destination schema to support v2

* Add breaking verify test

* Update webhook resource

* Update all tests for resource

* Update datasource

* Add whitespace in test configs

* update website

* Update changelog

* handle future deprecation of enabled

* update destination doc to handle deprecation

* update description for config

* update create, read, and update functions to handle dual on/enabled

* add azure-event-hubs as destination kind choice

* update destination helper to convert and validate all config fields

* add test cases for azure-event-hubs

* change enabled to on on one of the test resources to ensure it also works

* add example azure-event-hubs to doc

* add webhook field descriptions

* add policy statements field descriptions

* add description for data source

* fix typo in deprecation warning

* looks like ConflictsWith doesn't work with nested schemas oops

* update deprecate dmessage

* use helper function getDestinationon

* add comment'

* remove redundant ON key

* small doc changes

* update getDestinationOn helper function to us GetOkExists)

* add config fields for azure to doc

* use GetOkExists in read

* update changelog

* forgot to add before committing

* update to always set on unless enabled is set in read

* somehow dropped a brace

* remove importstateverify from createkinesis test - failing when we update enabled to on

* add destination example

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

* Improve 429 retry handling (#109)

* Improve 429 retry logic to include % jitter

* Imiller/ch114164/upgrade resource launchdarkly feature flag (#111)

* add descriptions for everything

* fix dangling default values

* fix bug where creating a non-bool flag with no variations creates a bool flag

* add bug fixes to changelog

* built in an idiotic bug, fixed now

* see if this fixes all of the tests

* found typo:

* fix broken tests

* obvious simplification

* Rename launchdarkly_webhook policy_statements -> statements (#108)

* rename launchdarkly_webhook policy_statements -> statements

* Fix webhook datasource

* start updating docs

* Update docs

* Update changelog

* remove typo

* clarify doc

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

* prep for release

Co-authored-by: Henry Barrow <[email protected]>
Co-authored-by: Arnold Trakhtenberg <[email protected]>
Co-authored-by: tf-release-bot <[email protected]>
  • Loading branch information
4 people authored Jul 20, 2021
1 parent d5bf059 commit 29d076f
Show file tree
Hide file tree
Showing 2,488 changed files with 805 additions and 688,945 deletions.
28 changes: 18 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# Golang CircleCI 2.0 configuration file for terraform-provider-launchdarkly-private tests
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
# Golang CircleCI 2.1 configuration file for terraform-provider-launchdarkly-private tests
version: 2.1

orbs:
go: circleci/[email protected]

jobs:
build:
docker:
- image: circleci/golang:1.14
executor:
name: go/default
tag: "1.16"

working_directory: /go/src/github.com/launchdarkly/terraform-provider-launchdarkly-private
steps:
- checkout
- go/mod-download-cached
- run:
name: go vet
command: make vet
- run:
- run:
name: Test Custom Properties
command: TESTARGS="-run TestCustomProperties" make testacc
- run:
Expand Down Expand Up @@ -61,7 +64,7 @@ jobs:
- run:
name: Test Segment Resource
command: TESTARGS="-run TestAccSegment" make testacc
- run:
- run:
name: Test Team Members
command: |
TESTARGS="-run TestAccTeamMember_CreateGeneric" make testacc
Expand All @@ -70,4 +73,9 @@ jobs:
TESTARGS="-run TestAccTeamMember_UpdateWithCustomRole" make testacc
- run:
name: Test Webhook Resource
command: TESTARGS="-run TestAccWebhook" make testacc
command: TESTARGS="-run TestAccWebhook" make testacc

workflows:
main:
jobs:
- build
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
go-version: 1.16
- name: Import GPG key
id: import_gpg
uses: paultyng/[email protected]
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
## [1.6.0] (July 20, 2021)

FEATURES:

- Added support for an `azure-event-hubs` data source `kind` on the `launchdarkly_destination` resource.

ENHANCEMENTS:

- Improved 429 retry handling.

- Upgraded the Go version to 1.16.

- Upgraded the LaunchDarkly SDK version to v5.1.0+.

BUG FIXES:

- Fixed a bug in the feature flag resource where multivariate (non-boolean) resource config with zero variations would create a boolean flag.

- Fixed a bug in the feature flag resource where `default_on_variation` and `default_off_variation` would still show up in `terraform plan` following their removal.

- Updated the destination `config` `Elem` type to `TypeString` and made the `config` field required. Added improved validation to check fields for different destination kinds.

NOTES:

- The `launchdarkly_destination` resource's `enabled` argument has been deprecated in favor of `on`. Please update your config to use `on` in order to maintain compatibility with future versions.
- The `launchdarkly_webhook` resource's `policy_statements` argument has been deprecated in favor of `statements`. Please update your config to use `statements` in order to maintain compatibility with future versions.
- The `launchdarkly_webhook` data source's `policy_statements` attribute has been deprecated in favor of `statements`. Please update all references of `policy_statements` to `statements` in order to maintain compatibility with future versions.
- The `launchdarkly_webhook` resource's `enabled` argument has been deprecated in favor of `on`. Please update your config to use `on` in order to maintain compatibility with future versions.
- The `launchdarkly_webhook` data source's `enabled` attribute has been deprecated in favor of `on`. Please update your all references of `enabled` to `on` in order to maintain compatibility with future versions.

## [1.5.1] (March 16, 2021)

BUG FIXES:
Expand Down
18 changes: 3 additions & 15 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

TEST?=$$(go list ./... |grep -v 'vendor')
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
TEST?=$$(go list ./...)
GOFMT_FILES?=$$(find . -name '*.go')
WEBSITE_REPO=github.com/hashicorp/terraform-website
PKG_NAME=launchdarkly
REV:=$(shell git rev-parse HEAD | cut -c1-6)
Expand Down Expand Up @@ -29,7 +29,7 @@ testacc: fmtcheck

vet:
@echo "go vet ."
@go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \
@go vet $$(go list ./...) ; if [ $$? -eq 1 ]; then \
echo ""; \
echo "Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for review."; \
Expand All @@ -45,10 +45,6 @@ fmtcheck:
errcheck:
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"

lint: tools.golangci-lint
@echo "==> Checking source code againse golangci-lint"
@golangci-lint run ./$(PKG_NAME)

test-compile:
@if [ "$(TEST)" = "./..." ]; then \
echo "ERROR: Set TEST to a specific package. For example,"; \
Expand All @@ -72,11 +68,3 @@ endif
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)

.PHONY: build install apply test testacc vet fmt fmtcheck errcheck lint test-compile website website-test

#---------------
#-- tools
#---------------
.PHONY: tools.golangci-lint

tools.golangci-lint:
GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Requirements

- [Terraform](https://www.terraform.io/downloads.html) 0.12.x
- [Go](https://golang.org/doc/install) 1.14 (to build the provider plugin)
- [Go](https://golang.org/doc/install) 1.16 (to build the provider plugin)

## Building The Provider

Expand Down
21 changes: 21 additions & 0 deletions examples/data_source_destination/example.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
resource "launchdarkly_project" "data_source_destination_project" {
key = "tf-dest-project"
name = "Terraform Data Source Destination Project"

tags = [
"terraform"
]
}

resource "launchdarkly_destination" "segment" {
project_key = launchdarkly_project.data_source_destination_project.key
env_key = "production"
name = "Example Segment Destination"
kind = "segment"
config = {
write_key = "this-is-a-secret"
}
on = false
tags = [ "terraform" ]
}

14 changes: 14 additions & 0 deletions examples/data_source_destination/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
terraform {
required_providers {
launchdarkly = {
source = "launchdarkly/launchdarkly"
version = "~> 1.5.1"
}
}
required_version = ">= 0.13"
}

# provider "launchdarkly" {
# version = "~> 1.6.0"
# source = "local/terraform-provider-launchdarkly"
# }
7 changes: 5 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
module github.com/launchdarkly/terraform-provider-launchdarkly

go 1.14
go 1.16

require (
github.com/antihax/optional v1.0.0
github.com/hashicorp/terraform-plugin-sdk v1.15.0
github.com/launchdarkly/api-client-go v3.5.0+incompatible
github.com/kr/pretty v0.2.1 // indirect
github.com/launchdarkly/api-client-go v5.1.0+incompatible
github.com/stretchr/testify v1.6.1
golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
)
Loading

0 comments on commit 29d076f

Please sign in to comment.