aws.securityhub.StandardsControlAssociation
Explore with Pulumi AI
Example Usage
Basic usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.securityhub.Account("example", {});
const cisAwsFoundationsBenchmark = new aws.securityhub.StandardsSubscription("cis_aws_foundations_benchmark", {standardsArn: "arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0"}, {
    dependsOn: [example],
});
const cisAwsFoundationsBenchmarkDisableIam1 = new aws.securityhub.StandardsControlAssociation("cis_aws_foundations_benchmark_disable_iam_1", {
    standardsArn: cisAwsFoundationsBenchmark.standardsArn,
    securityControlId: "IAM.1",
    associationStatus: "DISABLED",
    updatedReason: "Not needed",
});
import pulumi
import pulumi_aws as aws
example = aws.securityhub.Account("example")
cis_aws_foundations_benchmark = aws.securityhub.StandardsSubscription("cis_aws_foundations_benchmark", standards_arn="arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0",
opts = pulumi.ResourceOptions(depends_on=[example]))
cis_aws_foundations_benchmark_disable_iam1 = aws.securityhub.StandardsControlAssociation("cis_aws_foundations_benchmark_disable_iam_1",
    standards_arn=cis_aws_foundations_benchmark.standards_arn,
    security_control_id="IAM.1",
    association_status="DISABLED",
    updated_reason="Not needed")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securityhub"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := securityhub.NewAccount(ctx, "example", nil)
		if err != nil {
			return err
		}
		cisAwsFoundationsBenchmark, err := securityhub.NewStandardsSubscription(ctx, "cis_aws_foundations_benchmark", &securityhub.StandardsSubscriptionArgs{
			StandardsArn: pulumi.String("arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0"),
		}, pulumi.DependsOn([]pulumi.Resource{
			example,
		}))
		if err != nil {
			return err
		}
		_, err = securityhub.NewStandardsControlAssociation(ctx, "cis_aws_foundations_benchmark_disable_iam_1", &securityhub.StandardsControlAssociationArgs{
			StandardsArn:      cisAwsFoundationsBenchmark.StandardsArn,
			SecurityControlId: pulumi.String("IAM.1"),
			AssociationStatus: pulumi.String("DISABLED"),
			UpdatedReason:     pulumi.String("Not needed"),
		})
		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.Account("example");
    var cisAwsFoundationsBenchmark = new Aws.SecurityHub.StandardsSubscription("cis_aws_foundations_benchmark", new()
    {
        StandardsArn = "arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            example,
        },
    });
    var cisAwsFoundationsBenchmarkDisableIam1 = new Aws.SecurityHub.StandardsControlAssociation("cis_aws_foundations_benchmark_disable_iam_1", new()
    {
        StandardsArn = cisAwsFoundationsBenchmark.StandardsArn,
        SecurityControlId = "IAM.1",
        AssociationStatus = "DISABLED",
        UpdatedReason = "Not needed",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.securityhub.Account;
import com.pulumi.aws.securityhub.StandardsSubscription;
import com.pulumi.aws.securityhub.StandardsSubscriptionArgs;
import com.pulumi.aws.securityhub.StandardsControlAssociation;
import com.pulumi.aws.securityhub.StandardsControlAssociationArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
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 Account("example");
        var cisAwsFoundationsBenchmark = new StandardsSubscription("cisAwsFoundationsBenchmark", StandardsSubscriptionArgs.builder()
            .standardsArn("arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0")
            .build(), CustomResourceOptions.builder()
                .dependsOn(example)
                .build());
        var cisAwsFoundationsBenchmarkDisableIam1 = new StandardsControlAssociation("cisAwsFoundationsBenchmarkDisableIam1", StandardsControlAssociationArgs.builder()
            .standardsArn(cisAwsFoundationsBenchmark.standardsArn())
            .securityControlId("IAM.1")
            .associationStatus("DISABLED")
            .updatedReason("Not needed")
            .build());
    }
}
resources:
  example:
    type: aws:securityhub:Account
  cisAwsFoundationsBenchmark:
    type: aws:securityhub:StandardsSubscription
    name: cis_aws_foundations_benchmark
    properties:
      standardsArn: arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0
    options:
      dependsOn:
        - ${example}
  cisAwsFoundationsBenchmarkDisableIam1:
    type: aws:securityhub:StandardsControlAssociation
    name: cis_aws_foundations_benchmark_disable_iam_1
    properties:
      standardsArn: ${cisAwsFoundationsBenchmark.standardsArn}
      securityControlId: IAM.1
      associationStatus: DISABLED
      updatedReason: Not needed
