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

feat: add custom arguments #9

Merged
merged 1 commit into from
Nov 27, 2019
Merged

feat: add custom arguments #9

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 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

@github-actions
Copy link
Contributor

terraform validate Failed


Error: Unsupported argument

  on main.tf line 15, in module "k3s":
  15:   custom_server_args = [

An argument named "custom_server_args" is not expected here.


Error: Unsupported argument

  on main.tf line 18, in module "k3s":
  18:   custom_agent_args = [

An argument named "custom_agent_args" is not expected here.

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

@github-actions
Copy link
Contributor

terraform init Failed

Initializing modules...
Downloading .. for k3s...

Error: Module not found

The module address ".." could not be resolved.

If you intended this as a path relative to the current module, use "./.."
instead. The "./" prefix indicates that the address is a relative filesystem
path.


Error: Module not found

The module address ".." could not be resolved.

If you intended this as a path relative to the current module, use "./.."
instead. The "./" prefix indicates that the address is a relative filesystem
path.

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

@github-actions
Copy link
Contributor

terraform validate Failed


Error: Unsupported argument

  on main.tf line 10, in module "k3s":
  10:   k3s_version          = "latest"

An argument named "k3s_version" is not expected here.


Error: Unsupported argument

  on main.tf line 11, in module "k3s":
  11:   cluster_cidr         = "10.0.0.0/16"

An argument named "cluster_cidr" is not expected here.


Error: Unsupported argument

  on main.tf line 12, in module "k3s":
  12:   cluster_service_cidr = "10.1.0.0/16"

An argument named "cluster_service_cidr" is not expected here.


Error: Unsupported argument

  on main.tf line 13, in module "k3s":
  13:   drain_timeout        = "30s"

An argument named "drain_timeout" is not expected here.


Error: Unsupported argument

  on main.tf line 15, in module "k3s":
  15:   custom_server_args = [

An argument named "custom_server_args" is not expected here.


Error: Unsupported argument

  on main.tf line 18, in module "k3s":
  18:   custom_agent_args = [

An argument named "custom_agent_args" is not expected here.


Error: Unsupported argument

  on main.tf line 23, in module "k3s":
  23:   master_node = {

An argument named "master_node" is not expected here.


Error: Unsupported argument

  on main.tf line 30, in module "k3s":
  30:   minion_nodes = {

An argument named "minion_nodes" is not expected here.

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

@github-actions
Copy link
Contributor

terraform validate Failed


Error: Reference to undeclared input variable

  on ../../master.tf line 127, in resource "null_resource" "k3s_master_installer":
 127:       "curl -sfL https://get.k3s.io | ${local.master_install_envs} sh -s - ${local.master_install_args} ${var.agent_args} ${var.server_args}",

An input variable with the name "agent_args" has not been declared. This
variable can be declared with a variable "agent_args" {} block.


Error: Reference to undeclared input variable

  on ../../master.tf line 127, in resource "null_resource" "k3s_master_installer":
 127:       "curl -sfL https://get.k3s.io | ${local.master_install_envs} sh -s - ${local.master_install_args} ${var.agent_args} ${var.server_args}",

An input variable with the name "server_args" has not been declared. This
variable can be declared with a variable "server_args" {} block.

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 aff0242 into master Nov 27, 2019
@xunleii xunleii deleted the feat-add-custom-args branch November 27, 2019 21:15
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