I have the following HCL:
provider "kubernetes-alpha" {
config_path = "~/.kube/config"
}
resource "kubernetes_manifest" "arc" {
provider = kubernetes-alpha
manifest = {
"apiVersion" = "arcdata.microsoft.com/v1alpha1"
"kind" = "datacontroller"
"metadata" = {
"generation" = 1
"name" = "arc"
"namespace" = "arc"
}
"spec" = {
"credentials" = {
"controllerAdmin" = "controller-login-secret"
"serviceAccount" = "sa-mssql-controller"
}
"docker" = {
"imagePullPolicy" = "Always"
"imageTag" = "public-preview-dec-2020"
"registry" = "mcr.microsoft.com"
"repository" = "arcdata"
}
"security" = {
"allowDumps" = true
"allowNodeMetricsCollection" = true
"allowPodMetricsCollection" = true
"allowRunAsRoot" = false
}
"services" = [
{
"name" = "controller"
"port" = 30080
"serviceType" = "LoadBalancer"
},
{
"name" = "serviceProxy"
"port" = 30777
"serviceType" = "LoadBalancer"
},
]
"settings" = {
"ElasticSearch" = {
"vm.max_map_count" = "-1"
}
"azure" = {
"connectionMode" = "Indirect"
"location" = "eastus"
"resourceGroup" = "myresourcegroup"
"subscription" = "c82c901a-129a-435d-86e4-cc6b294590ae"
}
"controller" = {
"displayName" = "arc"
"enableBilling" = "True"
"logs.rotation.days" = "7"
"logs.rotation.size" = "5000"
}
}
"storage" = {
"data" = {
"accessMode" = "ReadWriteOnce"
"className" = "default"
"size" = "15Gi"
}
"logs" = {
"accessMode" = "ReadWriteOnce"
"className" = "default"
"size" = "10Gi"
}
}
}
}
}
when I run terraform plan on this I get:
Warning: This custom resource does not have an associated OpenAPI schema.
│
│ with kubernetes_manifest.arc,
│ on main.tf line 52, in resource "kubernetes_manifest" "arc":
│ 52: resource "kubernetes_manifest" "arc" {
│
│ We could not find an OpenAPI schema for this custom resource. Updates to this resource will cause a forced replacement.
╵
╷
│ Error: Dry-run failed for non-structured resource
│
│ with kubernetes_manifest.arc,
│ on main.tf line 52, in resource "kubernetes_manifest" "arc":
│ 52: resource "kubernetes_manifest" "arc" {
│
│ A dry-run apply was performed for this resource but was unsuccessful: Apply failed with 7 conflicts: conflicts with "FxVersion" using arcdata.microsoft.com/v1alpha1:
│ - .spec.services
│ conflicts with "OpenAPI-Generator" using arcdata.microsoft.com/v1alpha1:
│ - .spec.docker.imageTag
│ - .spec.settings.azure.subscription
│ - .spec.settings.azure.subscription
│ - .spec.settings.azure.subscription
│ - .spec.storage.data.className
│ - .spec.storage.logs.className
Qestions:
- where does the OpenAPI schema in this instance come from, is this something that Microsoft needs to provide, is this the root of my problem
- is there any way I can work around this ?, I have a horrible suspicion that the answer is no