Create StandardsControlAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new StandardsControlAssociation(name: string, args: StandardsControlAssociationArgs, opts?: CustomResourceOptions);@overload
def StandardsControlAssociation(resource_name: str,
                                args: StandardsControlAssociationArgs,
                                opts: Optional[ResourceOptions] = None)
@overload
def StandardsControlAssociation(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                association_status: Optional[str] = None,
                                security_control_id: Optional[str] = None,
                                standards_arn: Optional[str] = None,
                                updated_reason: Optional[str] = None)func NewStandardsControlAssociation(ctx *Context, name string, args StandardsControlAssociationArgs, opts ...ResourceOption) (*StandardsControlAssociation, error)public StandardsControlAssociation(string name, StandardsControlAssociationArgs args, CustomResourceOptions? opts = null)
public StandardsControlAssociation(String name, StandardsControlAssociationArgs args)
public StandardsControlAssociation(String name, StandardsControlAssociationArgs args, CustomResourceOptions options)
type: aws:securityhub:StandardsControlAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args StandardsControlAssociationArgs
- 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 StandardsControlAssociationArgs
- 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 StandardsControlAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StandardsControlAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StandardsControlAssociationArgs
- 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 standardsControlAssociationResource = new Aws.SecurityHub.StandardsControlAssociation("standardsControlAssociationResource", new()
{
    AssociationStatus = "string",
    SecurityControlId = "string",
    StandardsArn = "string",
    UpdatedReason = "string",
});
example, err := securityhub.NewStandardsControlAssociation(ctx, "standardsControlAssociationResource", &securityhub.StandardsControlAssociationArgs{
	AssociationStatus: pulumi.String("string"),
	SecurityControlId: pulumi.String("string"),
	StandardsArn:      pulumi.String("string"),
	UpdatedReason:     pulumi.String("string"),
})
var standardsControlAssociationResource = new StandardsControlAssociation("standardsControlAssociationResource", StandardsControlAssociationArgs.builder()
    .associationStatus("string")
    .securityControlId("string")
    .standardsArn("string")
    .updatedReason("string")
    .build());
standards_control_association_resource = aws.securityhub.StandardsControlAssociation("standardsControlAssociationResource",
    association_status="string",
    security_control_id="string",
    standards_arn="string",
    updated_reason="string")
const standardsControlAssociationResource = new aws.securityhub.StandardsControlAssociation("standardsControlAssociationResource", {
    associationStatus: "string",
    securityControlId: "string",
    standardsArn: "string",
    updatedReason: "string",
});
type: aws:securityhub:StandardsControlAssociation
properties:
    associationStatus: string
    securityControlId: string
    standardsArn: string
    updatedReason: string
