coreos / terraform-aws-kubernetes

Install a Kubernetes cluster the CoreOS Tectonic Way: HA, self-hosted, RBAC, etcd Operator, and more
Apache License 2.0
116 stars 67 forks source link

'terraform get' can't download modules as expected #2

Closed aholbreich closed 6 years ago

aholbreich commented 6 years ago
module "kubernetes" {
    source = "coreos/kubernetes/aws"

  tectonic_admin_email = "ab@xy.org"
  tectonic_admin_password = "xxxx"

  tectonic_aws_etcd_ec2_type = "t2.medium"
  tectonic_aws_worker_ec2_type = "t2.medium"
  tectonic_aws_master_ec2_type = "t2.medium"

  // The number of etcd nodes to be created.
  // If set to zero, the count of etcd nodes will be determined automatically.
  tectonic_etcd_count = "0"
  tectonic_master_count = "1"
  tectonic_worker_count = "2"
...
}

i see following on terraform init or terraform get:

terraform get
Get: https://api.github.com/repos/coreos/terraform-aws-kubernetes/tarball/1.7.5-tectonic.1-rc.1?archive=tar.gz
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Error loading modules: error downloading 'https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1': /usr/bin/git exited with 128: Cloning into '.terraform/modules/8fd23db79a9f2409cd095466e7a3b7a9'...
fatal: BUG: initial ref transaction called with existing refs

Version: Terraform v0.10.7

any ideas?

squat commented 6 years ago

@aholbreich I just copied your example verbatim into a main.tf in an empty directory and I was unable to reproduce the issue. Running terraform get works as expected:

Get: https://api.github.com/repos/coreos/terraform-aws-kubernetes/tarball/1.7.5-tectonic.1-rc.1?archive=tar.gz
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1
Get: git::https://github.com/coreos/tectonic-installer.git?ref=1.7.5-tectonic.1-rc.1

This could have been a network issue on your host. Can you please try running this again to help find the reproduction steps?

A couple notes:

Please let me know if you continue to have issues.

aholbreich commented 6 years ago

Thank you for fast answer. After retrying several times it seem to work now. And indeed i run in to the issue with unknown field module kubernetes: tectonic_admin_password is not a valid parameter

Are these needed at all if i use _tectonic_vanillak8s = true option?

tried pinning with: source = "git::ssh://git@github.com/coreos/terraform-aws-kubernetes.git?ref=master" terraform get worked...

squat commented 6 years ago

@aholbreich we need to streamline the vanilla_k8s option; currently all five variables (tectonic_admin_email, tectonic_admin_password_hash, tectonic_aws_ssh_key, tectonic_base_domain, and tectonic_cluster_name) are required even if many of them will end-up unused. We need to give these variables defaults so that they can empty in the case of a vanilla k8s installation. I will close this issue since the original problem was solved and track this new feature request internally. Thanks for pointing it out!