terraform apply didn't work
mnothic opened this issue · 10 comments
What did you expect to happen?
make the terraform apply in terraform directory to deploy vault on gke but fails on the kubernetes privider.
What actually happened?
checkout repository add terraform.tfvars with cloud values
terraform.tfvars:
billing_account = "XXXXXX-XXXXXX-XXXXXX"
project = "vault"
org_id = 1111111111111111
region = "europe-west1"
Output
terraform version
Terraform v0.12.20
+ provider.google v3.8.0
+ provider.google-beta v3.8.0
+ provider.kubernetes v1.11.0
+ provider.random v2.2.1
+ provider.tls v2.1.1
terraform init
Initializing the backend...
Initializing provider plugins...
The following providers do not have any version constraints in configuration,
so the latest version was installed.
To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.
* provider.google-beta: version = "~> 3.8"
* provider.kubernetes: version = "~> 1.11"
* provider.random: version = "~> 2.2"
* provider.tls: version = "~> 2.1"
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
terraform apply
data.google_client_config.current: Refreshing state...
data.google_project.vault: Refreshing state...
data.google_container_engine_versions.versions: Refreshing state...
Error: Failed to initialize config: invalid configuration: no configuration has been provided
on k8s.tf line 6, in provider "kubernetes":
6: provider "kubernetes" {
This appears to be a bug in the Kubernetes provider? hashicorp/terraform-provider-kubernetes#521
I did encounter the same problem but for someone coming here again, please try to pin kubernetes
version to 1.10.0
full example:
provider "kubernetes" {
version = "1.10.0"
load_config_file = false
host = google_container_cluster.vault.endpoint
cluster_ca_certificate = base64decode(
google_container_cluster.vault.master_auth[0].cluster_ca_certificate,
)
token = data.google_client_config.current.access_token
}
Yes, please pin to an older version and also add your experience to the cross-referenced issue in the Kubernetes provider please.
Thanks guys I already did a smooth deployment!
Hi,
this was caused by a change in behavior in the terraform kubernetes provider v1.11.0 (see hashicorp/terraform-provider-kubernetes#690) and will be resolved by hashicorp/terraform-provider-kubernetes#767.
For the time being, pinning to v1.10.0 as suggested by #68 (comment) is the recommended work-around.
Hi there! This has been automatically marked as stale because it has not had activity in the past 14 days. It will be closed in 14 days if no further activity takes place.
Hi, this should be fixed by v1.11.1 of the terraform provider for kubernetes.
I had to pin to 1.9.0 cuz version 1.10.0 can't detect google_client_config neither!
tested and working with v1.11.1