kubernetes_persistent_volume...node_affinity...match_expression + local not found in Terraform schema
anthosz opened this issue · comments
Anthony commented
Hi,
I have 2 issues when I try to convert this yaml
kind: PersistentVolume
apiVersion: v1
metadata:
name: XX
spec:
capacity:
storage: 2Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
claimRef:
namespace: XX
name: XX
storageClassName: local-fs
local:
path: /tmp
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- trololo
Error: excluding attribute [kubernetes_persistent_volume.spec.local] not found in Terraform schema
Error: kubernetes_persistent_volume.spec.node_affinity.required.node_selector_term.match_expression not found in Terraform schema
Indeed, according to terraform doc:
- https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/persistent_volume#local: the local argument exist
- https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/persistent_volume#match_expressions: the match expression argument need to be match_expressions instead match_expression.