Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,28 @@ jobs:
- name: Install Terraform
run: |
set -eu
curl -s -L "https://releases.hashicorp.com/terraform/1.3.6/terraform_1.3.6_linux_amd64.zip" > "terraform-bin.zip"
terraform_version="1.6.6"

# overwrite existing Terraform binary
set +e
terraform_bin="$(which terraform)"
set -e
if [ -z "$terraform_bin" ]
then
terraform_bin="/usr/local/bin/terraform"
echo "Installing Terraform ($terraform_bin)"
else
echo "Replacing Terraform ($terraform_bin)"
fi
echo "Downloading version $terraform_version"
curl -s -L "https://releases.hashicorp.com/terraform/${terraform_version}/terraform_${terraform_version}_linux_amd64.zip" > "terraform-bin.zip"
echo "Unzipping archive"
unzip -p terraform-bin.zip > terraform-bin
echo "Moving into place"
sudo mv terraform-bin "$terraform_bin"
echo "Making executable"
sudo chmod +x "$terraform_bin"
echo "Cleaning-up"
rm terraform-bin.zip

echo "Installed: $(eval "$terraform_bin version") ($terraform_bin)"

- name: Run make fmt
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.5
1.24.5
61 changes: 0 additions & 61 deletions docs/resources/cert.md

This file was deleted.

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ module github.com/heroku/terraform-provider-heroku/v5

require (
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
github.com/google/uuid v1.3.0
github.com/google/uuid v1.6.0
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-uuid v1.0.3
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1
github.com/heroku/heroku-go/v5 v5.4.1
github.com/heroku/heroku-go/v5 v5.5.1-0.20250807230708-aa87a5d8bc5b
github.com/mitchellh/go-homedir v1.1.0
github.com/verybluebot/tarinator-go v0.0.0-20190613183509-5ab4e1193986
)
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=
Expand Down Expand Up @@ -123,8 +123,8 @@ github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKL
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/heroku/heroku-go/v5 v5.4.1 h1:J1nNnR3/571b2iUDHl+y1B3VkhKm6YOXIq9GGzQUv5s=
github.com/heroku/heroku-go/v5 v5.4.1/go.mod h1:Uo3XhGPwaTpniR4X1e50BDjg4SzdFk2Bd2mgYZVkfHo=
github.com/heroku/heroku-go/v5 v5.5.1-0.20250807230708-aa87a5d8bc5b h1:T1CWJw0rBtLcbnaAPj5sNO9feB+NrGHuKU8+kNznGjk=
github.com/heroku/heroku-go/v5 v5.5.1-0.20250807230708-aa87a5d8bc5b/go.mod h1:Uo3XhGPwaTpniR4X1e50BDjg4SzdFk2Bd2mgYZVkfHo=
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
Expand Down
36 changes: 0 additions & 36 deletions heroku/import_heroku_cert_test.go

This file was deleted.

