terraform-provider-kubernetes
terraform-provider-kubernetes copied to clipboard
FIX: terraform import does not complain about missing mount propagation anymore
Description
Every time I import something that has a container that mounts a volume ( a Deployment, a Pod, DaemonSet or a Job ), terraform-provider-kubernetes was complaining about the mount_propagation field:
~ volume_mount {
+ mount_propagation = "None"
name = "data-volume"
# (3 unchanged attributes hidden)
}
~ volume_mount {
+ mount_propagation = "None"
name = "data-volume"
# (3 unchanged attributes hidden)
}
This patch solves that.
Acceptance tests
- [ ] Have you added an acceptance test for the functionality being added?
- [X] Have you run the acceptance tests on this branch?
Output from acceptance testing:
mdiez@batman:~/go/src/github.com/hashicorp/terraform-provider-kubernetes$ make test
==> Checking that code complies with gofmt requirements...
go test "/home/mdiez/go/src/github.com/hashicorp/terraform-provider-kubernetes/kubernetes" || exit 1
ok github.com/hashicorp/terraform-provider-kubernetes/kubernetes (cached)
echo "/home/mdiez/go/src/github.com/hashicorp/terraform-provider-kubernetes/kubernetes" | \
xargs -t -n4 go test -timeout=30s -parallel=4
go test '-timeout=30s' '-parallel=4' /home/mdiez/go/src/github.com/hashicorp/terraform-provider-kubernetes/kubernetes
ok github.com/hashicorp/terraform-provider-kubernetes/kubernetes (cached)
Release Note
Release note for CHANGELOG:
Whenever importing Deployments/Pods/CronJobs that mount disks, terraform won't complain about the mount_propagation field if it's value was not explicitly set in the cluster.
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Fixed in https://github.com/hashicorp/terraform-provider-kubernetes/commit/47c0f1ebd773e3e81cc369e870f2e78c51b40bef.