Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

Changes to scripts and before_scripts not applied #32

Open
damirfilipovic opened this issue Jan 21, 2020 · 2 comments
Open

Changes to scripts and before_scripts not applied #32

damirfilipovic opened this issue Jan 21, 2020 · 2 comments

Comments

@damirfilipovic
Copy link

In the test step properties before_scripts and scripts, changes to the values are not applied when applying the plan. Unless a new resource is being created from scratch.

The workaround is to destroy the resources and reapply, but then the test history is lost.

@damirfilipovic
Copy link
Author

damirfilipovic commented Jan 21, 2020

After further investigation I've observed that this only happens when no other property has been updated in said resource (i.e. test step), so a better workaround is to introduce a nonsense variable (whatever isn't actually used in the test step) that assumes a unique name on every plan. For example:

  variables {
      name     = "${uuid()}"
      source   = "response_header"
      property = "Date"
    }

@toxic-johann
Copy link

I have met the same problems too. I want to change the name of the test, but I can't do that until I change the description together. So I do such a workaround as you have done.

resource "runscope_test" "uptime-check" {
  name        = "xxxx"
  description = "${timestamp()}"
  bucket_id   = "${local.bucket_id}"
}

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