~~~
heat_template_version: 2017-02-24
......
......
......
conditions:
    port_security_enabled:
        equals:
            - { get_param: port_security_enabled }
            - "true"

resources:
    port:
        type: OS::Neutron::Port
        properties:
            admin_state_up: true
            network_id: { get_param: internal_net }
            port_security_enabled: { get_param: port_security_enabled }
            security_groups: { get_param: security_group }


I want to create a condition , so if I set "port_security_enabled = false" security group will not apply in port.properties . If I set "port_security_enabled = true" then security group will applied.

Please help me