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

Panic in terraform-provide-aws-v0.1.3_x4 using 0.10.0 for S3 when lifecycle_rule present. #1361

Closed
prigorctac opened this issue Aug 7, 2017 · 3 comments
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic.

Comments

@prigorctac
Copy link

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

0.10.0

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_s3_bucket

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "aws_s3_bucket" "my_xyz_bucket" {
  bucket = "my_xyz_bucket"
  acl    = "private"

  lifecycle_rule {
    id      = "elb-log-east-30-ia-5yr-del"
    prefix  = "/"
    enabled = true

    transition {
      days          = 30
      storage_class = "STANDARD_IA"
    }

    expiration {
      days                         = 1825
      expired_object_delete_marker = 0
    }
  }

  policy = <<POLICY
{
  "Version": "2012-10-17",
  "Id": "AWSConsole-AccessLogs-Policy-1435178610361",
  "Statement": [
    {
      "Sid": "AWSConsoleStmt-1435178610361",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::127311923021:root"
      },
      "Action": "s3:PutObject",
      "Resource": "arn:aws:s3:::my_xyz_bucket/*"
    }
  ]
}
POLICY
}

Debug Output

Panic Output

https://gist.github.com/prigorctac/329d2c845985435bc1194952fc430e74

Expected Behavior

Output plan

Actual Behavior

Terraform Plan crashed

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform plan or terraform plan --target <s3 bucket resource with lifecycle_rule>

Important Factoids

Terraform with remote S3 state file, S3 buckets with lifecycle_rule. We also use multiple remote state file data sources, but they are not used in the s3 bucket resources that crash.

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

  • did not find anything related.
@Preston4tw
Copy link
Contributor

Preston4tw commented Aug 7, 2017

I'm pretty sure merged commit #1316 for issue #1314 fixes your issue, it's just pending release. If you're comfortable with golang, you can test the fix and try building the plugin from head, see https://github.com/terraform-providers/terraform-provider-aws#developing-the-provider.

@prigorctac
Copy link
Author

Thank you. It would appear that it does and this is a duplicate. I will close this one in favor or #1314

@radeksimko radeksimko added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels Aug 8, 2017
@ghost
Copy link

ghost commented Apr 11, 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 Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic.
Projects
None yet
Development

No branches or pull requests

3 participants