MalformedXML Error when deleting versioned S3 bucket with force_destroy

438 views
Skip to first unread message

Avi Flax

unread,
Nov 16, 2015, 12:16:25 PM11/16/15
to terrafo...@googlegroups.com
I’m trying to destroy a versioned S3 bucket created by Terraform, but
I’m having trouble:

2015/11/16 12:10:00 [DEBUG] apply: aws_s3_bucket.REDACTED_site: executing Apply
aws_s3_bucket.REDACTED_site: Destroying...
2015/11/16 12:10:00 [DEBUG] terraform-provider-aws: 2015/11/16
12:10:00 [DEBUG] S3 Delete Bucket:
peggedsoftware.REDACTED.site.staging
2015/11/16 12:10:01 [DEBUG] terraform-provider-aws: 2015/11/16
12:10:01 [DEBUG] S3 Bucket attempting to forceDestroy BucketNotEmpty:
The bucket you tried to delete is not empty. You must delete all
versions in the bucket.
2015/11/16 12:10:01 [DEBUG] terraform-provider-aws: status code: 409,
request id:
2015/11/16 12:10:02 [DEBUG] root: eval: *terraform.EvalWriteState
2015/11/16 12:10:02 [DEBUG] root: eval: *terraform.EvalApplyPost
2015/11/16 12:10:02 [ERROR] root: eval: *terraform.EvalApplyPost, err:
1 error(s) occurred:

* aws_s3_bucket.REDACTED_site: Error S3 Bucket force_destroy error
deleting: MalformedXML: The XML you provided was not well-formed or
did not validate against our published schema
status code: 400, request id:
2015/11/16 12:10:02 [ERROR] root: eval: *terraform.EvalSequence, err:
1 error(s) occurred:

* aws_s3_bucket.REDACTED_site: Error S3 Bucket force_destroy error
deleting: MalformedXML: The XML you provided was not well-formed or
did not validate against our published schema
status code: 400, request id:
2015/11/16 12:10:02 [ERROR] root: eval: *terraform.EvalOpFilter, err:
1 error(s) occurred:

* aws_s3_bucket.REDACTED_site: Error S3 Bucket force_destroy error
deleting: MalformedXML: The XML you provided was not well-formed or
did not validate against our published schema
status code: 400, request id:
2015/11/16 12:10:02 [DEBUG] vertex
template_file.REDACTED_site_bucket_policy (destroy), got dep:
aws_s3_bucket.REDACTED_site (destroy)
2015/11/16 12:10:02 [DEBUG] vertex
template_file.REDACTED_site_bucket_policy, got dep:
template_file.REDACTED_site_bucket_policy (destroy)
2015/11/16 12:10:02 [DEBUG] vertex
template_file.REDACTED_site_bucket_policy, got dep:
var.teleport_site_bucket_name_prefix
2015/11/16 12:10:02 [DEBUG] vertex
template_file.REDACTED_site_bucket_policy, got dep: var.environment
2015/11/16 12:10:02 [DEBUG] vertex aws_s3_bucket.REDACTED_site, got
dep: template_file.REDACTED_site_bucket_policy
2015/11/16 12:10:02 [DEBUG] vertex provider.aws (close), got dep:
aws_s3_bucket.REDACTED_site
2015/11/16 12:10:02 [DEBUG] vertex provider.template (close), got dep:
template_file.REDACTED_site_bucket_policy
2015/11/16 12:10:02 [DEBUG] vertex root, got dep: provider.template (close)
2015/11/16 12:10:02 [DEBUG] vertex root, got dep: provider.aws (close)
2015/11/16 12:10:02 [DEBUG] vertex root, got dep: provisioner.remote-exec
2015/11/16 12:10:02 [DEBUG] vertex root, got dep: provisioner.local-exec
2015/11/16 12:10:02 [DEBUG] vertex root, got dep: provisioner.chef
Error applying plan:

1 error(s) occurred:

* aws_s3_bucket.REDACTED_site: Error S3 Bucket force_destroy error
deleting: MalformedXML: The XML you provided was not well-formed or
did not validate against our published schema
status code: 400, request id:

I did observe that all the objects in the bucket have been
successfully deleted, but the bucket itself is not deleted. If I run
this multiple times I get the same result.

Anyone have any tips on how to troubleshoot this? I tried setting
TF_LOG to TRACE but I don’t end up seeing the requests to AWS so I
can’t see what XML Terraform is trying to send.

Thanks!
Avi

Clint Shryock

unread,
Nov 16, 2015, 3:35:47 PM11/16/15
to terrafo...@googlegroups.com
Hey Avi – if this is reproducible, do you have a minimal configuration (minus any secret info) that reproduces it? If so, it's probably best to open an issue on GitHub for it:


You can add "@catsby" and I should get a notification and I'll take a look. 

Thanks!
Clint

Avi

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CANExkS-jRtVgZU75N7SKX87ODWBOjFO8zVW3azpg6tmJErrPGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Clint

Avi Flax

unread,
Nov 16, 2015, 3:36:47 PM11/16/15
to terrafo...@googlegroups.com
On Mon, Nov 16, 2015 at 3:35 PM, Clint Shryock <cl...@hashicorp.com> wrote:
> Hey Avi – if this is reproducible, do you have a minimal configuration
> (minus any secret info) that reproduces it? If so, it's probably best to
> open an issue on GitHub for it:
>
> - https://github.com/hashicorp/terraform/issues/new
>
> You can add "@catsby" and I should get a notification and I'll take a look.

OK, will do, thanks!
Reply all
Reply to author
Forward
0 new messages