PaloAltoNetworks / terraform-provider-panos

Terraform Panos provider
https://www.terraform.io/docs/providers/panos/
MIT License
89 stars 71 forks source link

Error: tagname -> tag 'tagname' is not a valid reference | tagname -> tag is invalid #351

Closed itprosource closed 2 years ago

itprosource commented 2 years ago

Describe the bug

Cannot include tags with a panos_address_object resource.

Expected behavior

I cannot even deploy a tag with the official resource example as shown:

resource "panos_address_object" "example" {
    name = "localnet"
    value = "192.168.80.0/24"
    description = "The 192.168.80 network"
    tags = [
        "internal",
        "dmz"
    ]
}

I expect this to deploy with tags "internal" and "dmz".

Current behavior

Running the example as seen throws error during apply: "Error: example -> tag 'internal' is not a valid reference | example-> tag is invalid"

Possible solution

I don't know.

Steps to reproduce

Run terraform apply on the official example resource as seen above. I receive the same error no matter what modifications I make to the resource.

Context

Because I cannot include tags, it is harder for me to assemble address objects into address groups.

Your Environment

Tried in many different environments with the same error.

welcome-to-palo-alto-networks[bot] commented 2 years ago

:tada: Thanks for opening your first issue here! Welcome to the community!

itprosource commented 2 years ago

Update: There is no bug. The problem is that the tag must be created before it can be used. The address object resource will not create it on it's own.