diff --git a/builtin/providers/aws/resource_aws_lambda_function_test.go b/builtin/providers/aws/resource_aws_lambda_function_test.go index 1530ec34afe0..5d87326f91db 100644 --- a/builtin/providers/aws/resource_aws_lambda_function_test.go +++ b/builtin/providers/aws/resource_aws_lambda_function_test.go @@ -151,17 +151,11 @@ func TestAccAWSLambdaFunction_s3Update(t *testing.T) { ), }, resource.TestStep{ - ExpectNonEmptyPlan: true, PreConfig: func() { // Upload 2nd version testAccCreateZipFromFiles(map[string]string{"test-fixtures/lambda_func_modified.js": "lambda.js"}, zipFile) }, Config: genAWSLambdaFunctionConfig_s3(bucketName, key, path), - }, - // Extra step because of missing ComputedWhen - // See https://github.com/hashicorp/terraform/pull/4846 & https://github.com/hashicorp/terraform/pull/5330 - resource.TestStep{ - Config: genAWSLambdaFunctionConfig_s3(bucketName, key, path), Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaFunctionExists("aws_lambda_function.lambda_function_s3", "tf_acc_lambda_name_s3", &conf), testAccCheckAwsLambdaFunctionName(&conf, "tf_acc_lambda_name_s3"), diff --git a/builtin/providers/aws/resource_aws_s3_bucket_object.go b/builtin/providers/aws/resource_aws_s3_bucket_object.go index c7ae47d75646..1c8975140d30 100644 --- a/builtin/providers/aws/resource_aws_s3_bucket_object.go +++ b/builtin/providers/aws/resource_aws_s3_bucket_object.go @@ -89,8 +89,9 @@ func resourceAwsS3BucketObject() *schema.Resource { }, "version_id": &schema.Schema{ - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + ComputedWhen: []string{"etag", "source", "content"}, }, }, }