Closed olbees closed 3 years ago
Importing a panos_panorama_address_object resource does not import the device group or vsys to the state, and consequently forces a replacement.
A successful Terraform import of the address object should not force a replacement when Terraform is applied
Currently resource is imported to state successfully, but without device group or vsys, even though both are specified in the terraform .tf file:
################ terraform state show panos_panorama_address_object.apxx02lsvn
panos_panorama_address_object.apxxx02lsvn: resource "panos_panorama_address_object" "apxxx02lsvn" { id = "shared:apxxx02lsvn" name = "apxxx02lsvn" tags = [] type = "ip-netmask" value = "172.16.101.145/32" } ##################
When applying, Terraform attempts to add device group and vsys, specifying that these two properties force a replacement:
############### Terraform will perform the following actions:
panos_panorama_address_object.apxxx02lsvn must be replaced -/+ resource "panos_panorama_address_object" "apxxx02lsvn" {
} ###############
Import device group and vsys if specified in terraform file
Describe the bug
Importing a panos_panorama_address_object resource does not import the device group or vsys to the state, and consequently forces a replacement.
Expected behavior
A successful Terraform import of the address object should not force a replacement when Terraform is applied
Current behavior
Currently resource is imported to state successfully, but without device group or vsys, even though both are specified in the terraform .tf file:
################ terraform state show panos_panorama_address_object.apxx02lsvn
panos_panorama_address_object.apxxx02lsvn: resource "panos_panorama_address_object" "apxxx02lsvn" { id = "shared:apxxx02lsvn" name = "apxxx02lsvn" tags = [] type = "ip-netmask" value = "172.16.101.145/32" } ##################
When applying, Terraform attempts to add device group and vsys, specifying that these two properties force a replacement:
############### Terraform will perform the following actions:
panos_panorama_address_object.apxxx02lsvn must be replaced -/+ resource "panos_panorama_address_object" "apxxx02lsvn" {
(2 unchanged attributes hidden)
} ###############
Possible solution
Import device group and vsys if specified in terraform file
Steps to reproduce
Your Environment