Skip to content

[Bug]: set swap_size = 0 does not disable create swapdisk #2348

Description

@linuxmail

Terraform Version

OpenTofu v1.11.7 on Debian

Linode Provider Version

version = 3.12.0

Effected Terraform Resources

Hello,

I want to disable Linodes without Swap disk and set swap_size to 0

but it seems, I still get a Swap disk with default 512MB

Is there a different way, to avoid Swap disk?

Terraform Config Files

resource "linode_instance" "this" {
  for_each = var.nodes
...

  swap_size = 0
...
}

Debug Output

  # module.talos.linode_instance.this["work-00"] will be updated in-place
  ~ resource "linode_instance" "this" {
      ~ booted               = false -> true
        id                   = "97543311"
      ~ swap_size            = 512 -> 0
        tags                 = [
            "k8s",
            "worker",
        ]
        # (25 unchanged attributes hidden)

        # (6 unchanged blocks hidden)
    }

Panic Output

No response

Expected Behavior

No swap disk will be created.

Actual Behavior

A Swap disk gets created.

Steps to Reproduce

tofu plan / apply

Metadata

Metadata

Assignees

Labels

bugissues that report a bug

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions