ignition_systemd_unit

Describes the desired state of the systemd units.

Example Usage

data "ignition_systemd_unit" "example" {
    name = "example.service"
    content = "[Service]\nType=oneshot\nExecStart=/usr/bin/echo Hello World\n\n[Install]\nWantedBy=multi-user.target"
}

Argument Reference

The following arguments are supported:

  • name - (Required) Tthe name of the unit. This must be suffixed with a valid unit type (e.g. thing.service).

  • enabled - (Optional) Whether or not the service shall be enabled. When true, the service is enabled. In order for this to have any effect, the unit must have an install section. (default true)

  • mask - (Optional) Whether or not the service shall be masked. When true, the service is masked by symlinking it to /dev/null.

  • content - (Optional) The contents of the unit.

  • dropin - (Optional) The list of drop-ins for the unit.

The dropin block supports:

  • name - (Required) The name of the drop-in. This must be suffixed with .conf.

  • content - (Optional) The contents of the drop-in.

Attributes Reference

The following attributes are exported:

  • id - ID used to reference this resource in ignition_config.

© 2018 HashiCorp
Licensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/ignition/d/systemd_unit.html