1 change: 0 additions & 1 deletion heroku/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ func Provider() *schema.Provider {
"heroku_app_release": resourceHerokuAppRelease(),
"heroku_app_webhook": resourceHerokuAppWebhook(),
"heroku_build": resourceHerokuBuild(),
"heroku_cert": resourceHerokuCert(),
"heroku_collaborator": resourceHerokuCollaborator(),
"heroku_config": resourceHerokuConfig(),
"heroku_domain": resourceHerokuDomain(),
Expand Down
4 changes: 3 additions & 1 deletion heroku/resource_heroku_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,9 @@ func (a *application) Update() error {
a.App.Region = app.Region.Name
a.App.Stack = app.BuildStack.Name
a.App.GitURL = app.GitURL
a.App.WebURL = app.WebURL
if app.WebURL != nil {
a.App.WebURL = *app.WebURL
}
a.App.Acm = app.Acm
a.App.ID = app.ID

Expand Down
19 changes: 10 additions & 9 deletions heroku/resource_heroku_build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ func TestAccHerokuBuild_LocalSourceTarball(t *testing.T) {
var build, build2 heroku.Build
randString := acctest.RandString(10)
appName := fmt.Sprintf("tftest-%s", randString)
// Manually generated using `shasum --algorithm 256 slug.tgz`
// Manually generated using `shasum --algorithm 256 app.tgz`
// Manually generated using `shasum --algorithm 256 app-2.tgz`
// per Heroku docs https://devcenter.heroku.com/articles/slug-checksums
sourceChecksum := "SHA256:14671a3dcf1ba3f4976438bfd4654da5d2b18ccefa59d10187ecc1286f08ee29"
sourceChecksum2 := "SHA256:a60dabd2ab4253e85a1a13734dcc444e830f61995247cd307655219c2504738a"
sourceChecksum := "SHA256:da57c23d767c971b383de3bf1a680e5ea0f3991f4738552cb383127e60864b20"
sourceChecksum2 := "SHA256:483332872ad9112337b5790da1406c8b3cdcf07d53d04c953d9e17d3e63fb522"

defer resetSourceFiles()

Expand Down Expand Up @@ -267,7 +268,7 @@ func testAccCheckHerokuBuildConfig_basic(appName string) string {
resource "heroku_build" "foobar" {
app_id = heroku_app.foobar.id
source {
url = "https://github.com/heroku/terraform-provider-heroku/raw/master/heroku/test-fixtures/app.tgz"
url = "https://github.com/heroku/terraform-provider-heroku/raw/update-heroku-api-client/heroku/test-fixtures/app.tgz"
}
}`, appName)
}
Expand All @@ -281,7 +282,7 @@ func testAccCheckHerokuBuildConfig_fails(appName string) string {
resource "heroku_build" "foobar" {
app_id = heroku_app.foobar.id
source {
url = "https://github.com/heroku/terraform-provider-heroku/raw/display-build-error-inline/heroku/test-fixtures/app-broken-build.tgz"
url = "https://github.com/heroku/terraform-provider-heroku/raw/update-heroku-api-client/heroku/test-fixtures/app-broken-build.tgz"
}
}`, appName)
}
Expand All @@ -295,7 +296,7 @@ func testAccCheckHerokuBuildConfig_insecureUrl(appName string) string {
resource "heroku_build" "foobar" {
app_id = heroku_app.foobar.id
source {
url = "http://github.com/mars/terraform-provider-heroku/raw/build-resource/heroku/test-fixtures/app.tgz"
url = "http://github.com/mars/terraform-provider-heroku/raw/update-heroku-api-client/heroku/test-fixtures/app.tgz"
}
}`, appName)
}
Expand All @@ -315,7 +316,7 @@ resource "heroku_build" "foobar" {
}

func testAccCheckHerokuBuildConfig_allOpts(appName string) string {
// Manually generated `checksum` using `shasum --algorithm 256 v2.1.1.tar.gz`
// Manually generated `checksum` using `shasum --algorithm 256 app.tar.gz`
// per Heroku docs https://devcenter.heroku.com/articles/slug-checksums

return fmt.Sprintf(`resource "heroku_app" "foobar" {
Expand All @@ -330,8 +331,8 @@ resource "heroku_build" "foobar" {
"https://github.com/heroku/heroku-buildpack-ruby",
]
source {
checksum = "SHA256:14671a3dcf1ba3f4976438bfd4654da5d2b18ccefa59d10187ecc1286f08ee29"
url = "https://github.com/heroku/terraform-provider-heroku/raw/master/heroku/test-fixtures/app.tgz"
checksum = "SHA256:da57c23d767c971b383de3bf1a680e5ea0f3991f4738552cb383127e60864b20"
url = "https://github.com/heroku/terraform-provider-heroku/raw/update-heroku-api-client/heroku/test-fixtures/app.tgz"
version = "v0"
}
}`, appName)
Expand Down
Loading