Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refact: clean custom flags feature #11

Merged
merged 1 commit into from
Nov 27, 2019
Merged

refact: clean custom flags feature #11

merged 1 commit into from
Nov 27, 2019

Conversation

xunleii
Copy link
Owner

@xunleii xunleii commented Nov 27, 2019

No description provided.

@github-actions
Copy link
Contributor

terraform validate Failed


Error: Invalid value for module argument

  on main.tf line 15, in module "k3s":
  15:   additional_flags = {
  16:     minion = [
  17:       "--node-label node-role.kubernetes.io/minion='true'",
  18:     ]
  19:     common = [
  20:       "--no-flannel"
  21:     ]
  22:   }

The given value is not suitable for child module variable "additional_flags"
defined at ../../variables.tf:31,1-28: attribute "master" is required.

Workflow: Terraform GitHub Actions, Action: hashicorpterraform-github-actions3, Working Directory: examples/hcloud-k3s

@github-actions
Copy link
Contributor

terraform validate Failed


Error: Unsupported attribute

  on ../../minions.tf line 3, in locals:
   3:     var.additional_flags.monion,

This object does not have an attribute named "monion".

Workflow: Terraform GitHub Actions, Action: hashicorpterraform-github-actions3, Working Directory: examples/hcloud-k3s

@github-actions
Copy link
Contributor

terraform plan Success

