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

AWS EFS file system resource error after deletion #7433

Closed
attenda-pjaquenoud opened this issue Jun 30, 2016 · 1 comment · Fixed by #7437
Closed

AWS EFS file system resource error after deletion #7433

attenda-pjaquenoud opened this issue Jun 30, 2016 · 1 comment · Fixed by #7437

Comments

@attenda-pjaquenoud
Copy link

attenda-pjaquenoud commented Jun 30, 2016

Terraform Version

Terraform v0.6.16 ( on Centos 6.7 )

Affected Resource(s)

aws_efs_file_system

Behaviour

Creating an aws_efs_file_system resource through terraform, then deleting in the AWS console, then running terraform again reports an error, whereas it should recreate the resource as per other resources.

Steps to Reproduce

  1. terraform apply
  2. Delete resource via the AWS console
  3. terraform apply
Error refreshing state: 1 error(s) occurred:

* aws_efs_file_system.file_system: FileSystemNotFound: File system 'fs-9d739e54' does not exist.
        status code: 404, request id: d505a682-3ec7-11e6-81d3-1d41202f0881

Simple Test Case

resource "aws_vpc" "vpc" {
    cidr_block = "192.168.0.0/21"
}

resource "aws_subnet" "publicAzA" {
    vpc_id = "${aws_vpc.vpc.id}"
    availability_zone = "eu-west-1a"
    cidr_block = "192.168.0.0/24"
}

resource "aws_efs_file_system" "file_system" {
  tags { Name = "TestFS" }
}

Workaround

Remove the resource by editing the .tfstate

stack72 added a commit that referenced this issue Jun 30, 2016
Fixes #7433

When an EFS File System is created via Terraform, Deleted from the AWS
console, then Terraform would give us as error as:

```
* aws_efs_file_system.file_system: FileSystemNotFound: File system
 'fs-9d739e54' does not exist.
        status code: 404, request id:
        d505a682-3ec7-11e6-81d3-1d41202f0881
```

On a 404, we now remove the EFS File System from state so that Terraform
can recreate it as expected
@stack72 stack72 self-assigned this Jun 30, 2016
stack72 added a commit that referenced this issue Jul 5, 2016
Fixes #7433

When an EFS File System is created via Terraform, Deleted from the AWS
console, then Terraform would give us as error as:

```
* aws_efs_file_system.file_system: FileSystemNotFound: File system
 'fs-9d739e54' does not exist.
        status code: 404, request id:
        d505a682-3ec7-11e6-81d3-1d41202f0881
```

On a 404, we now remove the EFS File System from state so that Terraform
can recreate it as expected
@ghost
Copy link

ghost commented Apr 24, 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 unassigned stack72 Apr 24, 2020
@ghost ghost locked and limited conversation to collaborators Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants