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

local-exec provisioner for S3 bucket causes panic when used in a module #9790

Closed
2rs2ts opened this issue Nov 1, 2016 · 2 comments
Closed

Comments

@2rs2ts
Copy link
Contributor

2rs2ts commented Nov 1, 2016

When I have a module that creates an aws_s3_bucket and uses a local-exec provisioner I get a panic after the provisioning script runs.

Terraform Version

Terraform v0.7.8

Affected Resource(s)

  • aws_s3_bucket
  • module

Terraform Configuration Files

main.tf:

provider "aws" {
  region = "us-east-1"
}
module "mymodule" {
  source = "./module"
}

module/main.tf:

resource "aws_s3_bucket" "my_test_bucket" {
  bucket = "andrews-test-bucket"
  acl = "private"
  provisioner "local-exec" {
    command = "/bin/true"
  }
}

Debug Output

https://gist.github.com/2rs2ts/ad35dd3e727e99139d7156bbd98140c8

Panic Output

https://gist.github.com/2rs2ts/d08d20771dd38686e4c95fbe0e15b2c8

Expected Behavior

No panic should have occurred.

Actual Behavior

Terraform panicked after completing the provisioning. It created the bucket and ran the command just fine, but panicked afterward.

Steps to Reproduce

  1. terraform plan
  2. terraform apply

Important Factoids

This does not happen if the aws_s3_bucket is not created by a module, i.e. move the contents of module/main.tf into main.tf and remove the module declaration.

Also, this worked in 0.7.7. This is a regression.

@mitchellh
Copy link
Contributor

Ah, this is fixed in 0.7.9

@ghost
Copy link

ghost commented Apr 20, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants