Stuck on the Kubernetes Service answer check. I wrote each config file separately (provider.tf, resource.tf, main.tf). When I run “terraform init” and “Terraform validate”, it confirms my code is correct. However, when I select “Check” to check my work, I get an error that none of the steps are completed.
Error:
Tasks not completed!
- Create a terraform resource
webapp-service
for kubernetes service with following specs:
Service name:webapp-service
- Service Type:
NodePort
- Port:
8080
- NodePort:
30080
My Code:
Resouce for Kubernetes Service
resource “kubernetes_service” “webapp_service” {
metadata {
name = “webapp-service”
}
spec {
selector = {
app = "webapp"
}
type = "NodePort"
port {
port = 8080
node_port = 30080
}
}
}