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
resource"kubernetes_network_policy""this" {
dynamic"metadata" {
for_each=var.metadatacontent {
# annotations - (optional) is a type of map of stringannotations=metadata.value["annotations"]
# generate_name - (optional) is a type of stringgenerate_name=metadata.value["generate_name"]
# labels - (optional) is a type of map of stringlabels=metadata.value["labels"]
# name - (optional) is a type of stringname=metadata.value["name"]
# namespace - (optional) is a type of stringnamespace=metadata.value["namespace"]
}
}
dynamic"spec" {
for_each=var.speccontent {
# policy_types - (required) is a type of list of stringpolicy_types=spec.value["policy_types"]
dynamic"egress" {
for_each=spec.value.egresscontent {
dynamic"ports" {
for_each=egress.value.portscontent {
# port - (optional) is a type of stringport=ports.value["port"]
# protocol - (optional) is a type of stringprotocol=ports.value["protocol"]
}
}
dynamic"to" {
for_each=egress.value.tocontent {
dynamic"ip_block" {
for_each=to.value.ip_blockcontent {
# cidr - (optional) is a type of stringcidr=ip_block.value["cidr"]
# except - (optional) is a type of list of stringexcept=ip_block.value["except"]
}
}
dynamic"namespace_selector" {
for_each=to.value.namespace_selectorcontent {
# match_labels - (optional) is a type of map of stringmatch_labels=namespace_selector.value["match_labels"]
dynamic"match_expressions" {
for_each=namespace_selector.value.match_expressionscontent {
# key - (optional) is a type of stringkey=match_expressions.value["key"]
# operator - (optional) is a type of stringoperator=match_expressions.value["operator"]
# values - (optional) is a type of set of stringvalues=match_expressions.value["values"]
}
}
}
}
dynamic"pod_selector" {
for_each=to.value.pod_selectorcontent {
# match_labels - (optional) is a type of map of stringmatch_labels=pod_selector.value["match_labels"]
dynamic"match_expressions" {
for_each=pod_selector.value.match_expressionscontent {
# key - (optional) is a type of stringkey=match_expressions.value["key"]
# operator - (optional) is a type of stringoperator=match_expressions.value["operator"]
# values - (optional) is a type of set of stringvalues=match_expressions.value["values"]
}
}
}
}
}
}
}
}
dynamic"ingress" {
for_each=spec.value.ingresscontent {
dynamic"from" {
for_each=ingress.value.fromcontent {
dynamic"ip_block" {
for_each=from.value.ip_blockcontent {
# cidr - (optional) is a type of stringcidr=ip_block.value["cidr"]
# except - (optional) is a type of list of stringexcept=ip_block.value["except"]
}
}
dynamic"namespace_selector" {
for_each=from.value.namespace_selectorcontent {
# match_labels - (optional) is a type of map of stringmatch_labels=namespace_selector.value["match_labels"]
dynamic"match_expressions" {
for_each=namespace_selector.value.match_expressionscontent {
# key - (optional) is a type of stringkey=match_expressions.value["key"]
# operator - (optional) is a type of stringoperator=match_expressions.value["operator"]
# values - (optional) is a type of set of stringvalues=match_expressions.value["values"]
}
}
}
}
dynamic"pod_selector" {
for_each=from.value.pod_selectorcontent {
# match_labels - (optional) is a type of map of stringmatch_labels=pod_selector.value["match_labels"]
dynamic"match_expressions" {
for_each=pod_selector.value.match_expressionscontent {
# key - (optional) is a type of stringkey=match_expressions.value["key"]
# operator - (optional) is a type of stringoperator=match_expressions.value["operator"]
# values - (optional) is a type of set of stringvalues=match_expressions.value["values"]
}
}
}
}
}
}
dynamic"ports" {
for_each=ingress.value.portscontent {
# port - (optional) is a type of stringport=ports.value["port"]
# protocol - (optional) is a type of stringprotocol=ports.value["protocol"]
}
}
}
}
dynamic"pod_selector" {
for_each=spec.value.pod_selectorcontent {
# match_labels - (optional) is a type of map of stringmatch_labels=pod_selector.value["match_labels"]
dynamic"match_expressions" {
for_each=pod_selector.value.match_expressionscontent {
# key - (optional) is a type of stringkey=match_expressions.value["key"]
# operator - (optional) is a type of stringoperator=match_expressions.value["operator"]
# values - (optional) is a type of set of stringvalues=match_expressions.value["values"]
}
}
}
}
}
}
}