Skip to content

Commit 1df52d0

Browse files
authored
Remove StatusPage (#1216)
* Make testacc a dependency for prerelease * Statuspage is undergoing migration, so disable while it is failing * Add changelog entry * Fully remove statuspage checks * Update changelog
1 parent 3739a60 commit 1df52d0

File tree

6 files changed

+4
-259
lines changed

6 files changed

+4
-259
lines changed

.changelog/1216.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
diagnostics: Remove statuspage checks
3+
```

internal/provider/provider.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,6 @@ func NewFrameworkProvider(version string) func() provider.Provider {
226226
}
227227

228228
func (p *ProviderFramework) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) {
229-
// In order to avoid disrupting testing and development, the HCP status check only runs on prod.
230-
// HCP_API_HOST is used to point the provider at test environments. When unset, the provider points to prod.
231-
if os.Getenv("HCP_API_HOST") == "" || os.Getenv("HCP_API_HOST") == "api.cloud.hashicorp.com" {
232-
// This helper verifies HCP's status and either returns a warning for degraded performance
233-
// or errors out if there's an outage.
234-
resp.Diagnostics.Append(isHCPOperationalFramework()...)
235-
}
236-
237229
// Sets up HCP SDK client.
238230
var data ProviderFrameworkModel
239231
resp.Diagnostics.Append(req.Config.Get(ctx, &data)...)

internal/provider/statuspage.go

Lines changed: 0 additions & 115 deletions
This file was deleted.

internal/providersdkv2/provider.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,7 @@ func New() func() *schema.Provider {
126126

127127
func configure(p *schema.Provider) func(context.Context, *schema.ResourceData) (interface{}, diag.Diagnostics) {
128128
return func(ctx context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics) {
129-
130129
var diags diag.Diagnostics
131-
// In order to avoid disrupting testing and development, the HCP status check only runs on prod.
132-
// HCP_API_HOST is used to point the provider at test environments. When unset, the provider points to prod.
133-
if os.Getenv("HCP_API_HOST") == "" || os.Getenv("HCP_API_HOST") == "api.cloud.hashicorp.com" {
134-
// This helper verifies HCP's status and either returns a warning for degraded performance
135-
// or errors out if there's an outage.
136-
diags = isHCPOperational()
137-
}
138130

139131
clientConfig := clients.ClientConfig{
140132
ClientID: d.Get("client_id").(string),

internal/providersdkv2/statuspage.go

Lines changed: 0 additions & 128 deletions
This file was deleted.

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server"
1414
"github.com/hashicorp/terraform-plugin-mux/tf5to6server"
1515
"github.com/hashicorp/terraform-plugin-mux/tf6muxserver"
16+
1617
provider "github.com/hashicorp/terraform-provider-hcp/internal/provider"
1718
providersdkv2 "github.com/hashicorp/terraform-provider-hcp/internal/providersdkv2"
1819
"github.com/hashicorp/terraform-provider-hcp/version"

0 commit comments

Comments
 (0)