Skip to content

Commit

Permalink
Fix issue with project ID being set after read request
Browse files Browse the repository at this point in the history
  • Loading branch information
JenGoldstrich committed Jun 5, 2024
1 parent 28ec3f1 commit 9a9c057
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ func (r *resourcePackerBucket) Read(ctx context.Context, req resource.ReadReques

params := packerservice.NewPackerServiceGetBucketParams()
params.SetLocationOrganizationID(state.OrganizationID.ValueString())
params.SetLocationProjectID(state.ProjectID.ValueString())

params.SetBucketName(state.Name.ValueString())
bucketResp, err := r.client.PackerV2.PackerServiceGetBucket(params, nil)

params.SetLocationProjectID(state.ProjectID.ValueString())
if err != nil {
if getBucketErr, ok := err.(*packerservice.PackerServiceGetBucketDefault); ok {
if getBucketErr.IsCode(http.StatusNotFound) {
Expand Down

0 comments on commit 9a9c057

Please sign in to comment.