Closed ShreyasNBS closed 2 years ago
:tada: Thanks for opening your first issue here! Welcome to the community!
ok, quick update. I added position-keyword
and lifecycle
block. After this, I got the following error
resource "panos_panorama_security_rule_group" "test_ew_sg_allow_all" {
device_group = panos_panorama_device_group.test_ew_dg.name
position_keyword = "top"
rule {
name = "Allow everything"
source_zones = ["any"]
source_addresses = ["any"]
source_users = ["any"]
hip_profiles = ["any"]
destination_zones = ["any"]
destination_addresses = ["any"]
applications = ["any"]
services = ["application-default"]
categories = ["any"]
action = "allow"
}
lifecycle {
create_before_destroy = true
}
}
module.panorama-config.panos_panorama_security_rule_group.test_ew_sg_allow_all: Creating...
╷
│ Error: Allow everything -> hip-profiles unexpected here
│
│ with module.panorama-config.panos_panorama_security_rule_group.test_ew_sg_allow_all,
│ on ../../modules/panorama-config/security.tf line 9, in resource "panos_panorama_security_rule_group" "test_ew_sg_allow_all":
│ 9: resource "panos_panorama_security_rule_group" "test_ew_sg_allow_all" {
After commenting out hip_profiles
, the rule group was created fine. Is this expected?
module.panorama-config.panos_panorama_security_rule_group.test_ew_sg_allow_all: Creating...
module.panorama-config.panos_panorama_security_rule_group.test_ew_sg_allow_all: Creation complete after 1s [id=test east west device group:pre-rulebase:vsys1:5::QWxsb3cgZXZlcnl0aGluZw==]
Describe the bug
I have a simple terraform module for panorama config, which is creating a new template, template stack, device group and a security rule group. Code below
When I run terraform plan, I get the output as expected
However when I run terraform apply, the security rule group bit keeps on running without timing out. Other resources are applied just fine.
What am I missing? One thing to note is that this is all candidate config, since the goal is to call commit after the above has been created.
Expected behavior
Security rule group should created via terraform apply.
Current behavior
Security rule group is not being created.
Your Environment