-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource/aws_storagegateway_upload_buffer: Replace `Provider produced…
… inconsistent result after apply` with actual error message Reference: #16796 Reference: #17809 Output from acceptance testing: ``` --- PASS: TestAccAWSStorageGatewayUploadBuffer_basic (455.25s) ```
- Loading branch information
Showing
4 changed files
with
55 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
resource/aws_storagegateway_upload_buffer: Replace `Provider produced inconsistent result after apply` with actual error message | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package finder | ||
|
||
import ( | ||
"github.com/aws/aws-sdk-go/aws" | ||
"github.com/aws/aws-sdk-go/service/storagegateway" | ||
) | ||
|
||
func UploadBufferDisk(conn *storagegateway.StorageGateway, gatewayARN string, diskID string) (*string, error) { | ||
input := &storagegateway.DescribeUploadBufferInput{ | ||
GatewayARN: aws.String(gatewayARN), | ||
} | ||
|
||
var result *string | ||
|
||
output, err := conn.DescribeUploadBuffer(input) | ||
|
||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
if output == nil { | ||
return nil, nil | ||
} | ||
|
||
for _, diskId := range output.DiskIds { | ||
if aws.StringValue(diskId) == diskID { | ||
result = diskId | ||
break | ||
} | ||
} | ||
|
||
return result, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters