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

Invalid provider configuration on vSphere with newer terraform version #1395

Closed
stroebitzer opened this issue Jun 22, 2021 · 5 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@stroebitzer
Copy link
Member

What happened:

On terraform plan I get the following exception

Provider "registry.terraform.io/hashicorp/vsphere" requires explicit configuration. Add a provider block to the root module and configure the provider's required arguments as described in the provider documentation.

Adding the required arguments (with the variables properly set) in main.tf also did not work:

provider "vsphere" {
  user           = var.vsphere_user
  password       = var.vsphere_password
  vsphere_server = var.vsphere_server
  allow_unverified_ssl = true
}

After downgrading terraform towards 0.13.7 this error message dissapears.

What is the expected behavior:

terraform plan does not throw an error message

How to reproduce the issue:

Try to run a vSphere installation with the manifests provided in the examples folder.

Anything else we need to know?

Information about the environment:
KubeOne version (kubeone version): 1.2.1
Operating system: Ubuntu 18.04.5 LTS
Provider you're deploying cluster on: vSphere
Operating system you're deploying on:

@stroebitzer stroebitzer added the kind/bug Categorizes issue or PR as related to a bug. label Jun 22, 2021
@xmudrii
Copy link
Member

xmudrii commented Jun 23, 2021

@stroebitzer Are you using manifests from the master branch or the manifests that come with the KubeOne v1.2.1 release? Currently, only manifests on the master branch are compatible with Terraform v1.0.0. You can check #1376 as a reference for what you need to do if you use older manifests.

@xmudrii xmudrii added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Jun 23, 2021
@stroebitzer
Copy link
Member Author

I was taking mangifests from the master branch and adjusted them. But I remember having this issue already ~ 1 year ago on some vSphere installation.

@xmudrii
Copy link
Member

xmudrii commented Jun 23, 2021

@stroebitzer Have you tried to run terraform init -upgrade or to remove .terraform directory and run terraform init again?

@stroebitzer
Copy link
Member Author

I removed the .terraform directory before running terraform init again.

@kron4eg
Copy link
Member

kron4eg commented Sep 17, 2021

Now since we moved to require terraform 1.0, this is not valid anymore.

@kron4eg kron4eg closed this as completed Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

3 participants