Skip to content

Commit

Permalink
Update node ignore_changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
powellchristoph authored and remche committed Nov 9, 2023
1 parent e16e01e commit d4dc360
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,13 @@ provider "kubernetes" {
}
```

### Availability Zones
Changes to a module's `availability_zones` will intentionally *not* cause the recreation of instances. You must manually `taint` the `module.controlplane.module.server.openstack_compute_instance_v2.instance` for force the recreation of the resource.
### Node `lifecycle` Assumptions
> :note: Changes to certain module arguments will intentionally *not* cause the recreation of instances.
To provide users a better and more manageable experience, [several arguments](./modules/node/main.tf#L72) have been included in the instance's `ignore_changes` [lifecycle](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#ignore_changes). You must manually `taint` the instance for force the recreation of the resource.

For example:
`terraform taint 'module.controlplane.module.server.openstack_compute_instance_v2.instance'`

### Proxy

Expand Down
7 changes: 5 additions & 2 deletions modules/node/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ resource "openstack_compute_instance_v2" "instance" {

lifecycle {
ignore_changes = [
user_data,
availability_zone_hints
availability_zone_hints,
flavor_name,
image_id,
image_name,
user_data
]
}
}
Expand Down

0 comments on commit d4dc360

Please sign in to comment.