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

archive_file puts absolute path in state, causing changes for others users #8534

Closed
manojlds opened this issue Aug 29, 2016 · 4 comments
Closed

Comments

@manojlds
Copy link
Contributor

manojlds commented Aug 29, 2016

Terraform Version

0.7.2

Affected Resource(s)

  • archive_file

Terraform Configuration Files

resource "archive_file" "lambda" {
  type = "zip"
  source_content = "${data.template_file.lambda.rendered}"
  source_content_filename = "lambda.js"
  output_path = "${path.module}/lambda/lambda.zip"
}

Expected Behavior

It should handle path such that it is relative and can be used by others to plan without having changes in the path being saved as absolute path.

Actual Behavior

tfstate has absolute path as output_path, and if terraform plan is run in another machine, it shows a diff just because of the different path.

@manojlds
Copy link
Contributor Author

Should I avoid path.module and just use relative paths?

@Ninir
Copy link
Contributor

Ninir commented Aug 30, 2016

@manojlds I guess this would be better

@manojlds
Copy link
Contributor Author

Using relative path solves my problem, so closing this.

@ghost
Copy link

ghost commented Apr 22, 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 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants