Nutanix Cluster Information
Please provide the version of:
- Nutanix Cluster (Prism Element / AOS): 5.16.1
- Nutanix Prism Central: 5.16.1.2
Terraform Version
Terraform v0.12.25
- provider.nutanix last build from master
- provider.template v2.1.2
Affected Resource(s)
- nutanix_network_security_rule
Terraform Configuration Files
data "nutanix_network_security_rule" "psih_sp" {
network_security_rule_id = "c7bbcd24-0d9d-4d89-8636-46cb752dae13"
}
Debug Output
Error: app_rule_inbound_allow_list.0.tcp_port_range_list.0.start_port: '' expected type 'string', got unconvertible type 'int64'
on securitypolicies.tf line 2, in data "nutanix_network_security_rule" "psih_sp":
2: data "nutanix_network_security_rule" "psih_sp" {
Content of the rule from API call output
{
"status": {
"state": "COMPLETE",
"execution_context": {
"task_uuids": [
"a215c888-8e42-4136-85f2-5d53873eb378"
]
},
"name": "PSIH_Security_Policy",
"resources": {
"app_rule": {
"action": "MONITOR",
"outbound_allow_list": [
{
"ip_subnet": {
"ip": "10.0.0.0",
"prefix_length": 24
},
"protocol": "UDP",
"udp_port_range_list": [
{
"end_port": 53,
"start_port": 53
}
],
"peer_specification_type": "IP_SUBNET"
}
],
"target_group": {
"filter": {
"kind_list": [
"vm"
],
"type": "CATEGORIES_MATCH_ALL",
"params": {
"AppTier": [
"PMSIpilot"
],
"AppType": [
"PSIH"
]
}
},
"default_internal_policy": "ALLOW_ALL",
"peer_specification_type": "FILTER"
},
"inbound_allow_list": [
{
"ip_subnet": {
"ip": "0.0.0.0",
"prefix_length": 0
},
"tcp_port_range_list": [
{
"end_port": 80,
"start_port": 80
},
{
"end_port": 443,
"start_port": 443
}
],
"protocol": "TCP",
"peer_specification_type": "IP_SUBNET"
},
{
"filter": {
"kind_list": [
"vm"
],
"type": "CATEGORIES_MATCH_ALL",
"params": {
"Environment": [
"AdminWorkstations"
]
}
},
"tcp_port_range_list": [
{
"end_port": 22,
"start_port": 22
}
],
"protocol": "TCP",
"peer_specification_type": "FILTER"
},
{
"filter": {
"kind_list": [
"vm"
],
"type": "CATEGORIES_MATCH_ALL",
"params": {
"Environment": [
"AdminWorkstations"
]
}
},
"protocol": "ICMP",
"peer_specification_type": "FILTER"
}
]
}
},
"description": "Secure PSIH Applications"
},
"spec": {
"description": "Secure PSIH Applications",
"resources": {
"allow_ipv6_traffic": false,
"app_rule": {
"action": "MONITOR",
"outbound_allow_list": [
{
"ip_subnet": {
"ip": "10.0.0.0",
"prefix_length": 24
},
"protocol": "UDP",
"udp_port_range_list": [
{
"end_port": 53,
"start_port": 53
}
],
"peer_specification_type": "IP_SUBNET"
}
],
"target_group": {
"filter": {
"params": {
"AppType": [
"PSIH"
],
"AppTier": [
"PMSIpilot"
]
},
"kind_list": [
"vm"
],
"type": "CATEGORIES_MATCH_ALL"
},
"default_internal_policy": "ALLOW_ALL",
"peer_specification_type": "FILTER"
},
"inbound_allow_list": [
{
"ip_subnet": {
"ip": "0.0.0.0",
"prefix_length": 0
},
"tcp_port_range_list": [
{
"end_port": 80,
"start_port": 80
},
{
"end_port": 443,
"start_port": 443
}
],
"protocol": "TCP",
"peer_specification_type": "IP_SUBNET"
},
{
"filter": {
"params": {
"Environment": [
"AdminWorkstations"
]
},
"kind_list": [
"vm"
],
"type": "CATEGORIES_MATCH_ALL"
},
"tcp_port_range_list": [
{
"end_port": 22,
"start_port": 22
}
],
"protocol": "TCP",
"peer_specification_type": "FILTER"
},
{
"filter": {
"params": {
"Environment": [
"AdminWorkstations"
]
},
"kind_list": [
"vm"
],
"type": "CATEGORIES_MATCH_ALL"
},
"protocol": "ICMP",
"peer_specification_type": "FILTER"
}
]
},
"is_policy_hitlog_enabled": false
},
"name": "PSIH_Security_Policy"
},
"metadata": {
"last_update_time": "2020-05-16T13:51:13Z",
"kind": "network_security_rule",
"uuid": "c7bbcd24-0d9d-4d89-8636-46cb752dae13",
"spec_version": 2,
"creation_time": "2020-05-16T13:43:43Z",
"categories_mapping": {},
"owner_reference": {
"kind": "user",
"uuid": "5e809300-67c9-5c28-a1b3-972b931e3d32",
"name": "anthony"
},
"categories": {}
}
},
Expected Behavior
fetching data source without error message
Actual Behavior
error on expected type
Steps to Reproduce
adding any data source nutanix_network_security_rule
Nutanix Cluster Information
Please provide the version of:
Terraform Version
Terraform v0.12.25
Affected Resource(s)
Terraform Configuration Files
Debug Output
Error: app_rule_inbound_allow_list.0.tcp_port_range_list.0.start_port: '' expected type 'string', got unconvertible type 'int64'
on securitypolicies.tf line 2, in data "nutanix_network_security_rule" "psih_sp":
2: data "nutanix_network_security_rule" "psih_sp" {
Content of the rule from API call output
{
"status": {
"state": "COMPLETE",
"execution_context": {
"task_uuids": [
"a215c888-8e42-4136-85f2-5d53873eb378"
]
},
"name": "PSIH_Security_Policy",
"resources": {
"app_rule": {
"action": "MONITOR",
"outbound_allow_list": [
{
"ip_subnet": {
"ip": "10.0.0.0",
"prefix_length": 24
},
"protocol": "UDP",
"udp_port_range_list": [
{
"end_port": 53,
"start_port": 53
}
],
"peer_specification_type": "IP_SUBNET"
}
],
"target_group": {
"filter": {
"kind_list": [
"vm"
],
"type": "CATEGORIES_MATCH_ALL",
"params": {
"AppTier": [
"PMSIpilot"
],
"AppType": [
"PSIH"
]
}
},
"default_internal_policy": "ALLOW_ALL",
"peer_specification_type": "FILTER"
},
"inbound_allow_list": [
{
"ip_subnet": {
"ip": "0.0.0.0",
"prefix_length": 0
},
"tcp_port_range_list": [
{
"end_port": 80,
"start_port": 80
},
{
"end_port": 443,
"start_port": 443
}
],
"protocol": "TCP",
"peer_specification_type": "IP_SUBNET"
},
{
"filter": {
"kind_list": [
"vm"
],
"type": "CATEGORIES_MATCH_ALL",
"params": {
"Environment": [
"AdminWorkstations"
]
}
},
"tcp_port_range_list": [
{
"end_port": 22,
"start_port": 22
}
],
"protocol": "TCP",
"peer_specification_type": "FILTER"
},
{
"filter": {
"kind_list": [
"vm"
],
"type": "CATEGORIES_MATCH_ALL",
"params": {
"Environment": [
"AdminWorkstations"
]
}
},
"protocol": "ICMP",
"peer_specification_type": "FILTER"
}
]
}
},
"description": "Secure PSIH Applications"
},
"spec": {
"description": "Secure PSIH Applications",
"resources": {
"allow_ipv6_traffic": false,
"app_rule": {
"action": "MONITOR",
"outbound_allow_list": [
{
"ip_subnet": {
"ip": "10.0.0.0",
"prefix_length": 24
},
"protocol": "UDP",
"udp_port_range_list": [
{
"end_port": 53,
"start_port": 53
}
],
"peer_specification_type": "IP_SUBNET"
}
],
"target_group": {
"filter": {
"params": {
"AppType": [
"PSIH"
],
"AppTier": [
"PMSIpilot"
]
},
"kind_list": [
"vm"
],
"type": "CATEGORIES_MATCH_ALL"
},
"default_internal_policy": "ALLOW_ALL",
"peer_specification_type": "FILTER"
},
"inbound_allow_list": [
{
"ip_subnet": {
"ip": "0.0.0.0",
"prefix_length": 0
},
"tcp_port_range_list": [
{
"end_port": 80,
"start_port": 80
},
{
"end_port": 443,
"start_port": 443
}
],
"protocol": "TCP",
"peer_specification_type": "IP_SUBNET"
},
{
"filter": {
"params": {
"Environment": [
"AdminWorkstations"
]
},
"kind_list": [
"vm"
],
"type": "CATEGORIES_MATCH_ALL"
},
"tcp_port_range_list": [
{
"end_port": 22,
"start_port": 22
}
],
"protocol": "TCP",
"peer_specification_type": "FILTER"
},
{
"filter": {
"params": {
"Environment": [
"AdminWorkstations"
]
},
"kind_list": [
"vm"
],
"type": "CATEGORIES_MATCH_ALL"
},
"protocol": "ICMP",
"peer_specification_type": "FILTER"
}
]
},
"is_policy_hitlog_enabled": false
},
"name": "PSIH_Security_Policy"
},
"metadata": {
"last_update_time": "2020-05-16T13:51:13Z",
"kind": "network_security_rule",
"uuid": "c7bbcd24-0d9d-4d89-8636-46cb752dae13",
"spec_version": 2,
"creation_time": "2020-05-16T13:43:43Z",
"categories_mapping": {},
"owner_reference": {
"kind": "user",
"uuid": "5e809300-67c9-5c28-a1b3-972b931e3d32",
"name": "anthony"
},
"categories": {}
}
},
Expected Behavior
fetching data source without error message
Actual Behavior
error on expected type
Steps to Reproduce
adding any data source nutanix_network_security_rule