published on Thursday, Sep 10, 2026 by Pulumi
published on Thursday, Sep 10, 2026 by Pulumi
Manages an opt-in Security Hub V2 feature, such as network scanning (NetScan), for the calling account in the current AWS Region.
NOTE: Security Hub V2 must be enabled (see
aws.securityhub.AccountV2) before you can enable a feature. UsedependsOnto ensure the correct ordering.
NOTE: Deleting this resource does not disable the feature, the resource in simply removed from state instead.
NOTE: You cannot enable a feature that is managed by an organization policy.
Example Usage
Basic
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.securityhub.AccountV2("example", {});
const exampleFeatureV2 = new aws.securityhub.FeatureV2("example", {
featureName: "NETWORK_SCANNING",
featureStatus: "ENABLED",
}, {
dependsOn: [example],
});
import pulumi
import pulumi_aws as aws
example = aws.securityhub.AccountV2("example")
example_feature_v2 = aws.securityhub.FeatureV2("example",
feature_name="NETWORK_SCANNING",
feature_status="ENABLED",
opts = pulumi.ResourceOptions(depends_on=[example]))
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/securityhub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := securityhub.NewAccountV2(ctx, "example", nil)
if err != nil {
return err
}
_, err = securityhub.NewFeatureV2(ctx, "example", &securityhub.FeatureV2Args{
FeatureName: pulumi.String("NETWORK_SCANNING"),
FeatureStatus: pulumi.String("ENABLED"),
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.SecurityHub.AccountV2("example");
var exampleFeatureV2 = new Aws.SecurityHub.FeatureV2("example", new()
{
FeatureName = "NETWORK_SCANNING",
FeatureStatus = "ENABLED",
}, new CustomResourceOptions
{
DependsOn =
{
example,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.securityhub.AccountV2;
import com.pulumi.aws.securityhub.FeatureV2;
import com.pulumi.aws.securityhub.FeatureV2Args;
import com.pulumi.resources.CustomResourceOptions;
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 AccountV2("example");
var exampleFeatureV2 = new FeatureV2("exampleFeatureV2", FeatureV2Args.builder()
.featureName("NETWORK_SCANNING")
.featureStatus("ENABLED")
.build(), CustomResourceOptions.builder()
.dependsOn(example)
.build());
}
}
resources:
example:
type: aws:securityhub:AccountV2
exampleFeatureV2:
type: aws:securityhub:FeatureV2
name: example
properties:
featureName: NETWORK_SCANNING
featureStatus: ENABLED
options:
dependsOn:
- ${example}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_securityhub_accountv2" "example" {
}
resource "aws_securityhub_featurev2" "example" {
depends_on = [aws_securityhub_accountv2.example]
feature_name = "NETWORK_SCANNING"
feature_status = "ENABLED"
}
Create FeatureV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FeatureV2(name: string, args: FeatureV2Args, opts?: CustomResourceOptions);@overload
def FeatureV2(resource_name: str,
args: FeatureV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def FeatureV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
feature_name: Optional[str] = None,
feature_status: Optional[str] = None,
region: Optional[str] = None)func NewFeatureV2(ctx *Context, name string, args FeatureV2Args, opts ...ResourceOption) (*FeatureV2, error)public FeatureV2(string name, FeatureV2Args args, CustomResourceOptions? opts = null)
public FeatureV2(String name, FeatureV2Args args)
public FeatureV2(String name, FeatureV2Args args, CustomResourceOptions options)
type: aws:securityhub:FeatureV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws_securityhub_feature_v2" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args FeatureV2Args
- 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 FeatureV2Args
- 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 FeatureV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FeatureV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FeatureV2Args
- 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 featureV2Resource = new Aws.SecurityHub.FeatureV2("featureV2Resource", new()
{
FeatureName = "string",
FeatureStatus = "string",
Region = "string",
});
example, err := securityhub.NewFeatureV2(ctx, "featureV2Resource", &securityhub.FeatureV2Args{
FeatureName: pulumi.String("string"),
FeatureStatus: pulumi.String("string"),
Region: pulumi.String("string"),
})
resource "aws_securityhub_feature_v2" "featureV2Resource" {
lifecycle {
create_before_destroy = true
}
feature_name = "string"
feature_status = "string"
region = "string"
}
var featureV2Resource = new FeatureV2("featureV2Resource", FeatureV2Args.builder()
.featureName("string")
.featureStatus("string")
.region("string")
.build());
feature_v2_resource = aws.securityhub.FeatureV2("featureV2Resource",
feature_name="string",
feature_status="string",
region="string")
const featureV2Resource = new aws.securityhub.FeatureV2("featureV2Resource", {
featureName: "string",
featureStatus: "string",
region: "string",
});
type: aws:securityhub:FeatureV2
properties:
featureName: string
featureStatus: string
region: string
FeatureV2 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 FeatureV2 resource accepts the following input properties:
- Feature
Name string - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - Feature
Status string - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Feature
Name string - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - Feature
Status string - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- feature_
name string - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - feature_
status string - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- feature
Name String - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - feature
Status String - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- feature
Name string - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - feature
Status string - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- feature_
name str - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - feature_
status str - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- feature
Name String - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - feature
Status String - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
Outputs
All input properties are implicitly available as output properties. Additionally, the FeatureV2 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing FeatureV2 Resource
Get an existing FeatureV2 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?: FeatureV2State, opts?: CustomResourceOptions): FeatureV2@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
feature_name: Optional[str] = None,
feature_status: Optional[str] = None,
region: Optional[str] = None) -> FeatureV2func GetFeatureV2(ctx *Context, name string, id IDInput, state *FeatureV2State, opts ...ResourceOption) (*FeatureV2, error)public static FeatureV2 Get(string name, Input<string> id, FeatureV2State? state, CustomResourceOptions? opts = null)public static FeatureV2 get(String name, Output<String> id, FeatureV2State state, CustomResourceOptions options)resources: _: type: aws:securityhub:FeatureV2 get: id: ${id}import {
to = aws_securityhub_feature_v2.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Feature
Name string - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - Feature
Status string - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Feature
Name string - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - Feature
Status string - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- feature_
name string - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - feature_
status string - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- feature
Name String - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - feature
Status String - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- feature
Name string - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - feature
Status string - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- feature_
name str - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - feature_
status str - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- feature
Name String - Name of the opt-in feature to enable. Valid values:
NETWORK_SCANNING. Changing this forces a new resource to be created. - feature
Status String - Current enablement status of the feature. Valid values:
ENABLED,DISABLED. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
Import
Identity Schema
Required
featureName(String) Name of the opt-in Security Hub V2 feature.
Optional
accountId(String) AWS Account where this resource is managed.region(String) Region where this resource is managed.
Using pulumi import, import Security Hub V2 features using featureName. For example:
$ pulumi import aws:securityhub/featureV2:FeatureV2 example NETWORK_SCANNING
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 Thursday, Sep 10, 2026 by Pulumi