You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GlobalNetworkPolicy resource should be created, and Terraform should exit without error.
Actual Behavior
The GlobalNetworkPolicy resource is created correctly (verified with kubectl get globalnetworkpolicy/deny-app-policy -o yaml), but Terraform exits with the following error:
kubernetes_manifest.global_network_policy: Creating...
╷
│ Error: Conversion from Unstructured to tftypes.Value failed
│
│ with kubernetes_manifest.global_network_policy,
│ on main.tf line 24, in resource "kubernetes_manifest" "global_network_policy":
│ 24: resource "kubernetes_manifest" "global_network_policy" {
│
│ AttributeName("spec"): [AttributeName("spec")] cannot convert map element value: AttributeName("spec").AttributeName("egress"):
│ [AttributeName("spec").AttributeName("egress")] cannot convert map element value: AttributeName("spec").AttributeName("egress").ElementKeyInt(0):
│ [AttributeName("spec").AttributeName("egress").ElementKeyInt(0)] cannot convert list element value:
│ AttributeName("spec").AttributeName("egress").ElementKeyInt(0).AttributeName("destination"):
│ [AttributeName("spec").AttributeName("egress").ElementKeyInt(0).AttributeName("destination")] cannot convert map element value:
│ AttributeName("spec").AttributeName("egress").ElementKeyInt(0).AttributeName("destination").AttributeName("ports"):
│ [AttributeName("spec").AttributeName("egress").ElementKeyInt(0).AttributeName("destination").AttributeName("ports")] cannot convert map element value:
│ AttributeName("spec").AttributeName("egress").ElementKeyInt(0).AttributeName("destination").AttributeName("ports").ElementKeyInt(0):
│ [AttributeName("spec").AttributeName("egress").ElementKeyInt(0).AttributeName("destination").AttributeName("ports").ElementKeyInt(0)] cannot convert list element value:
│ AttributeName("spec").AttributeName("egress").ElementKeyInt(0).AttributeName("destination").AttributeName("ports").ElementKeyInt(0):
│ [AttributeName("spec").AttributeName("egress").ElementKeyInt(0).AttributeName("destination").AttributeName("ports").ElementKeyInt(0)] cannot convert payload from "in64" to
│ "tftypes.String"
Important Factoids
I have a cluster where Calico was installed using Helm (via Terraform). I'm trying to deploy a default-deny policy example from docs. I used tfk8s to convert the yaml to Terraform config.
If I omit ports array from the above configuration, Terraform creates the resource and exits without error.
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
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/adam-dej/d9082be1508f475015cbcefa87686f18
Steps to Reproduce
minikube start
terraform apply -target helm_release.calico
terraform apply
Expected Behavior
The
GlobalNetworkPolicy
resource should be created, and Terraform should exit without error.Actual Behavior
The
GlobalNetworkPolicy
resource is created correctly (verified withkubectl get globalnetworkpolicy/deny-app-policy -o yaml
), but Terraform exits with the following error:Important Factoids
I have a cluster where Calico was installed using Helm (via Terraform). I'm trying to deploy a default-deny policy example from docs. I used
tfk8s
to convert the yaml to Terraform config.If I omit
ports
array from the above configuration, Terraform creates the resource and exits without error.Community Note
The text was updated successfully, but these errors were encountered: