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

import aws_s3_bucket_notification not creating 'bucket' field #895

Closed
vit-stepanovs opened this issue Jun 16, 2017 · 1 comment · Fixed by #978
Closed

import aws_s3_bucket_notification not creating 'bucket' field #895

vit-stepanovs opened this issue Jun 16, 2017 · 1 comment · Fixed by #978
Labels
bug Addresses a defect in current functionality.

Comments

@vit-stepanovs
Copy link

vit-stepanovs commented Jun 16, 2017

Terraform Version

Terraform v0.9.8

Affected Resource(s)

  • aws_s3_bucket_notification

Terraform Configuration Files

resource "aws_s3_bucket_notification" "my_notification" {
  bucket = "my_bucket"

  lambda_function {
    lambda_function_arn = "${aws_lambda_function.my_lambda.arn}"
    events = ["s3:ObjectCreated:*"]
  }
}

Expected Behavior

If I have an S3 bucket notification set up in AWS already, and when I run

import aws_s3_bucket_notification.my_notification my_bucket

I expect terraform to reconcile the state with my manual config and not attempt to create a new notification resource.

Actual Behavior

When I run terraform plan, I see this:

-/+ aws_s3_bucket_notification.my_notification
bucket: "" => "my_bucket" (forces new resource)

Steps to Reproduce

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

  1. terraform import aws_s3_bucket_notification.my_notification my_bucket
  2. Put the above configuration into a .tf file.
  3. terraform plan

Important Factoids

If I run terraform state show aws_s3_bucket_notification.my_notification, I see that the state contains 'id' field with the name of the bucket and no 'bucket' field.

@radeksimko radeksimko added the bug Addresses a defect in current functionality. label Jun 19, 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants