Skip to content

Replacing a resource which is attached to a powered-on server causes server to be off and on multiple times #181

@nvthongswansea

Description

@nvthongswansea

Replace a resource that is attached to a server causes the server to be turned off and turned on twice. This behavior takes longer time than just shut down and turn on the server only one time.

  • Reproduce the issue:
  1. Do terraform apply:
resource "gridscale_ipv4" "foo" {
  name   = "ip-test"
}
resource "gridscale_server" "foo" {
  name   = "test"
  cores = 2
  memory = 2
  power = true
  ipv4 = gridscale_ipv4.foo.id
}
  1. Replace ipv4 resource foo with foo1, do terraform apply:
resource "gridscale_ipv4" "foo1" {
  name   = "ip-test"
}
resource "gridscale_server" "foo" {
  name   = "test"
  cores = 2
  memory = 2
  power = true
  ipv4 = gridscale_ipv4.foo1.id
}
  • Expected behavior: the server foo will be turned off to remove the attached IPv4 foo and to attach a new IPv4 foo1. Then, it is turned on afterward.

  • Current behavior: the server foo will be turned off to remove the attached IPv4 foo. Then, it gets turned on and off again. IPv4 is attached to the server and the server is turned on.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions