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 doesn't re-create the archive upon content change #161

Open
1 task done
parabolic opened this issue Aug 30, 2022 · 0 comments
Open
1 task done

archive_file doesn't re-create the archive upon content change #161

parabolic opened this issue Aug 30, 2022 · 0 comments
Labels

Comments

@parabolic
Copy link

Terraform CLI and Provider Versions

$ terraform version
Terraform v1.2.8
on darwin_arm64
+ provider registry.terraform.io/hashicorp/archive v2.2.0

Terraform Configuration

main.tf:

data "archive_file" "zip" {

  type        = "zip"
  output_path = "test.zip"

  source {
    content = templatefile("${path.module}/src/test.txt.tftpl", {
      # endpoint = "some_end_point"
      endpoint = "zome_end_point"
    })
    filename = "test.txt"
  }
}

./src/test.txt.tftpl:

${endpoint}

Expected Behavior

When changing the endpoint input parameter for the templatefile function, a new archive should be created since the content changed.

Actual Behavior

Terraform reported no changes:

$ terraform apply
data.archive_file.zip: Reading...
data.archive_file.zip: Read complete after 0s [id=6c897a5d6969f7679076dc66222409881d5c19d1]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Steps to Reproduce

  1. terraform apply
  2. change the value of the endpoint input parameter
  3. terraform apply

How much impact is this issue causing?

Low

Logs

https://gist.github.com/parabolic/fe54b2864a9c4bde64bcaaeeb879dd42

Additional Information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@parabolic parabolic added the bug label Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant