published on Friday, Nov 13, 2026 by Pulumi
published on Friday, Nov 13, 2026 by Pulumi
Manages an AWS Network Security Manager Rule. A rule defines a firewall configuration to enforce, such as an AWS WAF web ACL setting or an AWS WAF rule group. Rules can be grouped into templates and referenced from policies.
Every change to a rule publishes a new version of the rule. The resource never leaves an unpublished draft version behind.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.networksecuritymanager.Rule("example", {
name: "example",
description: "Allow requests that match no other rule",
firewallType: "WAF",
type: "CONFIGURATION",
configuration: JSON.stringify({
DefaultAction: {
Allow: {},
},
}),
});
import pulumi
import json
import pulumi_aws as aws
example = aws.networksecuritymanager.Rule("example",
name="example",
description="Allow requests that match no other rule",
firewall_type="WAF",
type="CONFIGURATION",
configuration=json.dumps({
"DefaultAction": {
"Allow": {},
},
}))
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/networksecuritymanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]map[string]map[string]interface{}{
"DefaultAction": map[string]map[string]interface{}{
"Allow": map[string]interface{}{},
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = networksecuritymanager.NewRule(ctx, "example", &networksecuritymanager.RuleArgs{
Name: pulumi.String("example"),
Description: pulumi.String("Allow requests that match no other rule"),
FirewallType: pulumi.String("WAF"),
Type: pulumi.String("CONFIGURATION"),
Configuration: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.NetworkSecurityManager.Rule("example", new()
{
Name = "example",
Description = "Allow requests that match no other rule",
FirewallType = "WAF",
Type = "CONFIGURATION",
Configuration = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["DefaultAction"] = new Dictionary<string, object?>
{
["Allow"] = new Dictionary<string, object?>
{
},
},
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networksecuritymanager.Rule;
import com.pulumi.aws.networksecuritymanager.RuleArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Rule("example", RuleArgs.builder()
.name("example")
.description("Allow requests that match no other rule")
.firewallType("WAF")
.type("CONFIGURATION")
.configuration(serializeJson(
jsonObject(
jsonProperty("DefaultAction", jsonObject(
jsonProperty("Allow", jsonObject(
))
))
)))
.build());
}
}
resources:
example:
type: aws:networksecuritymanager:Rule
properties:
name: example
description: Allow requests that match no other rule
firewallType: WAF
type: CONFIGURATION
configuration:
fn::toJSON:
DefaultAction:
Allow: {}
terraform {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_networksecuritymanager_rule" "example" {
lifecycle {
create_before_destroy = true
}
name = "example"
description = "Allow requests that match no other rule"
firewall_type = "WAF"
type = "CONFIGURATION"
configuration = jsonencode({
"DefaultAction" = {
"Allow" = {}
}
})
}
Create Rule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);@overload
def Rule(resource_name: str,
args: RuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Rule(resource_name: str,
opts: Optional[ResourceOptions] = None,
configuration: Optional[str] = None,
firewall_type: Optional[str] = None,
type: Optional[str] = None,
description: Optional[str] = None,
is_published: Optional[bool] = None,
name: Optional[str] = None,
region: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)type: aws:networksecuritymanager:Rule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws_networksecuritymanager_rule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var awsRuleResource = new Aws.NetworkSecurityManager.Rule("awsRuleResource", new()
{
Configuration = "string",
FirewallType = "string",
Type = "string",
Description = "string",
IsPublished = false,
Name = "string",
Region = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := networksecuritymanager.NewRule(ctx, "awsRuleResource", &networksecuritymanager.RuleArgs{
Configuration: pulumi.String("string"),
FirewallType: pulumi.String("string"),
Type: pulumi.String("string"),
Description: pulumi.String("string"),
IsPublished: pulumi.Bool(false),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
resource "aws_networksecuritymanager_rule" "awsRuleResource" {
lifecycle {
create_before_destroy = true
}
configuration = "string"
firewall_type = "string"
type = "string"
description = "string"
is_published = false
name = "string"
region = "string"
tags = {
"string" = "string"
}
}
var awsRuleResource = new com.pulumi.aws.networksecuritymanager.Rule("awsRuleResource", com.pulumi.aws.networksecuritymanager.RuleArgs.builder()
.configuration("string")
.firewallType("string")
.type("string")
.description("string")
.isPublished(false)
.name("string")
.region("string")
.tags(Map.of("string", "string"))
.build());
aws_rule_resource = aws.networksecuritymanager.Rule("awsRuleResource",
configuration="string",
firewall_type="string",
type="string",
description="string",
is_published=False,
name="string",
region="string",
tags={
"string": "string",
})
const awsRuleResource = new aws.networksecuritymanager.Rule("awsRuleResource", {
configuration: "string",
firewallType: "string",
type: "string",
description: "string",
isPublished: false,
name: "string",
region: "string",
tags: {
string: "string",
},
});
type: aws:networksecuritymanager:Rule
properties:
configuration: string
description: string
firewallType: string
isPublished: false
name: string
region: string
tags:
string: string
type: string
Rule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Rule resource accepts the following input properties:
- Configuration string
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - Firewall
Type string - Firewall type of the rule. Valid values:
WAF. - Type string
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- Description string
- Description of the rule.
- Is
Published bool - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - Name string
- Name of the rule.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Dictionary<string, string>
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Configuration string
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - Firewall
Type string - Firewall type of the rule. Valid values:
WAF. - Type string
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- Description string
- Description of the rule.
- Is
Published bool - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - Name string
- Name of the rule.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map[string]string
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- configuration string
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - firewall_
type string - Firewall type of the rule. Valid values:
WAF. - type string
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- description string
- Description of the rule.
- is_
published bool - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - name string
- Name of the rule.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map(string)
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- configuration String
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - firewall
Type String - Firewall type of the rule. Valid values:
WAF. - type String
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- description String
- Description of the rule.
- is
Published Boolean - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - name String
- Name of the rule.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String,String>
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- configuration string
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - firewall
Type string - Firewall type of the rule. Valid values:
WAF. - type string
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- description string
- Description of the rule.
- is
Published boolean - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - name string
- Name of the rule.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- {[key: string]: string}
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- configuration str
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - firewall_
type str - Firewall type of the rule. Valid values:
WAF. - type str
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- description str
- Description of the rule.
- is_
published bool - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - name str
- Name of the rule.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Mapping[str, str]
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- configuration String
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - firewall
Type String - Firewall type of the rule. Valid values:
WAF. - type String
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- description String
- Description of the rule.
- is
Published Boolean - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - name String
- Name of the rule.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String>
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:
Look up Existing Rule Resource
Get an existing Rule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RuleState, opts?: CustomResourceOptions): Rule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
configuration: Optional[str] = None,
description: Optional[str] = None,
firewall_type: Optional[str] = None,
is_published: Optional[bool] = None,
name: Optional[str] = None,
region: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
type: Optional[str] = None) -> Rulefunc GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)resources: existingRule: type: aws:networksecuritymanager:Rule get: id: ${id}import {
to = aws_networksecuritymanager_rule.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state RuleState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state RuleState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state RuleState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state RuleState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Arn string
- ARN of the rule.
- Configuration string
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - Description string
- Description of the rule.
- Firewall
Type string - Firewall type of the rule. Valid values:
WAF. - Is
Published bool - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - Name string
- Name of the rule.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Dictionary<string, string>
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block. - Type string
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- Arn string
- ARN of the rule.
- Configuration string
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - Description string
- Description of the rule.
- Firewall
Type string - Firewall type of the rule. Valid values:
WAF. - Is
Published bool - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - Name string
- Name of the rule.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map[string]string
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block. - Type string
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- arn string
- ARN of the rule.
- configuration string
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - description string
- Description of the rule.
- firewall_
type string - Firewall type of the rule. Valid values:
WAF. - is_
published bool - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - name string
- Name of the rule.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map(string)
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - map(string)
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block. - type string
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- arn String
- ARN of the rule.
- configuration String
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - description String
- Description of the rule.
- firewall
Type String - Firewall type of the rule. Valid values:
WAF. - is
Published Boolean - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - name String
- Name of the rule.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String,String>
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block. - type String
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- arn string
- ARN of the rule.
- configuration string
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - description string
- Description of the rule.
- firewall
Type string - Firewall type of the rule. Valid values:
WAF. - is
Published boolean - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - name string
- Name of the rule.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- {[key: string]: string}
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block. - type string
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- arn str
- ARN of the rule.
- configuration str
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - description str
- Description of the rule.
- firewall_
type str - Firewall type of the rule. Valid values:
WAF. - is_
published bool - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - name str
- Name of the rule.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Mapping[str, str]
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block. - type str
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
- arn String
- ARN of the rule.
- configuration String
- Firewall configuration of the rule, as a JSON document. The structure depends on
firewallTypeandtype. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig. For an AWS WAFINSPECTIONrule, provide an AWS WAF rule group. For details, see Writing rule configurations in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. - description String
- Description of the rule.
- firewall
Type String - Firewall type of the rule. Valid values:
WAF. - is
Published Boolean - Whether to publish the rule. When
true, the rule is saved in the published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT); for a published rule, the draft is saved on top of the published version. Defaults totrue. - name String
- Name of the rule.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String>
- Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block. - type String
Type of the rule.
CONFIGURATIONrules contain firewall settings andINSPECTIONrules contain rule groups. Valid values:CONFIGURATION,INSPECTION.The following arguments are optional:
Import
Identity Schema
Required
arn(String) ARN of the rule.
Using pulumi import, import Network Security Manager Rule using the arn. For example:
$ pulumi import aws:networksecuritymanager/rule:Rule example arn:aws:network-security-manager:us-east-1:123456789012:rule:0123456789abcdef
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Friday, Nov 13, 2026 by Pulumi