0.12.21
Please list the resources as a list, for example:
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
provider "kubernetes" {
version = "~> 1.11.1"
host = aws_eks_cluster.cluster.endpoint
cluster_ca_certificate = base64decode(aws_eks_cluster.cluster.certificate_authority[0].data)
token = data.aws_eks_cluster_auth.cluster_auth.token
load_config_file = false
}
resource "kubernetes_priority_class" "high_priority_class" {
metadata {
name = "high-priority"
}
value = 10000000
global_default = false
}
2020-03-04T09:24:53.784Z [DEBUG] plugin: plugin exited
Error: invalid resource name "/high-priority": [may not contain '/']
The same configuration worked with kubernetes provider version 1.11.1
Error is shown
Please list the steps required to reproduce the issue, for example:
terraform applyI simply wanted to upgrade kubernetes provider to latest version. (from version 1.10.0 to 1.11.1)
i just recognize that the kubernetes provider on version 1.10.0 sets the id of the resources as the name with a / prefix (see last lines of terminal output).
Terraform will perform the following actions:
# kubernetes_priority_class.high_priority will be created
+ resource "kubernetes_priority_class" "high_priority" {
+ global_default = false
+ id = (known after apply)
+ value = 200
+ metadata {
+ generation = (known after apply)
+ name = "high-priority"
+ resource_version = (known after apply)
+ self_link = (known after apply)
+ uid = (known after apply)
}
}
# kubernetes_priority_class.low_priority will be created
+ resource "kubernetes_priority_class" "low_priority" {
+ global_default = false
+ id = (known after apply)
+ value = 100
+ metadata {
+ generation = (known after apply)
+ name = "low-priority"
+ resource_version = (known after apply)
+ self_link = (known after apply)
+ uid = (known after apply)
}
}
# kubernetes_priority_class.mid_priority will be created
+ resource "kubernetes_priority_class" "mid_priority" {
+ global_default = false
+ id = (known after apply)
+ value = 150
+ metadata {
+ generation = (known after apply)
+ name = "mid-priority"
+ resource_version = (known after apply)
+ self_link = (known after apply)
+ uid = (known after apply)
}
}
Plan: 3 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
kubernetes_priority_class.low_priority: Creating...
kubernetes_priority_class.mid_priority: Creating...
kubernetes_priority_class.high_priority: Creating...
kubernetes_priority_class.high_priority: Creation complete after 1s [id=/high-priority]
kubernetes_priority_class.mid_priority: Creation complete after 1s [id=/mid-priority]
kubernetes_priority_class.low_priority: Creation complete after 2s [id=/low-priority]
The only fix I came up with was to destroy priority classes with provider version 1.10.0 and then recreated them after upgrading to 1.11.1. It is a breaking change... in the provider
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
The only fix I came up with was to destroy priority classes with provider version
1.10.0and then recreated them after upgrading to1.11.1. It is a breaking change... in the provider