github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/ignition/index.html.markdown (about)

     1  ---
     2  layout: "ignition"
     3  page_title: "Provider: Ignition"
     4  sidebar_current: "docs-ignition-index"
     5  description: |-
     6    The Ignition provider is used to generate Ignition configuration files used by CoreOS Linux.
     7  ---
     8  
     9  # Ignition Provider
    10  
    11  The Ignition provider is used to generate [Ignition](https://coreos.com/ignition/docs/latest/) configuration files. _Ignition_ is the provisioning utility used by [CoreOS](https://coreos.com/) Linux.
    12  
    13  The ignition provider is what we call a _logical provider_ and doesn't manage any _physical_ resources. It generates configurations files to be used by other resources.
    14  
    15  Use the navigation to the left to read about the available resources.
    16  
    17  ## Example Usage
    18  
    19  This config will write a single service unit (shown below) with the contents of an example service. This unit will be enabled as a dependency of multi-user.target and therefore start on boot
    20  
    21  ```hcl
    22  # Systemd unit data resource containing the unit definition
    23  data "ignition_systemd_unit" "example" {
    24    name = "example.service"
    25    content = "[Service]\nType=oneshot\nExecStart=/usr/bin/echo Hello World\n\n[Install]\nWantedBy=multi-user.target"
    26  }
    27  
    28  # Ingnition config include the previous defined systemd unit data resource
    29  data "ignition_config" "example" {
    30    systemd = [
    31      "${data.ignition_systemd_unit.example.id}",
    32    ]
    33  }
    34  
    35  # Create a CoreOS server using the Igntion config.
    36  resource "aws_instance" "web" {
    37    # ...
    38  
    39    user_data = "${data.ignition_config.example.rendered}"
    40  }
    41  ```