Skip to content

Commit

Permalink
HVS use stable/2023-11-28 api (#1142)
Browse files Browse the repository at this point in the history
* HVS use stable/2023-11-28 api

* changelog
  • Loading branch information
keeefer authored Nov 21, 2024
1 parent 921447b commit 4233dae
Show file tree
Hide file tree
Showing 31 changed files with 137 additions and 138 deletions.
3 changes: 3 additions & 0 deletions .changelog/1142.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
Upgrade the HCP SDK and update Vault Secrets to use API V2 (stable/2023-11-28)
```
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/hashicorp/go-cty v1.4.1-0.20200723130312-85980079f637
github.com/hashicorp/go-uuid v1.0.3
github.com/hashicorp/go-version v1.7.0
github.com/hashicorp/hcp-sdk-go v0.122.0
github.com/hashicorp/hcp-sdk-go v0.123.0
github.com/hashicorp/terraform-plugin-docs v0.19.4
github.com/hashicorp/terraform-plugin-framework v1.5.0
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ github.com/hashicorp/hc-install v0.7.0 h1:Uu9edVqjKQxxuD28mR5TikkKDd/p55S8vzPC16
github.com/hashicorp/hc-install v0.7.0/go.mod h1:ELmmzZlGnEcqoUMKUuykHaPCIR1sYLYX+KSggWSKZuA=
github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI=
github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE=
github.com/hashicorp/hcp-sdk-go v0.122.0 h1:eH9NFyscG10/LQjglWgN4HFHDZ6/8uEGDDPQ+6CXAHY=
github.com/hashicorp/hcp-sdk-go v0.122.0/go.mod h1:vQ4fzdL1AmhIAbCw+4zmFe5Hbpajj3NvRWkJoVuxmAk=
github.com/hashicorp/hcp-sdk-go v0.123.0 h1:kUf/kSCVkQ4XXyny8GUyUWjvIIIanGRRkhRmgj2lC+4=
github.com/hashicorp/hcp-sdk-go v0.123.0/go.mod h1:vQ4fzdL1AmhIAbCw+4zmFe5Hbpajj3NvRWkJoVuxmAk=
github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ=
Expand Down
8 changes: 2 additions & 6 deletions internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ import (
cloud_vault "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-service/stable/2020-11-25/client"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-service/stable/2020-11-25/client/vault_service"

cloud_vault_secrets_preview "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/client"
secret_service_preview "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/client/secret_service"
cloud_vault_secrets "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-06-13/client"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-06-13/client/secret_service"
cloud_vault_secrets "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/client"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service"

cloud_waypoint "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2023-08-18/client"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service"
Expand Down Expand Up @@ -88,7 +86,6 @@ type Client struct {
Groups groups_service.ClientService
Vault vault_service.ClientService
VaultSecrets secret_service.ClientService
VaultSecretsPreview secret_service_preview.ClientService
Waypoint waypoint_service.ClientService
Webhook webhook_service.ClientService
LogService log_service.ClientService
Expand Down Expand Up @@ -180,7 +177,6 @@ func NewClient(config ClientConfig) (*Client, error) {
Groups: cloud_iam.New(httpClient, nil).GroupsService,
Vault: cloud_vault.New(httpClient, nil).VaultService,
VaultSecrets: cloud_vault_secrets.New(httpClient, nil).SecretService,
VaultSecretsPreview: cloud_vault_secrets_preview.New(httpClient, nil).SecretService,
Waypoint: cloud_waypoint.New(httpClient, nil).WaypointService,
LogService: cloud_log_service.New(httpClient, nil).LogService,
Webhook: cloud_webhook.New(httpClient, nil).WebhookService,
Expand Down
36 changes: 18 additions & 18 deletions internal/clients/vault_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ import (
sharedmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models"
"github.com/hashicorp/terraform-plugin-log/tflog"

"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-06-13/client/secret_service"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-06-13/models"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models"
)

// CreateVaultSecretsApp will create a Vault Secrets application.
func CreateVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string, description string) (*secretmodels.Secrets20230613App, error) {
func CreateVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string, description string) (*secretmodels.Secrets20231128App, error) {

createParams := secret_service.NewCreateAppParams()
createParams.Context = ctx
createParams.Body.Name = appName
createParams.Body.Description = description
createParams.LocationOrganizationID = loc.OrganizationID
createParams.LocationProjectID = loc.ProjectID
createParams.OrganizationID = loc.OrganizationID
createParams.ProjectID = loc.ProjectID

createResp, err := client.VaultSecrets.CreateApp(createParams, nil)
if err != nil {
Expand All @@ -37,12 +37,12 @@ func CreateVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodel
}

// GetVaultSecretsApp will read a Vault Secrets application
func GetVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string) (*secretmodels.Secrets20230613App, error) {
func GetVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string) (*secretmodels.Secrets20231128App, error) {
getParams := secret_service.NewGetAppParams()
getParams.Context = ctx
getParams.Name = appName
getParams.LocationOrganizationID = loc.OrganizationID
getParams.LocationProjectID = loc.ProjectID
getParams.OrganizationID = loc.OrganizationID
getParams.ProjectID = loc.ProjectID

getResp, err := client.VaultSecrets.GetApp(getParams, nil)
if err != nil {
Expand All @@ -53,13 +53,13 @@ func GetVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodels.H
}

// UpdateVaultSecretsApp will update an app's description
func UpdateVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string, description string) (*secretmodels.Secrets20230613App, error) {
func UpdateVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string, description string) (*secretmodels.Secrets20231128App, error) {
updateParams := secret_service.NewUpdateAppParams()
updateParams.Context = ctx
updateParams.Name = appName
updateParams.Body.Description = description
updateParams.LocationOrganizationID = loc.OrganizationID
updateParams.LocationProjectID = loc.ProjectID
updateParams.OrganizationID = loc.OrganizationID
updateParams.ProjectID = loc.ProjectID

updateResp, err := client.VaultSecrets.UpdateApp(updateParams, nil)
if err != nil {
Expand All @@ -75,8 +75,8 @@ func DeleteVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodel
deleteParams := secret_service.NewDeleteAppParams()
deleteParams.Context = ctx
deleteParams.Name = appName
deleteParams.LocationOrganizationID = loc.OrganizationID
deleteParams.LocationProjectID = loc.ProjectID
deleteParams.OrganizationID = loc.OrganizationID
deleteParams.ProjectID = loc.ProjectID

_, err := client.VaultSecrets.DeleteApp(deleteParams, nil)
if err != nil {
Expand All @@ -87,15 +87,15 @@ func DeleteVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodel
}

// CreateVaultSecretsAppSecret will create a Vault Secrets application secret.
func CreateVaultSecretsAppSecret(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName, secretName, secretValue string) (*secretmodels.Secrets20230613Secret, error) {
func CreateVaultSecretsAppSecret(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName, secretName, secretValue string) (*secretmodels.Secrets20231128Secret, error) {

createParams := secret_service.NewCreateAppKVSecretParams()
createParams.Context = ctx
createParams.AppName = appName
createParams.Body.Name = secretName
createParams.Body.Value = secretValue
createParams.LocationOrganizationID = loc.OrganizationID
createParams.LocationProjectID = loc.ProjectID
createParams.OrganizationID = loc.OrganizationID
createParams.ProjectID = loc.ProjectID

createResp, err := client.VaultSecrets.CreateAppKVSecret(createParams, nil)
if err != nil {
Expand All @@ -112,8 +112,8 @@ func DeleteVaultSecretsAppSecret(ctx context.Context, client *Client, loc *share
deleteParams.Context = ctx
deleteParams.AppName = appName
deleteParams.SecretName = secretName
deleteParams.LocationOrganizationID = loc.OrganizationID
deleteParams.LocationProjectID = loc.ProjectID
deleteParams.OrganizationID = loc.OrganizationID
deleteParams.ProjectID = loc.ProjectID

_, err := client.VaultSecrets.DeleteAppSecret(deleteParams, nil)
if err != nil {
Expand Down
24 changes: 12 additions & 12 deletions internal/clients/vault_secrets_preview.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"time"

sharedmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/client/secret_service"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/models"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models"
"github.com/hashicorp/terraform-plugin-log/tflog"
)

Expand All @@ -27,7 +27,7 @@ func OpenVaultSecretsAppSecret(ctx context.Context, client *Client, loc *sharedm
var getResp *secret_service.OpenAppSecretOK
var err error
for attempt := 0; attempt < retryCount; attempt++ {
getResp, err = client.VaultSecretsPreview.OpenAppSecret(getParams, nil)
getResp, err = client.VaultSecrets.OpenAppSecret(getParams, nil)
if err != nil {
var serviceErr *secret_service.OpenAppSecretDefault
ok := errors.As(err, &serviceErr)
Expand Down Expand Up @@ -65,7 +65,7 @@ func OpenVaultSecretsAppSecrets(ctx context.Context, client *Client, loc *shared

for {
for attempt := 0; attempt < retryCount; attempt++ {
secrets, err = client.VaultSecretsPreview.OpenAppSecrets(params, nil)
secrets, err = client.VaultSecrets.OpenAppSecrets(params, nil)
if err != nil {
var serviceErr *secret_service.OpenAppSecretDefault
ok := errors.As(err, &serviceErr)
Expand Down Expand Up @@ -98,7 +98,7 @@ func GetRotatingSecretState(ctx context.Context, client *Client, loc *sharedmode
WithAppName(appName).
WithName(secretName)

resp, err := client.VaultSecretsPreview.GetRotatingSecretState(params, nil)
resp, err := client.VaultSecrets.GetRotatingSecretState(params, nil)
if err != nil {
return nil, err
}
Expand All @@ -123,7 +123,7 @@ func CreateMongoDBAtlasRotationIntegration(ctx context.Context, client *Client,
WithProjectID(loc.ProjectID).
WithBody(&body)

resp, err := client.VaultSecretsPreview.CreateMongoDBAtlasIntegration(params, nil)
resp, err := client.VaultSecrets.CreateMongoDBAtlasIntegration(params, nil)
if err != nil {
return nil, err
}
Expand All @@ -138,7 +138,7 @@ func DeleteMongoDBAtlasRotationIntegration(ctx context.Context, client *Client,
WithProjectID(loc.ProjectID).
WithName(integrationName)

_, err := client.VaultSecretsPreview.DeleteMongoDBAtlasIntegration(params, nil)
_, err := client.VaultSecrets.DeleteMongoDBAtlasIntegration(params, nil)
if err != nil {
return err
}
Expand All @@ -160,7 +160,7 @@ func CreateMongoDBAtlasRotatingSecret(
WithAppName(appName).
WithBody(requestBody)

resp, err := client.VaultSecretsPreview.CreateMongoDBAtlasRotatingSecret(params, nil)
resp, err := client.VaultSecrets.CreateMongoDBAtlasRotatingSecret(params, nil)
if err != nil {
return nil, err
}
Expand All @@ -183,7 +183,7 @@ func CreateAwsIntegration(ctx context.Context, client *Client, loc *sharedmodels
WithProjectID(loc.ProjectID).
WithBody(&body)

resp, err := client.VaultSecretsPreview.CreateAwsIntegration(params, nil)
resp, err := client.VaultSecrets.CreateAwsIntegration(params, nil)
if err != nil {
return nil, err
}
Expand All @@ -198,7 +198,7 @@ func DeleteAwsIntegration(ctx context.Context, client *Client, loc *sharedmodels
WithProjectID(loc.ProjectID).
WithName(name)

_, err := client.VaultSecretsPreview.DeleteAwsIntegration(params, nil)
_, err := client.VaultSecrets.DeleteAwsIntegration(params, nil)
if err != nil {
return err
}
Expand All @@ -220,7 +220,7 @@ func CreateAwsDynamicSecret(ctx context.Context, client *Client, loc *sharedmode
WithAppName(appName).
WithBody(&body)

resp, err := client.VaultSecretsPreview.CreateAwsDynamicSecret(params, nil)
resp, err := client.VaultSecrets.CreateAwsDynamicSecret(params, nil)
if err != nil {
return nil, err
}
Expand All @@ -236,7 +236,7 @@ func DeleteAwsDynamicSecret(ctx context.Context, client *Client, loc *sharedmode
WithAppName(appName).
WithName(name)

_, err := client.VaultSecretsPreview.DeleteAwsDynamicSecret(params, nil)
_, err := client.VaultSecrets.DeleteAwsDynamicSecret(params, nil)
if err != nil {
return err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"

sharedmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/models"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"
"github.com/hashicorp/terraform-provider-hcp/internal/clients"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

sharedmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/models"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"

Expand Down
4 changes: 2 additions & 2 deletions internal/provider/vaultsecrets/dynamic_secret_aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"context"
"fmt"

"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/client/secret_service"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/models"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models"
"github.com/hashicorp/terraform-provider-hcp/internal/clients"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/provider/vaultsecrets/dynamic_secret_gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"context"
"fmt"

"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/client/secret_service"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/models"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models"
"github.com/hashicorp/terraform-provider-hcp/internal/clients"
)

Expand Down
12 changes: 6 additions & 6 deletions internal/provider/vaultsecrets/resource_vault_secrets_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"fmt"
"regexp"

"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/client/secret_service"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/models"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service"
secretmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/path"
Expand Down Expand Up @@ -120,7 +120,7 @@ func (r *resourceVaultSecretsApp) Create(ctx context.Context, req resource.Creat
return nil, fmt.Errorf("invalid resource type, expected *App, got: %T, this is a bug on the provider", i)
}

response, err := r.client.VaultSecretsPreview.CreateApp(&secret_service.CreateAppParams{
response, err := r.client.VaultSecrets.CreateApp(&secret_service.CreateAppParams{
Body: &secretmodels.SecretServiceCreateAppBody{
Name: app.AppName.ValueString(),
Description: app.Description.ValueString(),
Expand All @@ -145,7 +145,7 @@ func (r *resourceVaultSecretsApp) Read(ctx context.Context, req resource.ReadReq
return nil, fmt.Errorf("invalid integration type, expected *App, got: %T, this is a bug on the provider", i)
}

response, err := r.client.VaultSecretsPreview.GetApp(
response, err := r.client.VaultSecrets.GetApp(
secret_service.NewGetAppParamsWithContext(ctx).
WithOrganizationID(app.OrganizationID.ValueString()).
WithProjectID(app.ProjectID.ValueString()).
Expand All @@ -167,7 +167,7 @@ func (r *resourceVaultSecretsApp) Update(ctx context.Context, req resource.Updat
return nil, fmt.Errorf("invalid integration type, expected *App, got: %T, this is a bug on the provider", i)
}

response, err := r.client.VaultSecretsPreview.UpdateApp(&secret_service.UpdateAppParams{
response, err := r.client.VaultSecrets.UpdateApp(&secret_service.UpdateAppParams{
Body: &secretmodels.SecretServiceUpdateAppBody{
Description: app.Description.ValueString(),
},
Expand All @@ -192,7 +192,7 @@ func (r *resourceVaultSecretsApp) Delete(ctx context.Context, req resource.Delet
return nil, fmt.Errorf("invalid integration type, expected *App, got: %T, this is a bug on the provider", i)
}

_, err := r.client.VaultSecretsPreview.DeleteApp(
_, err := r.client.VaultSecrets.DeleteApp(
secret_service.NewDeleteAppParamsWithContext(ctx).
WithOrganizationID(app.OrganizationID.ValueString()).
WithProjectID(app.ProjectID.ValueString()).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"os"
"testing"

"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/client/secret_service"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/preview/2023-11-28/models"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"
"github.com/hashicorp/terraform-provider-hcp/internal/clients"
Expand Down Expand Up @@ -52,7 +52,7 @@ func TestAccVaultSecretsResourceApp(t *testing.T) {
PreConfig: func() {
t.Helper()
client := acctest.HCPClients(t)
_, err := client.VaultSecretsPreview.DeleteApp(&secret_service.DeleteAppParams{
_, err := client.VaultSecrets.DeleteApp(&secret_service.DeleteAppParams{
OrganizationID: client.Config.OrganizationID,
ProjectID: client.Config.ProjectID,
Name: appName2,
Expand All @@ -73,7 +73,7 @@ func TestAccVaultSecretsResourceApp(t *testing.T) {
PreConfig: func() {
t.Helper()
client := acctest.HCPClients(t)
_, err := client.VaultSecretsPreview.CreateApp(&secret_service.CreateAppParams{
_, err := client.VaultSecrets.CreateApp(&secret_service.CreateAppParams{
OrganizationID: client.Config.OrganizationID,
ProjectID: client.Config.ProjectID,
Body: &models.SecretServiceCreateAppBody{
Expand Down Expand Up @@ -130,7 +130,7 @@ func appExists(t *testing.T, name string) bool {

client := acctest.HCPClients(t)

response, err := client.VaultSecretsPreview.GetApp(
response, err := client.VaultSecrets.GetApp(
secret_service.NewGetAppParamsWithContext(ctx).
WithOrganizationID(client.Config.OrganizationID).
WithProjectID(client.Config.ProjectID).
Expand Down
Loading

0 comments on commit 4233dae

Please sign in to comment.