Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/aws_datasync_task: Remove BEST_EFFORT value from posix_permissions argument validation and documentation #10985

Merged
merged 1 commit into from
Nov 25, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Nov 23, 2019

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Reference: https://github.com/aws/aws-sdk-go/pull/2962/files#diff-75343d273fb0174cc5d3bc82469018b5L6419
Reference: #10955
Reference: https://docs.aws.amazon.com/datasync/latest/userguide/API_Options.html#DataSync-Type-Options-PosixPermissions

Release note for CHANGELOG:

NOTES:

* resource/aws_datasync_task: The DataSync API and SDK have removed `BEST_EFFORT` as a valid value for the `options` configuration block `posix_permissions` argument. The value has been removed from the validation in this resource to match those changes.

The upstream AWS Go SDK in v1.25.39 update removes the available SDK constant. In testing the behavior against the current SDK which still has this constant and when BEST_EFFORT is provided as a value to the DataSync API, the API returns a validation error as seen by this adjusted acceptance test:

--- FAIL: TestAccAWSDataSyncTask_DefaultSyncOptions_PosixPermissions (233.01s)
    testing.go:635: Step 0 error: errors during apply:

        Error: error creating DataSync Task: ValidationException: 1 validation error detected: Value 'BEST_EFFORT' at 'options.posixPermissions' failed to satisfy constraint: Member must satisfy enum value set: [PRESERVE, NONE]
        	status code: 400, request id: 1b101b77-f03f-4be2-b018-e2edf4088536

This API behavior seems to indicate that even if existing Terraform configurations might contain this value, they are invalid now according to the API and must be updated regardless. If for some reason this old value is still valid for previously existing tasks, we can hardcode the "BEST_EFFORT" string into the validation as necessary.

…ssions argument validation and documentation

Reference: https://github.com/aws/aws-sdk-go/pull/2962/files#diff-75343d273fb0174cc5d3bc82469018b5L6419
Reference: #10955

The upstream AWS Go SDK in v1.25.39 update removes the available SDK constant. In testing the behavior against the current SDK which still has this constant and when `BEST_EFFORT` is provided as a value to the DataSync API, the API returns a validation error:

```
--- FAIL: TestAccAWSDataSyncTask_DefaultSyncOptions_PosixPermissions (233.01s)
    testing.go:635: Step 0 error: errors during apply:

        Error: error creating DataSync Task: ValidationException: 1 validation error detected: Value 'BEST_EFFORT' at 'options.posixPermissions' failed to satisfy constraint: Member must satisfy enum value set: [PRESERVE, NONE]
        	status code: 400, request id: 1b101b77-f03f-4be2-b018-e2edf4088536
```

This API behavior seems to indicate that even if existing Terraform configurations might contain this value, they are invalid now according to the API and must be updated regardless. If for some reason this old value is still valid for previously existing tasks, we can hardcode the `"BEST_EFFORT"` string into the validation if necessary.
@bflad bflad added upstream Addresses functionality related to the cloud provider. technical-debt Addresses areas of the codebase that need refactoring or redesign. labels Nov 23, 2019
@bflad bflad requested a review from a team November 23, 2019 02:53
@ghost ghost added needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/datasync Issues and PRs that pertain to the datasync service. labels Nov 23, 2019
@bflad bflad added this to the v2.40.0 milestone Nov 25, 2019
@bflad bflad requested a review from a team November 25, 2019 16:10
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Nov 25, 2019
Copy link

@koikonom koikonom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bflad bflad merged commit efeff9e into master Nov 25, 2019
@bflad bflad deleted the td-aws_datasync_task-remove-best-effort branch November 25, 2019 20:26
bflad added a commit that referenced this pull request Nov 25, 2019
@ghost
Copy link

ghost commented Nov 27, 2019

This has been released in version 2.40.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/datasync Issues and PRs that pertain to the datasync service. size/XS Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign. upstream Addresses functionality related to the cloud provider.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants