Skip to content

Commit

Permalink
Merge branch 'main' into f-handle-simple-properties-with-oneOf
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Oct 21, 2021
2 parents f33bac5 + a526c1c commit 3595655
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
4 changes: 1 addition & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ builds:
ldflags:
- -s -w -X internal/provider.Version={{.Version}}
mod_timestamp: '{{ .CommitTimestamp }}'
changelog:
skip: true
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
Expand Down Expand Up @@ -61,4 +59,4 @@ signs:
--out ${signature}
artifacts: checksum
snapshot:
name_template: "{{ .Tag }}-next"
name_template: "{{ .Tag }}-next"
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ FEATURES:
* **New Resource:** `awscc_s3outposts_bucket`

BUG FIXES:

data-source/awscc_s3_storagelens: Fix incorrectly generated schema ([#255](https://github.com/hashicorp/terraform-provider-awscc/issues/255))
data-source/awscc_s3objectlambda_access_point: Fix incorrectly generated schema ([#255](https://github.com/hashicorp/terraform-provider-awscc/issues/255))
data-source/awscc_sagemaker_pipeline: Fix incorrectly generated schema ([#255](https://github.com/hashicorp/terraform-provider-awscc/issues/255))
resource/awscc_s3_storagelens: Fix incorrectly generated schema ([#255](https://github.com/hashicorp/terraform-provider-awscc/issues/255))
resource/awscc_s3objectlambda_access_point: Fix incorrectly generated schema ([#255](https://github.com/hashicorp/terraform-provider-awscc/issues/255))
resource/awscc_sagemaker_pipeline: Fix incorrectly generated schema ([#255](https://github.com/hashicorp/terraform-provider-awscc/issues/255))
* Persist any resource `id` to state if Create fails while waiting for async operation completion ([#252](https://github.com/hashicorp/terraform-provider-awscc/issues/252))
* data-source/awscc_s3_storagelens: Fix incorrectly generated schema ([#255](https://github.com/hashicorp/terraform-provider-awscc/issues/255))
* data-source/awscc_s3objectlambda_access_point: Fix incorrectly generated schema ([#255](https://github.com/hashicorp/terraform-provider-awscc/issues/255))
* data-source/awscc_sagemaker_pipeline: Fix incorrectly generated schema ([#255](https://github.com/hashicorp/terraform-provider-awscc/issues/255))
* resource/awscc_s3_storagelens: Fix incorrectly generated schema ([#255](https://github.com/hashicorp/terraform-provider-awscc/issues/255))
* resource/awscc_s3objectlambda_access_point: Fix incorrectly generated schema ([#255](https://github.com/hashicorp/terraform-provider-awscc/issues/255))
* resource/awscc_sagemaker_pipeline: Fix incorrectly generated schema ([#255](https://github.com/hashicorp/terraform-provider-awscc/issues/255))

## [0.3.0](https://github.com/hashicorp/terraform-provider-awscc/releases/tag/v0.3.0) (October 14, 2021)

Expand Down
22 changes: 20 additions & 2 deletions internal/generic/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,32 @@ func (r *resource) Create(ctx context.Context, request tfsdk.CreateResourceReque

err = waiter.Wait(ctx, &cloudcontrol.GetResourceRequestStatusInput{RequestToken: output.ProgressEvent.RequestToken}, r.resourceType.createTimeout)

id := aws.ToString(progressEvent.Identifier)

if err != nil {
response.Diagnostics = append(response.Diagnostics, ServiceOperationWaiterErrorDiag("Cloud Control API", "CreateResource", err))

// Save any ID to state so that the resource will be marked as tainted.
if id != "" {
err := r.setEmptyAttributes(ctx, &response.State)

if err == nil {
err = r.setId(ctx, id, &response.State)

if err != nil {
response.Diagnostics = append(response.Diagnostics, ResourceIdentifierNotSetDiag(err))
}
} else {
response.Diagnostics.AddError(
"Creation Of Terraform State Unsuccessful",
fmt.Sprintf("Unable to set Terraform State empty values. This is typically an error with the Terraform provider implementation. Original Error: %s", err.Error()),
)
}
}

return
}

id := aws.ToString(progressEvent.Identifier)

// Produce a wholly-known new State by determining the final values for any attributes left unknown in the planned state.
response.State.Raw = request.Plan.Raw

Expand Down

0 comments on commit 3595655

Please sign in to comment.