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 information from the data element nsxt_policy_segment_realization is not displayed via the output element
Reproduction steps
terraform init
terraform plan
data.nsxt_policy_mac_discovery_profile.nsx_mac_discovery_profile: Reading...
data.nsxt_policy_transport_zone.vlan_tz: Reading...
data.nsxt_policy_transport_zone.overlay_tz: Reading...
data.nsxt_policy_segment_security_profile.nsx_security_profile: Reading...
data.nsxt_policy_mac_discovery_profile.nsx_mac_discovery_profile: Read complete after 0s [id=<removed>]
data.nsxt_policy_segment_security_profile.nsx_security_profile: Read complete after 0s [id=<removed>]
data.nsxt_policy_transport_zone.overlay_tz: Read complete after 0s [id=<removed>]
data.nsxt_policy_transport_zone.vlan_tz: Read complete after 0s [id=<removed>]
Terraform used the selected providers to generate the following execution plan. Resource actions are
indicated with the following symbols:
+ create
<= read (data resources)
Terraform will perform the following actions:
# data.nsxt_policy_segment_realization.tenant_networks["Test-mgmt"] will be read during apply
# (config refers to values not yet known)
<= data "nsxt_policy_segment_realization" "tenant_networks" {
+ id = (known after apply)
+ network_name = (known after apply)
+ path = (known after apply)
+ state = (known after apply)
}
# nsxt_policy_project.tenant_networks will be created
+ resource "nsxt_policy_project" "tenant_networks" {
+ description = "Terraform provisioned and managed Project"
+ display_name = "test"
+ id = (known after apply)
+ nsx_id = (known after apply)
+ path = (known after apply)
+ revision = (known after apply)
+ short_id = (known after apply)
}
# nsxt_policy_segment.tenant_networks["500"] will be created
+ resource "nsxt_policy_segment" "tenant_networks" {
+ description = "provisioned and managed with Terraform"
+ display_name = "Test-mgmt"
+ id = (known after apply)
+ nsx_id = (known after apply)
+ overlay_id = (known after apply)
+ path = (known after apply)
+ replication_mode = "MTEP"
+ revision = (known after apply)
+ transport_zone_path = "/infra/sites/default/enforcement-points/default/transport-zones/<removed>"
+ discovery_profile {
+ binding_map_path = (known after apply)
+ mac_discovery_profile_path = "/infra/mac-discovery-profiles/<removed>"
+ revision = (known after apply)
}
+ security_profile {
+ binding_map_path = (known after apply)
+ revision = (known after apply)
+ security_profile_path = "/infra/segment-security-profiles/<removed>"
}
}
Plan: 2 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ network = {
+ Test-mgmt = {
+ context = []
}
}
─────────────────────────────────────────────────────────────────────────────────────────────────────────
Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly
these actions if you run "terraform apply" now.
output ist empty
...
Expected behavior
The complete variable information from the data element is displayed.
So something like this:
Changes to Outputs:
+ network = {
+ Test-mgmt = {
+ id = (known after apply)
+ network_name = (known after apply)
+ path = (known after apply)
+ state = (known after apply)
}
}
Additional context
Config:
main.tf
data "nsxt_policy_transport_zone" "overlay_tz" {
display_name = var.nsx.transport_zone.overlay
}
data "nsxt_policy_transport_zone" "vlan_tz" {
display_name = var.nsx.transport_zone.vlan
}
data "nsxt_policy_mac_discovery_profile" "nsx_mac_discovery_profile" {
display_name = var.nsx.mac_discovery_profile
}
data "nsxt_policy_segment_security_profile" "nsx_security_profile" {
display_name = var.nsx.security_profile
}
resource "nsxt_policy_segment" "tenant_networks" {
for_each = { for network in var.networks : network.id => network}
display_name = "${each.value.name}"
description = "provisioned with Terraform"
transport_zone_path = "${data.nsxt_policy_transport_zone.overlay_tz.path}"
discovery_profile {
mac_discovery_profile_path = "${data.nsxt_policy_mac_discovery_profile.nsx_mac_discovery_profile.path}"
}
security_profile {
security_profile_path = "${data.nsxt_policy_segment_security_profile.nsx_security_profile.path}"
}
}
data "nsxt_policy_segment_realization" "tenant_networks" {
for_each = { for network in var.networks : network.name => network}
path = resource.nsxt_policy_segment.tenant_networks["${each.value.id}"].path
depends_on = [resource.nsxt_policy_segment.tenant_networks]
}
output "network" {
value = data.nsxt_policy_segment_realization.tenant_networks
}
Hi @kaje783, thanks for reporting this.
Here is the output that I see when trying to replicate your scenario:
Plan: 1 to add, 0 to change, 1 to destroy.
Changes to Outputs:
+ network = {
+ Test-mgmt = {
+ context = []
+ id = (known after apply)
+ network_name = (known after apply)
+ path = (known after apply)
+ state = (known after apply)
}
}
May I ask what is your version of terraform?
I don't think this can be related to the provider, rather to terraform core, but I'm curious what the difference in our cases might be.
Describe the bug
The information from the data element nsxt_policy_segment_realization is not displayed via the output element
Reproduction steps
...
Expected behavior
The complete variable information from the data element is displayed.
So something like this:
Additional context
Config:
main.tf
var.tf
provider.tf
Testdata:
terraform.tfvars
The text was updated successfully, but these errors were encountered: