hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.76k stars 9.11k forks source link

aws_datasync_task: options verify_mode #11191

Closed ghost closed 4 years ago

ghost commented 4 years ago

This issue was originally opened by @FabioIngrao as hashicorp/terraform#23599. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.12.16

Terraform Configuration Files

resource "aws_datasync_task" "sync_header_10_10_100_164" {
  # removed for privacy

  options {
    atime                  = "BEST_EFFORT"
    bytes_per_second       = -1
    gid                    = "INT_VALUE"
    mtime                  = "PRESERVE"
    posix_permissions      = "PRESERVE"
    preserve_deleted_files = "PRESERVE"
    preserve_devices       = "NONE"
    uid                    = "INT_VALUE"
    verify_mode            = "ONLY_FILES_TRANSFERRED"
  }
}

Debug Output

019/12/06 14:22:50 [TRACE] <root>: eval: *terraform.EvalValidateResource
2019/12/06 14:22:50 [TRACE] GRPCProvider: ValidateResourceTypeConfig
2019/12/06 14:22:50 [WARN] <root>: eval: *terraform.EvalValidateResource, non-fatal err: expected options.0.verify_mode to be one of [NONE POINT_IN_TIME_CONSISTENT], got ONLY_FILES_TRANSFERRED
2019/12/06 14:22:50 [ERROR] <root>: eval: *terraform.EvalSequence, err: expected options.0.verify_mode to be one of [NONE POINT_IN_TIME_CONSISTENT], got ONLY_FILES_TRANSFERRED
2019/12/06 14:22:50 [TRACE] [walkValidate] Exiting eval tree: aws_datasync_task.sync_header_10_10_100_164
2019/12/06 14:22:50 [TRACE] vertex "aws_datasync_task.sync_header_10_10_100_164": visit complete
2019/12/06 14:22:50 [TRACE] dag/walk: upstream of "provider.aws (close)" errored, so skipping
2019/12/06 14:22:50 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping
2019/12/06 14:22:50 [TRACE] dag/walk: upstream of "root" errored, so skipping

Error: expected options.0.verify_mode to be one of [NONE POINT_IN_TIME_CONSISTENT], got ONLY_FILES_TRANSFERRED

  on instance.tf line 1, in resource "aws_datasync_task" "sync_header_10_10_100_164":
   1: resource "aws_datasync_task" "sync_header_10_10_100_164" {

Crash Output

Expected Behavior

The Value ONLY_FILES_TRANSFERRED is correct (obtained doing a terraform import!). Terraform plan should indicate that there is nothing todo.

Actual Behavior

arsm026:data-sync fabio$ terraform plan

Error: expected options.0.verify_mode to be one of [NONE POINT_IN_TIME_CONSISTENT], got ONLY_FILES_TRANSFERRED

  on instance.tf line 1, in resource "aws_datasync_task" "sync_header_10_10_100_164":
   1: resource "aws_datasync_task" "sync_header_10_10_100_164" {

Steps to Reproduce

  1. import a aws_datasync_task where the verification is set to "Verify only the data transferred".
  2. copy the relevant parameters to the resource. (destination_location_arn, source_location_arn, name and options)
  3. terraform plan

Additional Context

References

FabioIngrao commented 4 years ago

Any update on this?

bflad commented 4 years ago

Support for this functionality has been merged and will release with version 2.62.0 of the Terraform AWS Provider, likely later today. Thanks to @jbarnes7952 for the implementation. 👍

ghost commented 4 years ago

This has been released in version 2.62.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 commented 4 years ago

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!