Show Output

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # hcloud_network.k3s will be created
  + resource "hcloud_network" "k3s" {
      + id       = (known after apply)
      + ip_range = "10.0.0.0/8"
      + name     = "k3s-network"
    }

  # hcloud_network_subnet.k3s_internal will be created
  + resource "hcloud_network_subnet" "k3s_internal" {
      + gateway      = (known after apply)
      + id           = (known after apply)
      + ip_range     = "10.0.0.0/15"
      + network_id   = (known after apply)
      + network_zone = "eu-central"
      + type         = "server"
    }

  # hcloud_network_subnet.k3s_nodes will be created
  + resource "hcloud_network_subnet" "k3s_nodes" {
      + gateway      = (known after apply)
      + id           = (known after apply)
      + ip_range     = "10.254.1.0/24"
      + network_id   = (known after apply)
      + network_zone = "eu-central"
      + type         = "server"
    }

  # hcloud_server.master will be created
  + resource "hcloud_server" "master" {
      + backup_window = (known after apply)
      + backups       = false
      + datacenter    = (known after apply)
      + id            = (known after apply)
      + image         = "ubuntu-18.04"
      + ipv4_address  = (known after apply)
      + ipv6_address  = (known after apply)
      + ipv6_network  = (known after apply)
      + keep_disk     = false
      + labels        = {
          + "engine"      = "k3s"
          + "node_type"   = "master"
          + "provisioner" = "terraform"
        }
      + location      = (known after apply)
      + name          = "k3s-master"
      + server_type   = "cx11-ceph"
      + ssh_keys      = (known after apply)
      + status        = (known after apply)
    }

  # hcloud_server.minions[0] will be created
  + resource "hcloud_server" "minions" {
      + backup_window = (known after apply)
      + backups       = false
      + datacenter    = (known after apply)
      + id            = (known after apply)
      + image         = "ubuntu-18.04"
      + ipv4_address  = (known after apply)
      + ipv6_address  = (known after apply)
      + ipv6_network  = (known after apply)
      + keep_disk     = false
      + labels        = {
          + "engine"      = "k3s"
          + "node_type"   = "minion"
          + "provisioner" = "terraform"
        }
      + location      = (known after apply)
      + name          = "k3s-minion-0"
      + server_type   = "cx11-ceph"
      + ssh_keys      = (known after apply)
      + status        = (known after apply)
    }

  # hcloud_server.minions[1] will be created
  + resource "hcloud_server" "minions" {
      + backup_window = (known after apply)
      + backups       = false
      + datacenter    = (known after apply)
      + id            = (known after apply)
      + image         = "ubuntu-18.04"
      + ipv4_address  = (known after apply)
      + ipv6_address  = (known after apply)
      + ipv6_network  = (known after apply)
      + keep_disk     = false
      + labels        = {
          + "engine"      = "k3s"
          + "node_type"   = "minion"
          + "provisioner" = "terraform"
        }
      + location      = (known after apply)
      + name          = "k3s-minion-1"
      + server_type   = "cx11-ceph"
      + ssh_keys      = (known after apply)
      + status        = (known after apply)
    }

  # hcloud_server.minions[2] will be created
  + resource "hcloud_server" "minions" {
      + backup_window = (known after apply)
      + backups       = false
      + datacenter    = (known after apply)
      + id            = (known after apply)
      + image         = "ubuntu-18.04"
      + ipv4_address  = (known after apply)
      + ipv6_address  = (known after apply)
      + ipv6_network  = (known after apply)
      + keep_disk     = false
      + labels        = {
          + "engine"      = "k3s"
          + "node_type"   = "minion"
          + "provisioner" = "terraform"
        }
      + location      = (known after apply)
      + name          = "k3s-minion-2"
      + server_type   = "cx11-ceph"
      + ssh_keys      = (known after apply)
      + status        = (known after apply)
    }

  # hcloud_server_network.master_network will be created
  + resource "hcloud_server_network" "master_network" {
      + id          = (known after apply)
      + ip          = "10.254.1.1"
      + mac_address = (known after apply)
      + network_id  = (known after apply)
      + server_id   = (known after apply)
    }

  # hcloud_server_network.minions_network[0] will be created
  + resource "hcloud_server_network" "minions_network" {
      + id          = (known after apply)
      + ip          = "10.254.1.2"
      + mac_address = (known after apply)
      + network_id  = (known after apply)
      + server_id   = (known after apply)
    }

  # hcloud_server_network.minions_network[1] will be created
  + resource "hcloud_server_network" "minions_network" {
      + id          = (known after apply)
      + ip          = "10.254.1.3"
      + mac_address = (known after apply)
      + network_id  = (known after apply)
      + server_id   = (known after apply)
    }

  # hcloud_server_network.minions_network[2] will be created
  + resource "hcloud_server_network" "minions_network" {
      + id          = (known after apply)
      + ip          = "10.254.1.4"
      + mac_address = (known after apply)
      + network_id  = (known after apply)
      + server_id   = (known after apply)
    }

  # hcloud_ssh_key.default will be created
  + resource "hcloud_ssh_key" "default" {
      + fingerprint = (known after apply)
      + id          = (known after apply)
      + name        = "K3S terraform module - Provisionning SSH key"
    }

  # module.k3s.null_resource.k3s_master will be created
  + resource "null_resource" "k3s_master" {
      + id       = (known after apply)
      + triggers = (known after apply)
    }

  # module.k3s.null_resource.k3s_master_installer will be created
  + resource "null_resource" "k3s_master_installer" {
      + id       = (known after apply)
      + triggers = (known after apply)
    }

  # module.k3s.null_resource.k3s_minions["k3s-minion-0"] will be created
  + resource "null_resource" "k3s_minions" {
      + id       = (known after apply)
      + triggers = (known after apply)
    }

  # module.k3s.null_resource.k3s_minions["k3s-minion-1"] will be created
  + resource "null_resource" "k3s_minions" {
      + id       = (known after apply)
      + triggers = (known after apply)
    }

  # module.k3s.null_resource.k3s_minions["k3s-minion-2"] will be created
  + resource "null_resource" "k3s_minions" {
      + id       = (known after apply)
      + triggers = (known after apply)
    }

  # module.k3s.null_resource.k3s_minions_installer["k3s-minion-0"] will be created
  + resource "null_resource" "k3s_minions_installer" {
      + id       = (known after apply)
      + triggers = (known after apply)
    }

  # module.k3s.null_resource.k3s_minions_installer["k3s-minion-1"] will be created
  + resource "null_resource" "k3s_minions_installer" {
      + id       = (known after apply)
      + triggers = (known after apply)
    }

  # module.k3s.null_resource.k3s_minions_installer["k3s-minion-2"] will be created
  + resource "null_resource" "k3s_minions_installer" {
      + id       = (known after apply)
      + triggers = (known after apply)
    }

  # module.k3s.null_resource.k3s_minions_uninstaller["k3s-minion-0"] will be created
  + resource "null_resource" "k3s_minions_uninstaller" {
      + id       = (known after apply)
      + triggers = (known after apply)
    }

  # module.k3s.null_resource.k3s_minions_uninstaller["k3s-minion-1"] will be created
  + resource "null_resource" "k3s_minions_uninstaller" {
      + id       = (known after apply)
      + triggers = (known after apply)
    }

  # module.k3s.null_resource.k3s_minions_uninstaller["k3s-minion-2"] will be created
  + resource "null_resource" "k3s_minions_uninstaller" {
      + id       = (known after apply)
      + triggers = (known after apply)
    }

  # module.k3s.random_password.k3s_cluster_secret will be created
  + resource "random_password" "k3s_cluster_secret" {
      + id          = (known after apply)
      + length      = 48
      + lower       = true
      + min_lower   = 0
      + min_numeric = 0
      + min_special = 0
      + min_upper   = 0
      + number      = true
      + result      = (sensitive value)
      + special     = false
      + upper       = true
    }

Plan: 24 to add, 0 to change, 0 to destroy.

Workflow: Terraform GitHub Actions, Action: hashicorpterraform-github-actions4, Working Directory: examples/hcloud-k3s

@xunleii xunleii merged commit 14f0a2d into master Nov 27, 2019
@xunleii xunleii deleted the refact-clean-flags branch November 27, 2019 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant