I’m trying to import a GKE backendconfig to an existing TF kubernetes config/state. Using v 2.7.1 of the k8s provider and 1.1.3 of TF.
This is the tf config:
resource "kubernetes_manifest" "ex_backend_config" {
manifest = {
"apiVersion" = "cloud.google.com/v1"
"kind" = "BackendConfig"
"metadata" = {
"name" = "ex-backend-config"
"namespace" = "default"
}
"spec" = {
"cdn" = {
"enabled" = true
}
"connectionDraining" = {
"drainingTimeoutSec" = 60
}
"securityPolicy" = {
"name" = "main-ingress-policy"
}
"timeoutSec" = 1800
}
}
}
This is the state I’m trying to import:
Name: ex-backend-config
Namespace: default
Labels: <none>
Annotations: <none>
API Version: cloud.google.com/v1
Kind: BackendConfig
Metadata:
Creation Timestamp: 2019-08-08T08:11:16Z
Generation: 3
Resource Version: 173735365
UID: 18442df2-b9b4-11e9-9fe0-42010a9a0186
Spec:
Cdn:
Enabled: true
Connection Draining:
Draining Timeout Sec: 60
Security Policy:
Name: main-ingress-policy
Timeout Sec: 1800
Events: <none>
and here is the command I’m runnin in the CLI
terraform import module.kubernetes-config.kubernetes_manifest.ex_backend_config "apiVersion=cloud.google.com/v1,kind=BackendConfig,namespace=default,name=ex-backend-config"
Everytime I run this, though, I’m getting this error message Summary: "Failed to get namespacing requirement from RESTMapper"
Can anyone provide any guidance as to why? I’ve tried to take a look at the provider source but can’t see anything obvious.
Thank you!