StandardsSubscription
Subscribes to a Security Hub standard.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.SecurityHub.Account("example", new Aws.SecurityHub.AccountArgs
{
});
var cis = new Aws.SecurityHub.StandardsSubscription("cis", new Aws.SecurityHub.StandardsSubscriptionArgs
{
StandardsArn = "arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0",
}, new CustomResourceOptions
{
DependsOn =
{
"aws_securityhub_account.example",
},
});
var pci321 = new Aws.SecurityHub.StandardsSubscription("pci321", new Aws.SecurityHub.StandardsSubscriptionArgs
{
StandardsArn = "arn:aws:securityhub:us-east-1::standards/pci-dss/v/3.2.1",
}, new CustomResourceOptions
{
DependsOn =
{
"aws_securityhub_account.example",
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/securityhub"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securityhub.NewAccount(ctx, "example", nil)
if err != nil {
return err
}
_, err = securityhub.NewStandardsSubscription(ctx, "cis", &securityhub.StandardsSubscriptionArgs{
StandardsArn: pulumi.String("arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0"),
}, pulumi.DependsOn([]pulumi.Resource{
"aws_securityhub_account.example",
}))
if err != nil {
return err
}
_, err = securityhub.NewStandardsSubscription(ctx, "pci321", &securityhub.StandardsSubscriptionArgs{
StandardsArn: pulumi.String("arn:aws:securityhub:us-east-1::standards/pci-dss/v/3.2.1"),
}, pulumi.DependsOn([]pulumi.Resource{
"aws_securityhub_account.example",
}))
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.securityhub.Account("example")
cis = aws.securityhub.StandardsSubscription("cis", standards_arn="arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0",
opts=ResourceOptions(depends_on=["aws_securityhub_account.example"]))
pci321 = aws.securityhub.StandardsSubscription("pci321", standards_arn="arn:aws:securityhub:us-east-1::standards/pci-dss/v/3.2.1",
opts=ResourceOptions(depends_on=["aws_securityhub_account.example"]))import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.securityhub.Account("example", {});
const cis = new aws.securityhub.StandardsSubscription("cis", {
standardsArn: "arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0",
}, { dependsOn: [example] });
const pci321 = new aws.securityhub.StandardsSubscription("pci_321", {
standardsArn: "arn:aws:securityhub:us-east-1::standards/pci-dss/v/3.2.1",
}, { dependsOn: [example] });Create a StandardsSubscription Resource
new StandardsSubscription(name: string, args: StandardsSubscriptionArgs, opts?: CustomResourceOptions);def StandardsSubscription(resource_name, opts=None, standards_arn=None, __props__=None);func NewStandardsSubscription(ctx *Context, name string, args StandardsSubscriptionArgs, opts ...ResourceOption) (*StandardsSubscription, error)public StandardsSubscription(string name, StandardsSubscriptionArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args StandardsSubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args StandardsSubscriptionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StandardsSubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
StandardsSubscription Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The StandardsSubscription resource accepts the following input properties:
- Standards
Arn string The ARN of a standard - see below.
- Standards
Arn string The ARN of a standard - see below.
- standards
Arn string The ARN of a standard - see below.
- standards_
arn str The ARN of a standard - see below.
Outputs
All input properties are implicitly available as output properties. Additionally, the StandardsSubscription resource produces the following output properties:
Look up an Existing StandardsSubscription Resource
Get an existing StandardsSubscription 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?: StandardsSubscriptionState, opts?: CustomResourceOptions): StandardsSubscriptionstatic get(resource_name, id, opts=None, standards_arn=None, __props__=None);func GetStandardsSubscription(ctx *Context, name string, id IDInput, state *StandardsSubscriptionState, opts ...ResourceOption) (*StandardsSubscription, error)public static StandardsSubscription Get(string name, Input<string> id, StandardsSubscriptionState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Standards
Arn string The ARN of a standard - see below.
- Standards
Arn string The ARN of a standard - see below.
- standards
Arn string The ARN of a standard - see below.
- standards_
arn str The ARN of a standard - see below.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.