diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index 585a27b8..9e7033c1 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -24,6 +24,15 @@ jobs: - uses: actions/checkout@master + - name: Run make fmt + if: runner.os != 'Windows' + run: | + make fmt + git diff --exit-code; code=$?; git checkout -- .; (exit $code) + + - name: Run go vet + run: go vet ./... + - name: Run tests run: | make testacc TEST="./heroku/" diff --git a/.github/workflows/publish-binaries-on-release.yml b/.github/workflows/publish-binaries-on-release.yml deleted file mode 100644 index 497c41fb..00000000 --- a/.github/workflows/publish-binaries-on-release.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: Publish binaries on release -on: - release: - types: - - published -jobs: - - release-linux-amd64: - name: Release linux/amd64 - runs-on: ubuntu-latest - steps: - - name: Get release tag - id: release_tag - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - - name: Install Go 1.13 - uses: actions/setup-go@v1 - with: - go-version: 1.13 - id: go - - - uses: actions/checkout@master - - - name: Build - run: | - echo "Creating binary archive $RELEASE_FILENAME.zip" - go build -mod=vendor -ldflags="-X=github.com/terraform-providers/terraform-provider-heroku/version.ProviderVersion=${{ steps.release_tag.outputs.VERSION }}" - zip -r "$RELEASE_FILENAME.zip" terraform-provider-heroku - env: - GOARCH: amd64 - GOOS: linux - RELEASE_FILENAME: terraform-provider-heroku_${{ steps.release_tag.outputs.VERSION }}_linux_amd64 - - - name: Publish binaries - uses: skx/github-action-publish-binaries@release-1.3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: 'terraform-provider-heroku_*.zip' - - release-darwin-amd64: - name: Release darwin/amd64 - runs-on: ubuntu-latest - steps: - - name: Get release tag - id: release_tag - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - - name: Install Go 1.13 - uses: actions/setup-go@v1 - with: - go-version: 1.13 - id: go - - - uses: actions/checkout@master - - - name: Build - run: | - echo "Creating binary archive $RELEASE_FILENAME.zip" - go build -mod=vendor -ldflags="-X=github.com/terraform-providers/terraform-provider-heroku/version.ProviderVersion=${{ steps.release_tag.outputs.VERSION }}" - zip -r "$RELEASE_FILENAME.zip" terraform-provider-heroku - env: - GOARCH: amd64 - GOOS: darwin - RELEASE_FILENAME: terraform-provider-heroku_${{ steps.release_tag.outputs.VERSION }}_darwin_amd64 - - - name: Publish binaries - uses: skx/github-action-publish-binaries@release-1.3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: 'terraform-provider-heroku_*.zip' - - release-windows-amd64: - name: Release windows/amd64 - runs-on: ubuntu-latest - steps: - - name: Get release tag - id: release_tag - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - - name: Install Go 1.13 - uses: actions/setup-go@v1 - with: - go-version: 1.13 - id: go - - - uses: actions/checkout@master - - - name: Build - run: | - echo "Creating binary archive $RELEASE_FILENAME.zip" - go build -mod=vendor -ldflags="-X=github.com/terraform-providers/terraform-provider-heroku/version.ProviderVersion=${{ steps.release_tag.outputs.VERSION }}" - zip -r "$RELEASE_FILENAME.zip" terraform-provider-heroku.exe - env: - GOARCH: amd64 - GOOS: windows - RELEASE_FILENAME: terraform-provider-heroku_${{ steps.release_tag.outputs.VERSION }}_windows_amd64 - - - name: Publish binaries - uses: skx/github-action-publish-binaries@release-1.3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: 'terraform-provider-heroku_*.zip' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..b8e8e410 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: release + +on: + push: + tags: + - 'v*' + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.14 + - + name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@v2 + env: + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + PASSPHRASE: ${{ secrets.GPG_PASSPRHASE }} + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2.1.1 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 00000000..24392499 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,46 @@ +before: + hooks: + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - freebsd + - openbsd + - solaris + - windows + - linux + - darwin + goarch: + - amd64 + - '386' + - arm + - arm64 + ignore: + - goos: darwin + goarch: '386' + - goos: openbsd + goarch: arm + - goos: openbsd + goarch: arm64 + binary: '{{ .ProjectName }}_v{{ .Version }}' +archives: + - format: zip + name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' +checksum: + name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS' + algorithm: sha256 +signs: + - artifacts: checksum + args: + - "--batch" + - "-u" + - "{{ .Env.GPG_FINGERPRINT }}" + - "--output" + - "${signature}" + - "--detach-sign" + - "${artifact}" +release: + draft: true +changelog: + skip: true \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cb414a13..00000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -dist: trusty -sudo: required -services: -- docker -language: go -go: - - "1.13.x" - -env: - - GOFLAGS=-mod=vendor - -install: -# This script is used by the Travis build to install a cookie for -# go.googlesource.com so rate limits are higher when using `go get` to fetch -# packages that live there. -# See: https://github.com/golang/go/issues/12933 -- bash scripts/gogetcookie.sh - -script: -- make test -- make vet -- make website-test - -branches: - only: - - master -matrix: - fast_finish: true - allow_failures: - - go: tip -env: - - GOFLAGS=-mod=vendor GO111MODULE=on diff --git a/CHANGELOG.md b/CHANGELOG.md index 49a1cb1f..65206442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,215 +1,216 @@ -## 2.6.0 (Unreleased) +# This file is now deprecated. Please visit [Releases](https://github.com/heroku/terraform-provider-heroku/releases) for more information. + ## 2.5.0 (July 03, 2020) FEATURES: -* New data source: `heroku_pipeline` Get information on a Heroku Pipeline ([#268](https://github.com/terraform-providers/terraform-provider-heroku/pull/268)) +* New data source: `heroku_pipeline` Get information on a Heroku Pipeline ([#268](https://github.com/heroku/terraform-provider-heroku/pull/268)) IMPROVEMENTS: -* Clarify usage constraints of Build source path ([#270](https://github.com/terraform-providers/terraform-provider-heroku/pull/270)) -* Upgrade acceptance tests to Go 1.14 ([#271](https://github.com/terraform-providers/terraform-provider-heroku/pull/271)) +* Clarify usage constraints of Build source path ([#270](https://github.com/heroku/terraform-provider-heroku/pull/270)) +* Upgrade acceptance tests to Go 1.14 ([#271](https://github.com/heroku/terraform-provider-heroku/pull/271)) ## 2.4.1 (May 20, 2020) IMPROVEMENTS: -* Upgrade to Terraform Plugin SDK v1.12.0 ([#266](https://github.com/terraform-providers/terraform-provider-heroku/pull/266)) +* Upgrade to Terraform Plugin SDK v1.12.0 ([#266](https://github.com/heroku/terraform-provider-heroku/pull/266)) BUG FIXES: -* Importing a `heroku_pipeline` by its name now sets its ID correctly ([#266](https://github.com/terraform-providers/terraform-provider-heroku/pull/266)) +* Importing a `heroku_pipeline` by its name now sets its ID correctly ([#266](https://github.com/heroku/terraform-provider-heroku/pull/266)) ## 2.4.0 (April 22, 2020) FEATURES: -* **Resource `heroku_pipeline`** now supports setting `owner` user or team, including defaulting to the current API key's user ID ([#259](https://github.com/terraform-providers/terraform-provider-heroku/pull/259)) +* **Resource `heroku_pipeline`** now supports setting `owner` user or team, including defaulting to the current API key's user ID ([#259](https://github.com/heroku/terraform-provider-heroku/pull/259)) IMPROVEMENTS: -* **Terraform Provider acceptance tests** now run on pull requests, pushes to master, and nightly using [GitHub Actions](https://github.com/terraform-providers/terraform-provider-heroku/actions) configured for the [CI workflows](https://github.com/terraform-providers/terraform-provider-heroku/tree/master/.github/workflows) +* **Terraform Provider acceptance tests** now run on pull requests, pushes to master, and nightly using [GitHub Actions](https://github.com/heroku/terraform-provider-heroku/actions) configured for the [CI workflows](https://github.com/heroku/terraform-provider-heroku/tree/master/.github/workflows) BUG FIXES: * **Resource `heroku_app`** - * now imports `buildpacks` and other attributes, consistent with create & read ([#257](https://github.com/terraform-providers/terraform-provider-heroku/pull/257)) - * now reads `organization.locked`, consistent with create ([#257](https://github.com/terraform-providers/terraform-provider-heroku/pull/257)) - * drops the non-standard `uuid` attribute ([#257](https://github.com/terraform-providers/terraform-provider-heroku/pull/257)) -* **Data source `heroku_app`** now returns `id` attribute, consistent with resource `heroku_app` ([#255](https://github.com/terraform-providers/terraform-provider-heroku/pull/255)) + * now imports `buildpacks` and other attributes, consistent with create & read ([#257](https://github.com/heroku/terraform-provider-heroku/pull/257)) + * now reads `organization.locked`, consistent with create ([#257](https://github.com/heroku/terraform-provider-heroku/pull/257)) + * drops the non-standard `uuid` attribute ([#257](https://github.com/heroku/terraform-provider-heroku/pull/257)) +* **Data source `heroku_app`** now returns `id` attribute, consistent with resource `heroku_app` ([#255](https://github.com/heroku/terraform-provider-heroku/pull/255)) ## 2.3.0 (March 30, 2020) FEATURES: -* New resource: `heroku_pipeline_config_var` ([#256](https://github.com/terraform-providers/terraform-provider-heroku/pull/256)) +* New resource: `heroku_pipeline_config_var` ([#256](https://github.com/heroku/terraform-provider-heroku/pull/256)) IMPROVEMENTS: -* Upgrade `heroku-go` to `v5.2.0` ([#256](https://github.com/terraform-providers/terraform-provider-heroku/pull/256)) +* Upgrade `heroku-go` to `v5.2.0` ([#256](https://github.com/heroku/terraform-provider-heroku/pull/256)) BUG FIXES: -* Properly set `heroku_app.acm` when this attribute is not defined ([#256](https://github.com/terraform-providers/terraform-provider-heroku/pull/256)) -* Remove quoted interpolation-only expressions in docs ([#245](https://github.com/terraform-providers/terraform-provider-heroku/pull/245)) +* Properly set `heroku_app.acm` when this attribute is not defined ([#256](https://github.com/heroku/terraform-provider-heroku/pull/256)) +* Remove quoted interpolation-only expressions in docs ([#245](https://github.com/heroku/terraform-provider-heroku/pull/245)) ## 2.2.2 (February 20, 2020) IMPROVEMENTS -* Upgrade to Terraform Plugin SDK v1.7.0 ([#248](https://github.com/terraform-providers/terraform-provider-heroku/pull/248)) +* Upgrade to Terraform Plugin SDK v1.7.0 ([#248](https://github.com/heroku/terraform-provider-heroku/pull/248)) ## 2.2.1 (October 03, 2019) IMPROVEMENTS: -* Migrate to Terraform Plugin SDK ([#240](https://github.com/terraform-providers/terraform-provider-heroku/pull/240)) +* Migrate to Terraform Plugin SDK ([#240](https://github.com/heroku/terraform-provider-heroku/pull/240)) ## 2.2.0 (September 19, 2019) FEATURES: -* `heroku_app_webhook` - Ability to manage App Webhooks ([#239](https://github.com/terraform-providers/terraform-provider-heroku/pull/239)) +* `heroku_app_webhook` - Ability to manage App Webhooks ([#239](https://github.com/heroku/terraform-provider-heroku/pull/239)) IMPROVEMENTS: -* Update vendored Terraform to v0.12.8 ([#238](https://github.com/terraform-providers/terraform-provider-heroku/pull/238)) +* Update vendored Terraform to v0.12.8 ([#238](https://github.com/heroku/terraform-provider-heroku/pull/238)) ## 2.1.2 (August 09, 2019) IMPROVEMENTS: -* Update vendored Terraform to v0.12.6 ([#234](https://github.com/terraform-providers/terraform-provider-heroku/pull/234)) -* Stop creating `cedar-14` apps during tests ([#232](https://github.com/terraform-providers/terraform-provider-heroku/pull/232)) -* Standardize UUID usage on `google/uuid` ([#228](https://github.com/terraform-providers/terraform-provider-heroku/pull/228)) +* Update vendored Terraform to v0.12.6 ([#234](https://github.com/heroku/terraform-provider-heroku/pull/234)) +* Stop creating `cedar-14` apps during tests ([#232](https://github.com/heroku/terraform-provider-heroku/pull/232)) +* Standardize UUID usage on `google/uuid` ([#228](https://github.com/heroku/terraform-provider-heroku/pull/228)) ## 2.1.1 (August 07, 2019) BUG FIXES: -* Rework `heroku_addon.config` migration ([#230](https://github.com/terraform-providers/terraform-provider-heroku/pull/230)) -* Fix `heroku_formation` segfault when app does not exist ([#229](https://github.com/terraform-providers/terraform-provider-heroku/pull/229)) -* Docs correction ([#225](https://github.com/terraform-providers/terraform-provider-heroku/pull/225)) & clarification ([#224](https://github.com/terraform-providers/terraform-provider-heroku/pull/224)) +* Rework `heroku_addon.config` migration ([#230](https://github.com/heroku/terraform-provider-heroku/pull/230)) +* Fix `heroku_formation` segfault when app does not exist ([#229](https://github.com/heroku/terraform-provider-heroku/pull/229)) +* Docs correction ([#225](https://github.com/heroku/terraform-provider-heroku/pull/225)) & clarification ([#224](https://github.com/heroku/terraform-provider-heroku/pull/224)) ## 2.1.0 (July 24, 2019) FEATURES: -* `heroku_addon` - Ability to set addon name ([#210](https://github.com/terraform-providers/terraform-provider-heroku/pull/210)) +* `heroku_addon` - Ability to set addon name ([#210](https://github.com/heroku/terraform-provider-heroku/pull/210)) BUG FIXES: * Add migration for `heroku_addon` to fix dirty plan after `heroku_addon.config` attribute changed from `TypeList` of `TypeSet` - to `TypeSet` ([#217](https://github.com/terraform-providers/terraform-provider-heroku/pull/217)) + to `TypeSet` ([#217](https://github.com/heroku/terraform-provider-heroku/pull/217)) ## 2.0.3 (July 12, 2019) BUG FIXES: -* Restore compatibility with Terraform 0.12 [#220](https://github.com/terraform-providers/terraform-provider-heroku/pull/220) +* Restore compatibility with Terraform 0.12 [#220](https://github.com/heroku/terraform-provider-heroku/pull/220) ## 2.0.2 (July 11, 2019) **This release is broken for Terraform 0.12.** IMPROVEMENTS: -* Upgrade heroku-go client to stable Go Module support `v5` & to provide more Heroku Platform API features [#211](https://github.com/terraform-providers/terraform-provider-heroku/pull/211) +* Upgrade heroku-go client to stable Go Module support `v5` & to provide more Heroku Platform API features [#211](https://github.com/heroku/terraform-provider-heroku/pull/211) BUG FIXES: -* Revise docs for Terraform v0.12 map attribute-assignment syntax [#212](https://github.com/terraform-providers/terraform-provider-heroku/pull/212) & [#216](https://github.com/terraform-providers/terraform-provider-heroku/pull/216) -* Revise docs to correct `import` example [#215](https://github.com/terraform-providers/terraform-provider-heroku/pull/215) +* Revise docs for Terraform v0.12 map attribute-assignment syntax [#212](https://github.com/heroku/terraform-provider-heroku/pull/212) & [#216](https://github.com/heroku/terraform-provider-heroku/pull/216) +* Revise docs to correct `import` example [#215](https://github.com/heroku/terraform-provider-heroku/pull/215) ## 2.0.1 (June 20, 2019) BUG FIXES: -* Fix unhandled errors [#193](https://github.com/terraform-providers/terraform-provider-heroku/pull/193) -* Prevent leaking `heroku_app` `sensitive_config_vars` through `all_config_vars` [#206](https://github.com/terraform-providers/terraform-provider-heroku/pull/206) +* Fix unhandled errors [#193](https://github.com/heroku/terraform-provider-heroku/pull/193) +* Prevent leaking `heroku_app` `sensitive_config_vars` through `all_config_vars` [#206](https://github.com/heroku/terraform-provider-heroku/pull/206) ## 2.0.0 (June 03, 2019) FEATURES: -* **Terraform 0.12** compatibility [#179](https://github.com/terraform-providers/terraform-provider-heroku/pull/179) +* **Terraform 0.12** compatibility [#179](https://github.com/heroku/terraform-provider-heroku/pull/179) IMPROVEMENTS: -* Documentation fix-ups [#189](https://github.com/terraform-providers/terraform-provider-heroku/pull/189) & [#192](https://github.com/terraform-providers/terraform-provider-heroku/pull/192) +* Documentation fix-ups [#189](https://github.com/heroku/terraform-provider-heroku/pull/189) & [#192](https://github.com/heroku/terraform-provider-heroku/pull/192) ## 1.9.0 (April 01, 2019) FEATURES: -* **New Data Source:** `heroku_team` [#188](https://github.com/terraform-providers/terraform-provider-heroku/pull/188) -* **New Resource:** `heroku_config` (for defining config vars to be used in other resources) [#183](https://github.com/terraform-providers/terraform-provider-heroku/pull/183) -* **New Resource:** `heroku_app_config_association` (for setting, updating, and deleting config vars on apps) [#183](https://github.com/terraform-providers/terraform-provider-heroku/pull/183) +* **New Data Source:** `heroku_team` [#188](https://github.com/heroku/terraform-provider-heroku/pull/188) +* **New Resource:** `heroku_config` (for defining config vars to be used in other resources) [#183](https://github.com/heroku/terraform-provider-heroku/pull/183) +* **New Resource:** `heroku_app_config_association` (for setting, updating, and deleting config vars on apps) [#183](https://github.com/heroku/terraform-provider-heroku/pull/183) IMPROVEMENTS: -* Clarify usage of Heroku Teams in the docs [#187](https://github.com/terraform-providers/terraform-provider-heroku/pull/187) +* Clarify usage of Heroku Teams in the docs [#187](https://github.com/heroku/terraform-provider-heroku/pull/187) BUG FIXES: -* Fix tests using SSL Endpoint DNS target [#191](https://github.com/terraform-providers/terraform-provider-heroku/pull/191) +* Fix tests using SSL Endpoint DNS target [#191](https://github.com/heroku/terraform-provider-heroku/pull/191) ## 1.8.0 (February 27, 2019) FEATURES: -* Switch to Go Modules (prep for Terraform 0.12) [#177](https://github.com/terraform-providers/terraform-provider-heroku/pull/177) +* Switch to Go Modules (prep for Terraform 0.12) [#177](https://github.com/heroku/terraform-provider-heroku/pull/177) IMPROVEMENTS: -* Clarifying, expanding, and cross-referencing the Provider docs [#175](https://github.com/terraform-providers/terraform-provider-heroku/pull/175) +* Clarifying, expanding, and cross-referencing the Provider docs [#175](https://github.com/heroku/terraform-provider-heroku/pull/175) BUG FIXES: -* Fix so `heroku_build` source path can be current `.` or a parent `..` directory [#181](https://github.com/terraform-providers/terraform-provider-heroku/pull/181) +* Fix so `heroku_build` source path can be current `.` or a parent `..` directory [#181](https://github.com/heroku/terraform-provider-heroku/pull/181) ## 1.7.4 (February 01, 2019) IMPROVEMENTS: -* Upgrade heroku-go client to support more Heroku Platform API features [#169](https://github.com/terraform-providers/terraform-provider-heroku/pull/169) -* Add `cidr` & `data_cidr` to `heroku_space` resource & data source [#167](https://github.com/terraform-providers/terraform-provider-heroku/pull/167) +* Upgrade heroku-go client to support more Heroku Platform API features [#169](https://github.com/heroku/terraform-provider-heroku/pull/169) +* Add `cidr` & `data_cidr` to `heroku_space` resource & data source [#167](https://github.com/heroku/terraform-provider-heroku/pull/167) ## 1.7.3 (January 22, 2019) IMPROVEMENTS: -* `heroku_app` - New attribute `sensitive_config_vars` to help with sensitive heroku app config vars [#163](https://github.com/terraform-providers/terraform-provider-heroku/pull/163) +* `heroku_app` - New attribute `sensitive_config_vars` to help with sensitive heroku app config vars [#163](https://github.com/heroku/terraform-provider-heroku/pull/163) ## 1.7.2 (January 08, 2019) IMPROVEMENTS: -* Identify Terraform API requests via User-Agent header [#161](https://github.com/terraform-providers/terraform-provider-heroku/pull/161) +* Identify Terraform API requests via User-Agent header [#161](https://github.com/heroku/terraform-provider-heroku/pull/161) ## 1.7.1 (December 18, 2018) BUG FIXES: -* Add missing features/fixes to changelog [#157](https://github.com/terraform-providers/terraform-provider-heroku/pull/157) -* Build resource doc fixups [#156](https://github.com/terraform-providers/terraform-provider-heroku/pull/156) +* Add missing features/fixes to changelog [#157](https://github.com/heroku/terraform-provider-heroku/pull/157) +* Build resource doc fixups [#156](https://github.com/heroku/terraform-provider-heroku/pull/156) ## 1.7.0 (December 14, 2018) FEATURES: -* **New Resource:** `heroku_build` (for deploying source code to Heroku) [#149](https://github.com/terraform-providers/terraform-provider-heroku/pull/149) +* **New Resource:** `heroku_build` (for deploying source code to Heroku) [#149](https://github.com/heroku/terraform-provider-heroku/pull/149) IMPROVEMENTS: -* Retry with backoff when rate-limited [#135](https://github.com/terraform-providers/terraform-provider-heroku/pull/135) -* Configurable delays to provider to help alleviate issues with Heroku backend eventual consistency with regards to app, spaces, and domain creation [#142](https://github.com/terraform-providers/terraform-provider-heroku/pull/142) +* Retry with backoff when rate-limited [#135](https://github.com/heroku/terraform-provider-heroku/pull/135) +* Configurable delays to provider to help alleviate issues with Heroku backend eventual consistency with regards to app, spaces, and domain creation [#142](https://github.com/heroku/terraform-provider-heroku/pull/142) BUG FIXES: -* `heroku_app_feature` - Typos in Documentation & Test Fixes [#143](https://github.com/terraform-providers/terraform-provider-heroku/pull/143) -* Fix bad formatting in docs [#147](https://github.com/terraform-providers/terraform-provider-heroku/pull/147) -* Fix panic condition in parseCompositeID [#148](https://github.com/terraform-providers/terraform-provider-heroku/pull/148) -* Terraform sometimes creates a Heroku Cert, then gets a conflict error [#37](https://github.com/terraform-providers/terraform-provider-heroku/issues/37) -* Add Exponential Backoff When adding Heroku Domain [#71](https://github.com/terraform-providers/terraform-provider-heroku/issues/71) -* heroku_space_inbound ruleset can't be applied because heroku_space isn't actually ready [#116](https://github.com/terraform-providers/terraform-provider-heroku/issues/116) +* `heroku_app_feature` - Typos in Documentation & Test Fixes [#143](https://github.com/heroku/terraform-provider-heroku/pull/143) +* Fix bad formatting in docs [#147](https://github.com/heroku/terraform-provider-heroku/pull/147) +* Fix panic condition in parseCompositeID [#148](https://github.com/heroku/terraform-provider-heroku/pull/148) +* Terraform sometimes creates a Heroku Cert, then gets a conflict error [#37](https://github.com/heroku/terraform-provider-heroku/issues/37) +* Add Exponential Backoff When adding Heroku Domain [#71](https://github.com/heroku/terraform-provider-heroku/issues/71) +* heroku_space_inbound ruleset can't be applied because heroku_space isn't actually ready [#116](https://github.com/heroku/terraform-provider-heroku/issues/116) ## 1.6.0 (November 13, 2018) FEATURES: -* **New Resource:** `heroku_account_feature` (for managing account features) [#134](https://github.com/terraform-providers/terraform-provider-heroku/pull/134) -* **New Data Resource:** `heroku_addon` (Get information on a Heroku Addon) [#130](https://github.com/terraform-providers/terraform-provider-heroku/pull/130) +* **New Resource:** `heroku_account_feature` (for managing account features) [#134](https://github.com/heroku/terraform-provider-heroku/pull/134) +* **New Data Resource:** `heroku_addon` (Get information on a Heroku Addon) [#130](https://github.com/heroku/terraform-provider-heroku/pull/130) IMPROVEMENTS: -* `heroku_cert` - Set private_key parameter to sensitive [#133](https://github.com/terraform-providers/terraform-provider-heroku/pull/133) -* `heroku_slug` - Add test for heroku slug with a private space app [#138](https://github.com/terraform-providers/terraform-provider-heroku/pull/138) -* `heroku_slug` - Fetch slug archives via HTTPS & allow users to specify a `file_url` attribute [#139](https://github.com/terraform-providers/terraform-provider-heroku/pull/139) +* `heroku_cert` - Set private_key parameter to sensitive [#133](https://github.com/heroku/terraform-provider-heroku/pull/133) +* `heroku_slug` - Add test for heroku slug with a private space app [#138](https://github.com/heroku/terraform-provider-heroku/pull/138) +* `heroku_slug` - Fetch slug archives via HTTPS & allow users to specify a `file_url` attribute [#139](https://github.com/heroku/terraform-provider-heroku/pull/139) BUG FIXES: -* `heroku_formation` - Fix formation.html.markdown [#136](https://github.com/terraform-providers/terraform-provider-heroku/pull/136) -* `heroku_domain` - Fix heroku domain test after a [recent change](https://devcenter.heroku.com/changelog-items/1488) randomly generates a DNS target [#137](https://github.com/terraform-providers/terraform-provider-heroku/pull/137) +* `heroku_formation` - Fix formation.html.markdown [#136](https://github.com/heroku/terraform-provider-heroku/pull/136) +* `heroku_domain` - Fix heroku domain test after a [recent change](https://devcenter.heroku.com/changelog-items/1488) randomly generates a DNS target [#137](https://github.com/heroku/terraform-provider-heroku/pull/137) ## 1.5.0 (October 15, 2018) FEATURES: -* Support for ~/.netrc authentication [#113](https://github.com/terraform-providers/terraform-provider-heroku/pull/113) +* Support for ~/.netrc authentication [#113](https://github.com/heroku/terraform-provider-heroku/pull/113) IMPROVEMENTS: -* `heroku_app` - Now exports the UUID Heroku assigns the app as `uuid` [#127](https://github.com/terraform-providers/terraform-provider-heroku/pull/127) -* `heroku_slug` - Slug doc corrections & formatting [#125](https://github.com/terraform-providers/terraform-provider-heroku/pull/125) -* Fixes code snippet in the README.md [#129](https://github.com/terraform-providers/terraform-provider-heroku/pull/129) +* `heroku_app` - Now exports the UUID Heroku assigns the app as `uuid` [#127](https://github.com/heroku/terraform-provider-heroku/pull/127) +* `heroku_slug` - Slug doc corrections & formatting [#125](https://github.com/heroku/terraform-provider-heroku/pull/125) +* Fixes code snippet in the README.md [#129](https://github.com/heroku/terraform-provider-heroku/pull/129) ## 1.4.0 (September 11, 2018) FEATURES: -* **New Resource:** `heroku_slug` - Provides the ability to create & upload a slug (archive of executable code) to an app [#119](https://github.com/terraform-providers/terraform-provider-heroku/pull/119) -* **New Resource:** `heroku_team_member` - Ability to manage members of a Heroku team [#121](https://github.com/terraform-providers/terraform-provider-heroku/pull/121) +* **New Resource:** `heroku_slug` - Provides the ability to create & upload a slug (archive of executable code) to an app [#119](https://github.com/heroku/terraform-provider-heroku/pull/119) +* **New Resource:** `heroku_team_member` - Ability to manage members of a Heroku team [#121](https://github.com/heroku/terraform-provider-heroku/pull/121) IMPROVEMENTS: * `heroku_app` - Remove notes about private beta for internal apps and VPN connections [#115](https://github.com/terraform-providers/terraform-provider-heroku/pull/115) diff --git a/GNUmakefile b/GNUmakefile index 270b598b..db6f4354 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -8,12 +8,15 @@ default: build build: fmtcheck go install +release: fmtcheck + scripts/build-release + test: fmtcheck echo $(TEST) | \ xargs -t -n4 go test -v $(TESTARGS) -timeout=30s -parallel=4 testacc: fmtcheck - TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout=240m -ldflags="-X=github.com/terraform-providers/terraform-provider-heroku/version.ProviderVersion=test" + TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout=240m -ldflags="-X=github.com/heroku/terraform-provider-heroku/version.ProviderVersion=test" vet: @echo "go vet ." diff --git a/README.md b/README.md index b80b828e..48ba644c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Terraform Provider Heroku ========================= -[![Acceptance tests](https://github.com/terraform-providers/terraform-provider-heroku/workflows/Acceptance/badge.svg)](https://github.com/terraform-providers/terraform-provider-heroku/actions?query=workflow%3AAcceptance) +[![Acceptance tests](https://github.com/heroku/terraform-provider-heroku/workflows/Acceptance/badge.svg)](https://github.com/heroku/terraform-provider-heroku/actions?query=workflow%3AAcceptance) This provider is used to configure resources supported by the [Heroku Platform API](https://devcenter.heroku.com/articles/platform-api-reference). @@ -40,7 +40,7 @@ With Go language, the repository must be cloned to a specific path in `$GOPATH/s ```sh mkdir -p $GOPATH/src/github.com/terraform-providers cd $GOPATH/src/github.com/terraform-providers -git clone git@github.com:terraform-providers/terraform-provider-heroku +git clone git@github.com:heroku/terraform-provider-heroku ``` ### Build the Provider diff --git a/go.mod b/go.mod index a5e8936f..6af815a8 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/terraform-providers/terraform-provider-heroku +module github.com/heroku/terraform-provider-heroku require ( github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d @@ -12,4 +12,4 @@ require ( github.com/verybluebot/tarinator-go v0.0.0-20190613183509-5ab4e1193986 ) -go 1.13 +go 1.14 diff --git a/heroku/config.go b/heroku/config.go index d3ab10fc..55322139 100644 --- a/heroku/config.go +++ b/heroku/config.go @@ -13,8 +13,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/logging" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" heroku "github.com/heroku/heroku-go/v5" + "github.com/heroku/terraform-provider-heroku/version" homedir "github.com/mitchellh/go-homedir" - "github.com/terraform-providers/terraform-provider-heroku/version" ) const ( diff --git a/heroku/helper.go b/heroku/helper.go index 482c9db2..793d3891 100644 --- a/heroku/helper.go +++ b/heroku/helper.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" heroku "github.com/heroku/heroku-go/v5" - "github.com/terraform-providers/terraform-provider-heroku/version" + "github.com/heroku/terraform-provider-heroku/version" ) // getAppName extracts the app attribute generically from a Heroku resource. diff --git a/heroku/provider_test.go b/heroku/provider_test.go index 18eaf7ef..a2f1256f 100644 --- a/heroku/provider_test.go +++ b/heroku/provider_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/terraform" - helper "github.com/terraform-providers/terraform-provider-heroku/helper/test" + helper "github.com/heroku/terraform-provider-heroku/helper/test" ) var testAccProviders map[string]terraform.ResourceProvider diff --git a/heroku/resource_heroku_app_test.go b/heroku/resource_heroku_app_test.go index 10b3cdd9..785fce8f 100644 --- a/heroku/resource_heroku_app_test.go +++ b/heroku/resource_heroku_app_test.go @@ -319,7 +319,7 @@ func TestAccHerokuApp_Space_Internal(t *testing.T) { }) } -// https://github.com/terraform-providers/terraform-provider-heroku/issues/2 +// https://github.com/heroku/terraform-provider-heroku/issues/2 func TestAccHerokuApp_EmptyConfigVars(t *testing.T) { var app heroku.App appName := fmt.Sprintf("tftest-%s", acctest.RandString(10)) diff --git a/heroku/resource_heroku_build_test.go b/heroku/resource_heroku_build_test.go index d3e32633..c80e09f8 100644 --- a/heroku/resource_heroku_build_test.go +++ b/heroku/resource_heroku_build_test.go @@ -184,7 +184,7 @@ func TestAccHerokuBuild_LocalSourceDirectory(t *testing.T) { }) } -// https://github.com/terraform-providers/terraform-provider-heroku/issues/160 +// https://github.com/heroku/terraform-provider-heroku/issues/160 func TestAccHerokuBuild_LocalSourceDirectorySelfContained(t *testing.T) { var build heroku.Build defer func() { _ = resetSourceDirectories() }() diff --git a/heroku/resource_heroku_slug_test.go b/heroku/resource_heroku_slug_test.go index a752e9ee..de4c463e 100644 --- a/heroku/resource_heroku_slug_test.go +++ b/heroku/resource_heroku_slug_test.go @@ -271,7 +271,7 @@ func testAccCheckHerokuSlugConfig_withRemoteFile(appName string) string { resource "heroku_slug" "foobar" { app = "${heroku_app.foobar.name}" buildpack_provided_description = "Ruby" - file_url = "https://github.com/terraform-providers/terraform-provider-heroku/raw/master/heroku/test-fixtures/slug.tgz" + file_url = "https://github.com/heroku/terraform-provider-heroku/raw/master/heroku/test-fixtures/slug.tgz" process_types = { web = "ruby server.rb" } @@ -287,7 +287,7 @@ func testAccCheckHerokuSlugConfig_withInsecureRemoteFile(appName string) string resource "heroku_slug" "foobar" { app = "${heroku_app.foobar.name}" buildpack_provided_description = "Ruby" - file_url = "http://github.com/terraform-providers/terraform-provider-heroku/raw/master/heroku/test-fixtures/slug.tgz" + file_url = "http://github.com/heroku/terraform-provider-heroku/raw/master/heroku/test-fixtures/slug.tgz" process_types = { web = "ruby server.rb" } diff --git a/heroku/version.go b/heroku/version.go new file mode 100644 index 00000000..156a0fd0 --- /dev/null +++ b/heroku/version.go @@ -0,0 +1,16 @@ +// +build ignore + +// This a hack to populate the version in the custom binary file as this provider is not official. + +package main + +import ( + "fmt" + "github.com/heroku/terraform-provider-heroku/version" +) + +var ver = version.ProviderVersion + +func main() { + fmt.Println(ver) +} diff --git a/main.go b/main.go index bcaad2a2..47002814 100644 --- a/main.go +++ b/main.go @@ -2,7 +2,7 @@ package main import ( "github.com/hashicorp/terraform-plugin-sdk/plugin" - "github.com/terraform-providers/terraform-provider-heroku/heroku" + "github.com/heroku/terraform-provider-heroku/heroku" ) func main() { diff --git a/scripts/build-release b/scripts/build-release new file mode 100755 index 00000000..cfbf2242 --- /dev/null +++ b/scripts/build-release @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +COLOR_RED='\033[0;31m' +os=$(uname) +PROVIDER="heroku" +VERSION=$(go run ${PROVIDER}/version.go) +CURRENT_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) + +if [ $CURRENT_GIT_BRANCH != 'master' ]; then + printf "\n" + printf "${COLOR_RED} Error: The build-release script must be run while on the master branch. \n ${COLOR_NONE}" + printf "\n" + + exit 1 +fi + +echo "Pulling down latest from origin" +git pull origin master + +echo "Switching to master branch" +git checkout master + +echo "Checking if master branch is clean" +if [ "$(git status --porcelain)" != "" ]; then + echo "branch is not clean. please add/commit or stage any changes first" + exit 1 +fi + +echo "Checking if local & remote master branch are in sync" +if [ "$(git diff master origin/master)" != "" ]; then + echo "Local and remote master branch are not in sync. Please rectify" + exit 1 +fi + +echo "Checking if the tag already exists" +if git show ${VERSION} >> /dev/null 2>&1 || false ; then + echo "tag ${VERSION} already exists. Did you forget to bump the version in version/version.go file?" + exit 1 +fi + +echo "Creating new release tag ${VERSION}" +git tag -a "${VERSION}" -m "Release ${VERSION}" + +echo "Pushing new release tag ${VERSION} to upstream origin" +git push origin "${VERSION}" \ No newline at end of file diff --git a/vendor/modules.txt b/vendor/modules.txt index d930aa1e..a154e0bb 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -53,6 +53,7 @@ github.com/aws/aws-sdk-go/service/s3 github.com/aws/aws-sdk-go/service/sts github.com/aws/aws-sdk-go/service/sts/stsiface # github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d +## explicit github.com/bgentry/go-netrc/netrc # github.com/bgentry/speakeasy v0.1.0 github.com/bgentry/speakeasy @@ -78,6 +79,7 @@ github.com/google/go-cmp/cmp/internal/value # github.com/google/go-querystring v1.0.0 github.com/google/go-querystring/query # github.com/google/uuid v1.1.1 +## explicit github.com/google/uuid # github.com/googleapis/gax-go/v2 v2.0.5 github.com/googleapis/gax-go/v2 @@ -91,6 +93,7 @@ github.com/hashicorp/go-getter/helper/url # github.com/hashicorp/go-hclog v0.9.2 github.com/hashicorp/go-hclog # github.com/hashicorp/go-multierror v1.0.0 +## explicit github.com/hashicorp/go-multierror # github.com/hashicorp/go-plugin v1.0.1 github.com/hashicorp/go-plugin @@ -98,12 +101,14 @@ github.com/hashicorp/go-plugin/internal/plugin # github.com/hashicorp/go-safetemp v1.0.0 github.com/hashicorp/go-safetemp # github.com/hashicorp/go-uuid v1.0.1 +## explicit github.com/hashicorp/go-uuid # github.com/hashicorp/go-version v1.2.0 github.com/hashicorp/go-version # github.com/hashicorp/golang-lru v0.5.1 github.com/hashicorp/golang-lru/simplelru # github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce +## explicit github.com/hashicorp/hcl github.com/hashicorp/hcl/hcl/ast github.com/hashicorp/hcl/hcl/parser @@ -131,6 +136,7 @@ github.com/hashicorp/terraform-config-inspect/tfconfig # github.com/hashicorp/terraform-json v0.4.0 github.com/hashicorp/terraform-json # github.com/hashicorp/terraform-plugin-sdk v1.12.0 +## explicit github.com/hashicorp/terraform-plugin-sdk/acctest github.com/hashicorp/terraform-plugin-sdk/helper/acctest github.com/hashicorp/terraform-plugin-sdk/helper/hashcode @@ -185,6 +191,7 @@ github.com/hashicorp/terraform-svchost/disco # github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d github.com/hashicorp/yamux # github.com/heroku/heroku-go/v5 v5.2.0 +## explicit github.com/heroku/heroku-go/v5 # github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af github.com/jmespath/go-jmespath @@ -199,6 +206,7 @@ github.com/mitchellh/colorstring # github.com/mitchellh/copystructure v1.0.0 github.com/mitchellh/copystructure # github.com/mitchellh/go-homedir v1.1.0 +## explicit github.com/mitchellh/go-homedir # github.com/mitchellh/go-testing-interface v1.0.0 github.com/mitchellh/go-testing-interface @@ -226,6 +234,7 @@ github.com/ulikunitz/xz/internal/hash github.com/ulikunitz/xz/internal/xlog github.com/ulikunitz/xz/lzma # github.com/verybluebot/tarinator-go v0.0.0-20190613183509-5ab4e1193986 +## explicit github.com/verybluebot/tarinator-go # github.com/vmihailenco/msgpack v4.0.1+incompatible github.com/vmihailenco/msgpack diff --git a/version/version.go b/version/version.go index 98c2e75f..4f3453d4 100644 --- a/version/version.go +++ b/version/version.go @@ -1,13 +1,5 @@ package version -//Cribbed from -//https://github.com/terraform-providers/terraform-provider-azurerm/tree/master/version -//This takes advantage of a new build flag populating the binary version of the -//provider, for example: -//-ldflags="-X=github.com/terraform-providers/terraform-provider-heroku/version.ProviderVersion=x.x.x" - var ( - // ProviderVersion is set during the release process to the release version of the binary, and - // set to acc during tests. - ProviderVersion = "dev" + ProviderVersion = "2.6.0" ) diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index 52e1ae62..c49c9229 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -22,11 +22,11 @@ simplest path to delivering apps quickly: ## Contributing -Development happens in the [GitHub repo](https://github.com/terraform-providers/terraform-provider-heroku): +Development happens in the [GitHub repo](https://github.com/heroku/terraform-provider-heroku): -* [Releases](https://github.com/terraform-providers/terraform-provider-heroku/releases) -* [Changelog](https://github.com/terraform-providers/terraform-provider-heroku/blob/master/CHANGELOG.md) -* [Issues](https://github.com/terraform-providers/terraform-provider-heroku/issues) +* [Releases](https://github.com/heroku/terraform-provider-heroku/releases) +* [Changelog](https://github.com/heroku/terraform-provider-heroku/blob/master/CHANGELOG.md) +* [Issues](https://github.com/heroku/terraform-provider-heroku/issues) ## Example Usage diff --git a/website/docs/r/build.html.markdown b/website/docs/r/build.html.markdown index 09b2e152..fc0ad2bf 100644 --- a/website/docs/r/build.html.markdown +++ b/website/docs/r/build.html.markdown @@ -87,7 +87,7 @@ A `source.path` may point to either: * use `src/appname` relative paths to child directories within the Terraform project repo (recommended) * use `/opt/src/appname` absolute or `../appname` relative paths to external directories * **avoid ancestor paths that contain the Terraform configuration itself** - * paths such as `../` will [cause errors during apply](https://github.com/terraform-providers/terraform-provider-heroku/issues/269) + * paths such as `../` will [cause errors during apply](https://github.com/heroku/terraform-provider-heroku/issues/269) When running `terraform apply`, if the contents (SHA256) of the source path changed since the last `apply`, then a new build will start. diff --git a/website/docs/r/slug.html.markdown b/website/docs/r/slug.html.markdown index 08299bda..be49ba1a 100644 --- a/website/docs/r/slug.html.markdown +++ b/website/docs/r/slug.html.markdown @@ -25,7 +25,7 @@ Create a ready-to-release slug: ```hcl resource "heroku_slug" "foobar" { app = "${heroku_app.foobar.id}" - file_url = "https://github.com/terraform-providers/terraform-provider-heroku/raw/master/heroku/test-fixtures/slug.tgz" + file_url = "https://github.com/heroku/terraform-provider-heroku/raw/master/heroku/test-fixtures/slug.tgz" process_types = { web = "ruby server.rb"