hashicorp / terraform-provider-ignition

Terraform Ignition provider
https://www.terraform.io/docs/providers/ignition/
Mozilla Public License 2.0
39 stars 64 forks source link

How do I stick with the previous version of ignition? #25

Closed bencoughlan closed 6 years ago

bencoughlan commented 7 years ago

Hi there,

I was using a clever bit of software to attach a second network interface.

Pre terraform 1.07, my "user_data" config looked like :

{
    "ignition": {
      "version": "2.0.0",
      "config": {}
    },
    "storage": {
      "files": [
        {
          "filesystem": "root",
          "path": "/opt/bin/smilodon",
          "contents": {
            "source": "https://github.com/UKHomeOffice/smilodon/releases/download/v0.0.4/smilodon-0.0.4-linux-amd64",
            "verification": {
              "hash": "sha512-5c802367af2d6f59d2fdf96e3d81b0fcde4eb77410b2a47b8831fd7adb52351af69d221cd594b63aa926050ddac102c5b0168b103d62143799078bc1b364c2f4"
            }
          },
          "mode": 777,
          "user": {},
          "group": {}
        },

However, now it looks like :

{
    "ignition": {
      "config": {},
      "timeouts": {},
      "version": "2.1.0"
    },
    "networkd": {
      "units": [
        {
          "contents": "[Match]\nName=eth1\n[Network]\nDHCP=yes\n[DHCP]\nUseDNS=false\nUseMTU=true\nSendHostname=true\nUseRoutes=true\nRouteMetric=512\n",
          "name": "20-eth1.network"
        }
      ]
    },
    "passwd": {},
    "storage": {
      "files": [
        {
          "filesystem": "root",
          "group": {},
          "path": "/opt/bin/smilodon",
          "user": {},
          "contents": {
            "source": "https://github.com/UKHomeOffice/smilodon/releases/download/v0.0.4/smilodon-0.0.4-linux-amd64",
            "verification": {
              "hash": "sha512-5c802367af2d6f59d2fdf96e3d81b0fcde4eb77410b2a47b8831fd7adb52351af69d221cd594b63aa926050ddac102c5b0168b103d62143799078bc1b364c2f4"
            }
          },
          "mode": 777
        },

This basically causes the instance to fail to attach the second interface in time, which means the whole cluster fails to come up.

Is there a way to order them? So that ignition happens first?

Is there also a way to revert to version 2.0.0?

Cheers,. Ben

mcuadros commented 6 years ago

You need to use a old version of this provider: https://github.com/terraform-providers/terraform-provider-ignition/releases/tag/v0.2.0