Skip to main content

firewalls

Creates, updates, deletes or gets a firewall resource or lists firewalls in a region

Overview

Namefirewalls
TypeResource
DescriptionResource type definition for AWS::NetworkFirewall::Firewall
Idawscc.networkfirewall.firewalls

Fields

NameDatatypeDescription
firewall_namestring
firewall_arnstringA resource ARN.
firewall_idstring
vpc_idstring
subnet_mappingsarray
availability_zone_mappingsarray
delete_protectionboolean
subnet_change_protectionboolean
availability_zone_change_protectionboolean
firewall_policy_change_protectionboolean
transit_gateway_idstring
descriptionstring
endpoint_idsarray
enabled_analysis_typesarrayThe types of analysis to enable for the firewall. Can be TLS_SNI, HTTP_HOST, or both.
tagsarray
regionstringAWS region.

For more information, see AWS::NetworkFirewall::Firewall.

Methods

NameResourceAccessible byRequired Params
create_resourcefirewallsINSERTFirewallName, FirewallPolicyArn, region
delete_resourcefirewallsDELETEIdentifier, region
update_resourcefirewallsUPDATEIdentifier, PatchDocument, region
list_resourcesfirewalls_list_onlySELECTregion
get_resourcefirewallsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual firewall.

SELECT
region,
firewall_name,
firewall_arn,
firewall_id,
firewall_policy_arn,
vpc_id,
subnet_mappings,
availability_zone_mappings,
delete_protection,
subnet_change_protection,
availability_zone_change_protection,
firewall_policy_change_protection,
transit_gateway_id,
description,
endpoint_ids,
enabled_analysis_types,
tags
FROM awscc.networkfirewall.firewalls
WHERE
region = 'us-east-1' AND
Identifier = '{{ firewall_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new firewall resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.networkfirewall.firewalls (
FirewallName,
FirewallPolicyArn,
region
)
SELECT
'{{ firewall_name }}',
'{{ firewall_policy_arn }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a firewall resource, using stack-deploy.

/*+ update */
UPDATE awscc.networkfirewall.firewalls
SET PatchDocument = string('{{ {
"FirewallPolicyArn": firewall_policy_arn,
"SubnetMappings": subnet_mappings,
"AvailabilityZoneMappings": availability_zone_mappings,
"DeleteProtection": delete_protection,
"SubnetChangeProtection": subnet_change_protection,
"AvailabilityZoneChangeProtection": availability_zone_change_protection,
"FirewallPolicyChangeProtection": firewall_policy_change_protection,
"TransitGatewayId": transit_gateway_id,
"Description": description,
"EnabledAnalysisTypes": enabled_analysis_types,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ firewall_arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.networkfirewall.firewalls
WHERE
Identifier = '{{ firewall_arn }}' AND
region = 'us-east-1';

Permissions

To operate on the firewalls resource, the following permissions are required:

ec2:CreateVpcEndpoint,
ec2:DescribeVpcEndpoints,
ec2:DescribeSubnets,
ec2:DescribeVpcs,
iam:CreateServiceLinkedRole,
network-firewall:CreateFirewall,
network-firewall:DescribeFirewallPolicy,
network-firewall:DescribeRuleGroup,
network-firewall:TagResource,
network-firewall:AssociateSubnets,
network-firewall:AssociateAvailabilityZones,
network-firewall:AssociateFirewallPolicy,
network-firewall:DescribeFirewall