Skip to content

Commit 38cec3c

Browse files
committed
New waypoint service and models no longer have the v2 suffix
1 parent aab7e68 commit 38cec3c

14 files changed

+133
-133
lines changed

internal/clients/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ import (
5050
cloud_vault_secrets "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/client"
5151
"github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service"
5252

53-
cloud_waypoint_v2 "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/client"
54-
waypoint_service_v2 "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/client/waypoint_service"
53+
cloud_waypoint "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/client"
54+
"github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/client/waypoint_service"
5555

5656
cloud_log_service "github.com/hashicorp/hcp-sdk-go/clients/cloud-log-service/preview/2021-03-30/client"
5757
"github.com/hashicorp/hcp-sdk-go/clients/cloud-log-service/preview/2021-03-30/client/log_service"
@@ -87,7 +87,7 @@ type Client struct {
8787
Groups groups_service.ClientService
8888
Vault vault_service.ClientService
8989
VaultSecrets secret_service.ClientService
90-
Waypoint waypoint_service_v2.ClientService
90+
Waypoint waypoint_service.ClientService
9191
Webhook webhook_service.ClientService
9292
LogService log_service.ClientService
9393
LogStreamingService streaming_service.ClientService
@@ -179,7 +179,7 @@ func NewClient(config ClientConfig) (*Client, error) {
179179
Groups: cloud_iam.New(httpClient, nil).GroupsService,
180180
Vault: cloud_vault.New(httpClient, nil).VaultService,
181181
VaultSecrets: cloud_vault_secrets.New(httpClient, nil).SecretService,
182-
Waypoint: cloud_waypoint_v2.New(httpClient, nil).WaypointService,
182+
Waypoint: cloud_waypoint.New(httpClient, nil).WaypointService,
183183
LogService: cloud_log_service.New(httpClient, nil).LogService,
184184
LogStreamingService: cloud_log_service.New(httpClient, nil).StreamingService,
185185
Webhook: cloud_webhook.New(httpClient, nil).WebhookService,

internal/clients/waypoint.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import (
77
"context"
88

99
sharedmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models"
10-
waypoint_service_v2 "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/client/waypoint_service"
11-
waypoint_models_v2 "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
10+
"github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/client/waypoint_service"
11+
waypoint_models "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
1212
)
1313

1414
// GetAction will retrieve an Action using the provided ID by default
1515
// or by name if the ID is not provided
16-
func GetAction(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, actionID string, actionName string) (*waypoint_models_v2.HashicorpCloudWaypointActionConfig, error) {
17-
params := &waypoint_service_v2.WaypointServiceGetActionConfigParams{
16+
func GetAction(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, actionID string, actionName string) (*waypoint_models.HashicorpCloudWaypointActionConfig, error) {
17+
params := &waypoint_service.WaypointServiceGetActionConfigParams{
1818
ActionID: &actionID,
1919
ActionName: &actionName,
2020
NamespaceLocationOrganizationID: loc.OrganizationID,
@@ -29,8 +29,8 @@ func GetAction(ctx context.Context, client *Client, loc *sharedmodels.HashicorpC
2929
}
3030

3131
// GetApplicationTemplateByName will retrieve a template by name
32-
func GetApplicationTemplateByName(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string) (*waypoint_models_v2.HashicorpCloudWaypointApplicationTemplate, error) {
33-
params := &waypoint_service_v2.WaypointServiceGetApplicationTemplate2Params{
32+
func GetApplicationTemplateByName(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string) (*waypoint_models.HashicorpCloudWaypointApplicationTemplate, error) {
33+
params := &waypoint_service.WaypointServiceGetApplicationTemplate2Params{
3434
ApplicationTemplateName: appName,
3535
NamespaceLocationOrganizationID: loc.OrganizationID,
3636
NamespaceLocationProjectID: loc.ProjectID,
@@ -44,8 +44,8 @@ func GetApplicationTemplateByName(ctx context.Context, client *Client, loc *shar
4444
}
4545

4646
// GetApplicationTemplateByID will retrieve a template by ID
47-
func GetApplicationTemplateByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appID string) (*waypoint_models_v2.HashicorpCloudWaypointApplicationTemplate, error) {
48-
params := &waypoint_service_v2.WaypointServiceGetApplicationTemplateParams{
47+
func GetApplicationTemplateByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appID string) (*waypoint_models.HashicorpCloudWaypointApplicationTemplate, error) {
48+
params := &waypoint_service.WaypointServiceGetApplicationTemplateParams{
4949
ApplicationTemplateID: appID,
5050
NamespaceLocationOrganizationID: loc.OrganizationID,
5151
NamespaceLocationProjectID: loc.ProjectID,
@@ -59,8 +59,8 @@ func GetApplicationTemplateByID(ctx context.Context, client *Client, loc *shared
5959
}
6060

6161
// GetAddOnDefinitionByName will retrieve an add-on definition by name
62-
func GetAddOnDefinitionByName(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, defName string) (*waypoint_models_v2.HashicorpCloudWaypointAddOnDefinition, error) {
63-
params := &waypoint_service_v2.WaypointServiceGetAddOnDefinition2Params{
62+
func GetAddOnDefinitionByName(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, defName string) (*waypoint_models.HashicorpCloudWaypointAddOnDefinition, error) {
63+
params := &waypoint_service.WaypointServiceGetAddOnDefinition2Params{
6464
AddOnDefinitionName: defName,
6565
NamespaceLocationOrganizationID: loc.OrganizationID,
6666
NamespaceLocationProjectID: loc.ProjectID,
@@ -74,8 +74,8 @@ func GetAddOnDefinitionByName(ctx context.Context, client *Client, loc *sharedmo
7474
}
7575

7676
// GetAddOnDefinitionByID will retrieve an add-on definition by ID
77-
func GetAddOnDefinitionByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, defID string) (*waypoint_models_v2.HashicorpCloudWaypointAddOnDefinition, error) {
78-
params := &waypoint_service_v2.WaypointServiceGetAddOnDefinitionParams{
77+
func GetAddOnDefinitionByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, defID string) (*waypoint_models.HashicorpCloudWaypointAddOnDefinition, error) {
78+
params := &waypoint_service.WaypointServiceGetAddOnDefinitionParams{
7979
AddOnDefinitionID: defID,
8080
NamespaceLocationOrganizationID: loc.OrganizationID,
8181
NamespaceLocationProjectID: loc.ProjectID,
@@ -89,8 +89,8 @@ func GetAddOnDefinitionByID(ctx context.Context, client *Client, loc *sharedmode
8989
}
9090

9191
// GetApplicationByName will retrieve an application by name
92-
func GetApplicationByName(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string) (*waypoint_models_v2.HashicorpCloudWaypointApplication, error) {
93-
params := &waypoint_service_v2.WaypointServiceGetApplication2Params{
92+
func GetApplicationByName(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string) (*waypoint_models.HashicorpCloudWaypointApplication, error) {
93+
params := &waypoint_service.WaypointServiceGetApplication2Params{
9494
ApplicationName: appName,
9595
NamespaceLocationOrganizationID: loc.OrganizationID,
9696
NamespaceLocationProjectID: loc.ProjectID,
@@ -104,8 +104,8 @@ func GetApplicationByName(ctx context.Context, client *Client, loc *sharedmodels
104104
}
105105

106106
// GetApplicationByID will retrieve an application by ID
107-
func GetApplicationByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appID string) (*waypoint_models_v2.HashicorpCloudWaypointApplication, error) {
108-
params := &waypoint_service_v2.WaypointServiceGetApplicationParams{
107+
func GetApplicationByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appID string) (*waypoint_models.HashicorpCloudWaypointApplication, error) {
108+
params := &waypoint_service.WaypointServiceGetApplicationParams{
109109
ApplicationID: appID,
110110
NamespaceLocationOrganizationID: loc.OrganizationID,
111111
NamespaceLocationProjectID: loc.ProjectID,
@@ -119,8 +119,8 @@ func GetApplicationByID(ctx context.Context, client *Client, loc *sharedmodels.H
119119
}
120120

121121
// GetAddOnByName will retrieve an add-on by name
122-
func GetAddOnByName(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, defName string) (*waypoint_models_v2.HashicorpCloudWaypointAddOn, error) {
123-
params := &waypoint_service_v2.WaypointServiceGetAddOn2Params{
122+
func GetAddOnByName(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, defName string) (*waypoint_models.HashicorpCloudWaypointAddOn, error) {
123+
params := &waypoint_service.WaypointServiceGetAddOn2Params{
124124
AddOnName: defName,
125125
NamespaceLocationOrganizationID: loc.OrganizationID,
126126
NamespaceLocationProjectID: loc.ProjectID,
@@ -134,8 +134,8 @@ func GetAddOnByName(ctx context.Context, client *Client, loc *sharedmodels.Hashi
134134
}
135135

136136
// GetAddOnByID will retrieve an add-on by ID
137-
func GetAddOnByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, defID string) (*waypoint_models_v2.HashicorpCloudWaypointAddOn, error) {
138-
params := &waypoint_service_v2.WaypointServiceGetAddOnParams{
137+
func GetAddOnByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, defID string) (*waypoint_models.HashicorpCloudWaypointAddOn, error) {
138+
params := &waypoint_service.WaypointServiceGetAddOnParams{
139139
AddOnID: defID,
140140
NamespaceLocationOrganizationID: loc.OrganizationID,
141141
NamespaceLocationProjectID: loc.ProjectID,
@@ -148,8 +148,8 @@ func GetAddOnByID(ctx context.Context, client *Client, loc *sharedmodels.Hashico
148148
return getResp.GetPayload().AddOn, nil
149149
}
150150

151-
func GetInputVariables(ctx context.Context, client *Client, workspaceName string, loc *sharedmodels.HashicorpCloudLocationLocation) ([]*waypoint_models_v2.HashicorpCloudWaypointInputVariable, error) {
152-
params := &waypoint_service_v2.WaypointServiceGetTFRunStatusParams{
151+
func GetInputVariables(ctx context.Context, client *Client, workspaceName string, loc *sharedmodels.HashicorpCloudLocationLocation) ([]*waypoint_models.HashicorpCloudWaypointInputVariable, error) {
152+
params := &waypoint_service.WaypointServiceGetTFRunStatusParams{
153153
WorkspaceName: workspaceName,
154154
NamespaceLocationOrganizationID: loc.OrganizationID,
155155
NamespaceLocationProjectID: loc.ProjectID,

internal/provider/waypoint/data_source_waypoint_action.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"fmt"
99

1010
sharedmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models"
11-
waypoint_models_v2 "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
11+
waypoint_models "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
1212
"github.com/hashicorp/terraform-plugin-framework-validators/datasourcevalidator"
1313
"github.com/hashicorp/terraform-plugin-framework/datasource"
1414
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
@@ -142,7 +142,7 @@ func (d *DataSourceAction) Read(ctx context.Context, req datasource.ReadRequest,
142142
ProjectID: projectID,
143143
}
144144

145-
var actionModel *waypoint_models_v2.HashicorpCloudWaypointActionConfig
145+
var actionModel *waypoint_models.HashicorpCloudWaypointActionConfig
146146
var err error
147147

148148
actionModel, err = clients.GetAction(ctx, client, loc, data.ID.ValueString(), data.Name.ValueString())

internal/provider/waypoint/data_source_waypoint_add_on.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strconv"
1010

1111
sharedmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models"
12-
waypoint_models_v2 "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
12+
waypoint_models "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
1313
"github.com/hashicorp/terraform-plugin-framework-validators/datasourcevalidator"
1414
"github.com/hashicorp/terraform-plugin-framework/datasource"
1515
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
@@ -214,7 +214,7 @@ func (d *DataSourceAddOn) Read(ctx context.Context, req datasource.ReadRequest,
214214
ProjectID: client.Config.ProjectID,
215215
}
216216

217-
var addOn *waypoint_models_v2.HashicorpCloudWaypointAddOn
217+
var addOn *waypoint_models.HashicorpCloudWaypointAddOn
218218
var err error
219219

220220
if state.ID.IsNull() {

internal/provider/waypoint/data_source_waypoint_add_on_definition.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"fmt"
99

1010
sharedmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models"
11-
waypoint_models_v2 "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
11+
waypoint_models "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
1212
"github.com/hashicorp/terraform-plugin-framework-validators/datasourcevalidator"
1313
"github.com/hashicorp/terraform-plugin-framework/datasource"
1414
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
@@ -198,7 +198,7 @@ func (d *DataSourceAddOnDefinition) Read(ctx context.Context, req datasource.Rea
198198
ProjectID: projectID,
199199
}
200200

201-
var definition *waypoint_models_v2.HashicorpCloudWaypointAddOnDefinition
201+
var definition *waypoint_models.HashicorpCloudWaypointAddOnDefinition
202202
var err error
203203

204204
if state.ID.IsNull() {

internal/provider/waypoint/data_source_waypoint_application.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"fmt"
99

1010
sharedmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models"
11-
waypoint_models_v2 "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
11+
waypoint_models "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
1212
"github.com/hashicorp/terraform-plugin-framework-validators/datasourcevalidator"
1313
"github.com/hashicorp/terraform-plugin-framework/datasource"
1414
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
@@ -190,7 +190,7 @@ func (d *DataSourceApplication) Read(ctx context.Context, req datasource.ReadReq
190190
ProjectID: projectID,
191191
}
192192

193-
var application *waypoint_models_v2.HashicorpCloudWaypointApplication
193+
var application *waypoint_models.HashicorpCloudWaypointApplication
194194
var err error
195195

196196
if data.ID.IsNull() {

internal/provider/waypoint/data_source_waypoint_template.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"fmt"
99

1010
sharedmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models"
11-
waypoint_models_v2 "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
11+
waypoint_models "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
1212
"github.com/hashicorp/terraform-plugin-framework-validators/datasourcevalidator"
1313
"github.com/hashicorp/terraform-plugin-framework/datasource"
1414
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
@@ -198,7 +198,7 @@ func (d *DataSourceTemplate) Read(ctx context.Context, req datasource.ReadReques
198198
ProjectID: projectID,
199199
}
200200

201-
var appTemplate *waypoint_models_v2.HashicorpCloudWaypointApplicationTemplate
201+
var appTemplate *waypoint_models.HashicorpCloudWaypointApplicationTemplate
202202
var err error
203203

204204
if data.ID.IsNull() {

0 commit comments

Comments
 (0)