Skip to content

Commit

Permalink
Minor verbiage change
Browse files Browse the repository at this point in the history
  • Loading branch information
devashish-patel committed Jan 24, 2024
1 parent b06683b commit b6ee2db
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions datasource/hcp-packer-image/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ type Config struct {
// Mutually exclusive with `iteration_id`.
// If using several images from a single iteration, you may prefer
// sourcing an iteration first, and referencing it for subsequent uses,
// as every `hcp_packer_image` with the channel set will generate a
// as every `hcp-packer-image` with the channel set will generate a
// potentially billable HCP Packer request, but if several
// `hcp_packer_image`s use a shared `hcp_packer_iteration` that will
// `hcp-packer-image`s use a shared `hcp-packer-iteration` that will
// only generate one potentially billable request.
Channel string `mapstructure:"channel" required:"true"`
// The ID of the iteration to use when retrieving your image
Expand Down
6 changes: 4 additions & 2 deletions internal/hcp/api/service_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package api

import (
"context"
"errors"
"fmt"

hcpPackerAPI "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2023-01-01/client/packer_service"
hcpPackerModels "github.com/hashicorp/hcp-sdk-go/clients/cloud-packer-service/stable/2023-01-01/models"
Expand Down Expand Up @@ -84,7 +84,9 @@ func (c *Client) UpdateBuild(
}

if resp == nil {
return "", errors.New("not sure why response is nil")
return "", fmt.Errorf(
"something went wrong retrieving the build %s from bucket %s", buildID, bucketName,
)
}

return resp.Payload.Build.ID, nil
Expand Down
2 changes: 1 addition & 1 deletion internal/hcp/registry/deprecated_ds_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func withDeprecatedDatasourceConfiguration(vals map[string]cty.Value, ui sdkpack
diags = append(diags, &hcl.Diagnostic{
Severity: hcl.DiagError,
Summary: "Invalid HCP datasources",
Detail: fmt.Sprintf("Failed to decode hcp_packer_iteration datasources: %s", err),
Detail: fmt.Sprintf("Failed to decode hcp-packer-iteration datasources: %s", err),
})
return diags
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
Mutually exclusive with `iteration_id`.
If using several images from a single iteration, you may prefer
sourcing an iteration first, and referencing it for subsequent uses,
as every `hcp_packer_image` with the channel set will generate a
as every `hcp-packer-image` with the channel set will generate a
potentially billable HCP Packer request, but if several
`hcp_packer_image`s use a shared `hcp_packer_iteration` that will
`hcp-packer-image`s use a shared `hcp-packer-iteration` that will
only generate one potentially billable request.

- `iteration_id` (string) - The ID of the iteration to use when retrieving your image
Expand Down

0 comments on commit b6ee2db

Please sign in to comment.