StandardsControlAssociation 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 StandardsControlAssociation resource accepts the following input properties:
- AssociationStatus string
- The desired enablement status of the control in the standard. Valid values: ENABLED,DISABLED.
- SecurityControl stringId 
- The unique identifier for the security control whose enablement status you want to update.
- StandardsArn string
- The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status. - The following arguments are optional: 
- UpdatedReason string
- The reason for updating the control's enablement status in the standard. Required when association_statusisDISABLED.
- AssociationStatus string
- The desired enablement status of the control in the standard. Valid values: ENABLED,DISABLED.
- SecurityControl stringId 
- The unique identifier for the security control whose enablement status you want to update.
- StandardsArn string
- The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status. - The following arguments are optional: 
- UpdatedReason string
- The reason for updating the control's enablement status in the standard. Required when association_statusisDISABLED.
- associationStatus String
- The desired enablement status of the control in the standard. Valid values: ENABLED,DISABLED.
- securityControl StringId 
- The unique identifier for the security control whose enablement status you want to update.
- standardsArn String
- The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status. - The following arguments are optional: 
- updatedReason String
- The reason for updating the control's enablement status in the standard. Required when association_statusisDISABLED.
- associationStatus string
- The desired enablement status of the control in the standard. Valid values: ENABLED,DISABLED.
- securityControl stringId 
- The unique identifier for the security control whose enablement status you want to update.
- standardsArn string
- The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status. - The following arguments are optional: 
- updatedReason string
- The reason for updating the control's enablement status in the standard. Required when association_statusisDISABLED.
- association_status str
- The desired enablement status of the control in the standard. Valid values: ENABLED,DISABLED.
- security_control_ strid 
- The unique identifier for the security control whose enablement status you want to update.
- standards_arn str
- The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status. - The following arguments are optional: 
- updated_reason str
- The reason for updating the control's enablement status in the standard. Required when association_statusisDISABLED.
- associationStatus String
- The desired enablement status of the control in the standard. Valid values: ENABLED,DISABLED.
- securityControl StringId 
- The unique identifier for the security control whose enablement status you want to update.
- standardsArn String
- The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status. - The following arguments are optional: 
- updatedReason String
- The reason for updating the control's enablement status in the standard. Required when association_statusisDISABLED.
Outputs
All input properties are implicitly available as output properties. Additionally, the StandardsControlAssociation 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 str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing StandardsControlAssociation Resource
Get an existing StandardsControlAssociation 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?: StandardsControlAssociationState, opts?: CustomResourceOptions): StandardsControlAssociation@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        association_status: Optional[str] = None,
        security_control_id: Optional[str] = None,
        standards_arn: Optional[str] = None,
        updated_reason: Optional[str] = None) -> StandardsControlAssociationfunc GetStandardsControlAssociation(ctx *Context, name string, id IDInput, state *StandardsControlAssociationState, opts ...ResourceOption) (*StandardsControlAssociation, error)public static StandardsControlAssociation Get(string name, Input<string> id, StandardsControlAssociationState? state, CustomResourceOptions? opts = null)public static StandardsControlAssociation get(String name, Output<String> id, StandardsControlAssociationState state, CustomResourceOptions options)resources:  _:    type: aws:securityhub:StandardsControlAssociation    get:      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.
- AssociationStatus string
- The desired enablement status of the control in the standard. Valid values: ENABLED,DISABLED.
- SecurityControl stringId 
- The unique identifier for the security control whose enablement status you want to update.
- StandardsArn string
- The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status. - The following arguments are optional: 
- UpdatedReason string
- The reason for updating the control's enablement status in the standard. Required when association_statusisDISABLED.
- AssociationStatus string
- The desired enablement status of the control in the standard. Valid values: ENABLED,DISABLED.
- SecurityControl stringId 
- The unique identifier for the security control whose enablement status you want to update.
- StandardsArn string
- The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status. - The following arguments are optional: 
- UpdatedReason string
- The reason for updating the control's enablement status in the standard. Required when association_statusisDISABLED.
- associationStatus String
- The desired enablement status of the control in the standard. Valid values: ENABLED,DISABLED.
- securityControl StringId 
- The unique identifier for the security control whose enablement status you want to update.
- standardsArn String
- The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status. - The following arguments are optional: 
- updatedReason String
- The reason for updating the control's enablement status in the standard. Required when association_statusisDISABLED.
- associationStatus string
- The desired enablement status of the control in the standard. Valid values: ENABLED,DISABLED.
- securityControl stringId 
- The unique identifier for the security control whose enablement status you want to update.
- standardsArn string
- The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status. - The following arguments are optional: 
- updatedReason string
- The reason for updating the control's enablement status in the standard. Required when association_statusisDISABLED.
- association_status str
- The desired enablement status of the control in the standard. Valid values: ENABLED,DISABLED.
- security_control_ strid 
- The unique identifier for the security control whose enablement status you want to update.
- standards_arn str
- The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status. - The following arguments are optional: 
- updated_reason str
- The reason for updating the control's enablement status in the standard. Required when association_statusisDISABLED.
- associationStatus String
- The desired enablement status of the control in the standard. Valid values: ENABLED,DISABLED.
- securityControl StringId 
- The unique identifier for the security control whose enablement status you want to update.
- standardsArn String
- The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status. - The following arguments are optional: 
- updatedReason String
- The reason for updating the control's enablement status in the standard. Required when association_statusisDISABLED.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.