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
Idaws.networkfirewall.firewalls

Fields

NameDatatypeDescription
firewall_namestring
firewall_arnstringA resource ARN.
firewall_idstring
firewall_policy_arnstringA resource ARN.
vpc_idstring
subnet_mappingsarray
delete_protectionboolean
subnet_change_protectionboolean
firewall_policy_change_protectionboolean
descriptionstring
endpoint_idsarray
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTFirewallName, FirewallPolicyArn, VpcId, SubnetMappings, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all firewalls in a region.

SELECT
region,
firewall_name,
firewall_arn,
firewall_id,
firewall_policy_arn,
vpc_id,
subnet_mappings,
delete_protection,
subnet_change_protection,
firewall_policy_change_protection,
description,
endpoint_ids,
tags
FROM aws.networkfirewall.firewalls
WHERE region = 'us-east-1';

Gets all properties from an individual firewall.

SELECT
region,
firewall_name,
firewall_arn,
firewall_id,
firewall_policy_arn,
vpc_id,
subnet_mappings,
delete_protection,
subnet_change_protection,
firewall_policy_change_protection,
description,
endpoint_ids,
tags
FROM aws.networkfirewall.firewalls
WHERE region = 'us-east-1' AND data__Identifier = '<FirewallArn>';

INSERT example

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

/*+ create */
INSERT INTO aws.networkfirewall.firewalls (
FirewallName,
FirewallPolicyArn,
VpcId,
SubnetMappings,
region
)
SELECT
'{{ FirewallName }}',
'{{ FirewallPolicyArn }}',
'{{ VpcId }}',
'{{ SubnetMappings }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.networkfirewall.firewalls
WHERE data__Identifier = '<FirewallArn>'
AND region = 'us-east-1';

Permissions

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

Create

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:AssociateFirewallPolicy,
network-firewall:DescribeFirewall

Read

network-firewall:DescribeFirewall,
network-firewall:ListTagsForResources

Update

network-firewall:AssociateSubnets,
network-firewall:DisassociateSubnets,
network-firewall:UpdateFirewallDescription,
network-firewall:UpdateFirewallDeleteProtection,
network-firewall:UpdateSubnetChangeProtection,
network-firewall:UpdateFirewallPolicyChangeProtection,
network-firewall:AssociateFirewallPolicy,
network-firewall:TagResource,
network-firewall:UntagResource,
network-firewall:DescribeFirewall

Delete

ec2:DeleteVpcEndpoints,
ec2:DescribeRouteTables,
logs:DescribeLogGroups,
logs:DescribeResourcePolicies,
logs:GetLogDelivery,
logs:ListLogDeliveries,
network-firewall:DeleteFirewall,
network-firewall:UntagResource,
network-firewall:DescribeFirewall

List

network-firewall:ListFirewalls