ThreatIntelSet

Provides a resource to manage a GuardDuty ThreatIntelSet.

Note: Currently in GuardDuty, users from member accounts cannot upload and further manage ThreatIntelSets. ThreatIntelSets that are uploaded by the master account are imposed on GuardDuty functionality in its member accounts. See the GuardDuty API Documentation

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var master = new Aws.GuardDuty.Detector("master", new Aws.GuardDuty.DetectorArgs
        {
            Enable = true,
        });
        var bucket = new Aws.S3.Bucket("bucket", new Aws.S3.BucketArgs
        {
            Acl = "private",
        });
        var myThreatIntelSetBucketObject = new Aws.S3.BucketObject("myThreatIntelSetBucketObject", new Aws.S3.BucketObjectArgs
        {
            Acl = "public-read",
            Bucket = bucket.Id,
            Content = @"10.0.0.0/8

",
            Key = "MyThreatIntelSet",
        });
        var myThreatIntelSetThreatIntelSet = new Aws.GuardDuty.ThreatIntelSet("myThreatIntelSetThreatIntelSet", new Aws.GuardDuty.ThreatIntelSetArgs
        {
            Activate = true,
            DetectorId = master.Id,
            Format = "TXT",
            Location = Output.Tuple(myThreatIntelSetBucketObject.Bucket, myThreatIntelSetBucketObject.Key).Apply(values =>
            {
                var bucket = values.Item1;
                var key = values.Item2;
                return $"https://s3.amazonaws.com/{bucket}/{key}";
            }),
        });
    }

}
package main

import (
    "fmt"

    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/guardduty"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/s3"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        master, err := guardduty.NewDetector(ctx, "master", &guardduty.DetectorArgs{
            Enable: pulumi.Bool(true),
        })
        if err != nil {
            return err
        }
        bucket, err := s3.NewBucket(ctx, "bucket", &s3.BucketArgs{
            Acl: pulumi.String("private"),
        })
        if err != nil {
            return err
        }
        myThreatIntelSetBucketObject, err := s3.NewBucketObject(ctx, "myThreatIntelSetBucketObject", &s3.BucketObjectArgs{
            Acl:     pulumi.String("public-read"),
            Bucket:  bucket.ID(),
            Content: pulumi.String(fmt.Sprintf("%v%v", "10.0.0.0/8\n", "\n")),
            Key:     pulumi.String("MyThreatIntelSet"),
        })
        if err != nil {
            return err
        }
        _, err = guardduty.NewThreatIntelSet(ctx, "myThreatIntelSetThreatIntelSet", &guardduty.ThreatIntelSetArgs{
            Activate:   pulumi.Bool(true),
            DetectorId: master.ID(),
            Format:     pulumi.String("TXT"),
            Location: pulumi.All(myThreatIntelSetBucketObject.Bucket, myThreatIntelSetBucketObject.Key).ApplyT(func(_args []interface{}) (string, error) {
                bucket := _args[0].(string)
                key := _args[1].(string)
                return fmt.Sprintf("%v%v%v%v", "https://s3.amazonaws.com/", bucket, "/", key), nil
            }).(pulumi.StringOutput),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

master = aws.guardduty.Detector("master", enable=True)
bucket = aws.s3.Bucket("bucket", acl="private")
my_threat_intel_set_bucket_object = aws.s3.BucketObject("myThreatIntelSetBucketObject",
    acl="public-read",
    bucket=bucket.id,
    content="""10.0.0.0/8

""",
    key="MyThreatIntelSet")
my_threat_intel_set_threat_intel_set = aws.guardduty.ThreatIntelSet("myThreatIntelSetThreatIntelSet",
    activate=True,
    detector_id=master.id,
    format="TXT",
    location=pulumi.Output.all(my_threat_intel_set_bucket_object.bucket, my_threat_intel_set_bucket_object.key).apply(lambda bucket, key: f"https://s3.amazonaws.com/{bucket}/{key}"))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const master = new aws.guardduty.Detector("master", {
    enable: true,
});
const bucket = new aws.s3.Bucket("bucket", {
    acl: "private",
});
const myThreatIntelSetBucketObject = new aws.s3.BucketObject("MyThreatIntelSet", {
    acl: "public-read",
    bucket: bucket.id,
    content: "10.0.0.0/8\n",
    key: "MyThreatIntelSet",
});
const myThreatIntelSetThreatIntelSet = new aws.guardduty.ThreatIntelSet("MyThreatIntelSet", {
    activate: true,
    detectorId: master.id,
    format: "TXT",
    location: pulumi.interpolate`https://s3.amazonaws.com/${myThreatIntelSetBucketObject.bucket}/${myThreatIntelSetBucketObject.key}`,
});

Create a ThreatIntelSet Resource

def ThreatIntelSet(resource_name, opts=None, activate=None, detector_id=None, format=None, location=None, name=None, tags=None, __props__=None);
name string
The unique name of the resource.
args ThreatIntelSetArgs
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 ThreatIntelSetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ThreatIntelSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ThreatIntelSet Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ThreatIntelSet resource accepts the following input properties:

Activate bool

Specifies whether GuardDuty is to start using the uploaded ThreatIntelSet.

DetectorId string

The detector ID of the GuardDuty.

Format string

The format of the file that contains the ThreatIntelSet. Valid values: TXT | STIX | OTX_CSV | ALIEN_VAULT | PROOF_POINT | FIRE_EYE

Location string

The URI of the file that contains the ThreatIntelSet.

Name string

The friendly name to identify the ThreatIntelSet.

Tags Dictionary<string, string>

Key-value map of resource tags.

Activate bool

Specifies whether GuardDuty is to start using the uploaded ThreatIntelSet.

DetectorId string

The detector ID of the GuardDuty.

Format string

The format of the file that contains the ThreatIntelSet. Valid values: TXT | STIX | OTX_CSV | ALIEN_VAULT | PROOF_POINT | FIRE_EYE

Location string

The URI of the file that contains the ThreatIntelSet.

Name string

The friendly name to identify the ThreatIntelSet.

Tags map[string]string

Key-value map of resource tags.

activate boolean

Specifies whether GuardDuty is to start using the uploaded ThreatIntelSet.

detectorId string

The detector ID of the GuardDuty.

format string

The format of the file that contains the ThreatIntelSet. Valid values: TXT | STIX | OTX_CSV | ALIEN_VAULT | PROOF_POINT | FIRE_EYE

location string

The URI of the file that contains the ThreatIntelSet.

name string

The friendly name to identify the ThreatIntelSet.

tags {[key: string]: string}

Key-value map of resource tags.

activate bool

Specifies whether GuardDuty is to start using the uploaded ThreatIntelSet.

detector_id str

The detector ID of the GuardDuty.

format str

The format of the file that contains the ThreatIntelSet. Valid values: TXT | STIX | OTX_CSV | ALIEN_VAULT | PROOF_POINT | FIRE_EYE

location str

The URI of the file that contains the ThreatIntelSet.

name str

The friendly name to identify the ThreatIntelSet.

tags Dict[str, str]

Key-value map of resource tags.

Outputs

All input properties are implicitly available as output properties. Additionally, the ThreatIntelSet resource produces the following output properties:

Arn string

Amazon Resource Name (ARN) of the GuardDuty ThreatIntelSet.

Id string
The provider-assigned unique ID for this managed resource.
Arn string

Amazon Resource Name (ARN) of the GuardDuty ThreatIntelSet.

Id string
The provider-assigned unique ID for this managed resource.
arn string

Amazon Resource Name (ARN) of the GuardDuty ThreatIntelSet.

id string
The provider-assigned unique ID for this managed resource.
arn str

Amazon Resource Name (ARN) of the GuardDuty ThreatIntelSet.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ThreatIntelSet Resource

Get an existing ThreatIntelSet 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?: ThreatIntelSetState, opts?: CustomResourceOptions): ThreatIntelSet
static get(resource_name, id, opts=None, activate=None, arn=None, detector_id=None, format=None, location=None, name=None, tags=None, __props__=None);
func GetThreatIntelSet(ctx *Context, name string, id IDInput, state *ThreatIntelSetState, opts ...ResourceOption) (*ThreatIntelSet, error)
public static ThreatIntelSet Get(string name, Input<string> id, ThreatIntelSetState? 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:

Activate bool

Specifies whether GuardDuty is to start using the uploaded ThreatIntelSet.

Arn string

Amazon Resource Name (ARN) of the GuardDuty ThreatIntelSet.

DetectorId string

The detector ID of the GuardDuty.

Format string

The format of the file that contains the ThreatIntelSet. Valid values: TXT | STIX | OTX_CSV | ALIEN_VAULT | PROOF_POINT | FIRE_EYE

Location string

The URI of the file that contains the ThreatIntelSet.

Name string

The friendly name to identify the ThreatIntelSet.

Tags Dictionary<string, string>

Key-value map of resource tags.

Activate bool

Specifies whether GuardDuty is to start using the uploaded ThreatIntelSet.

Arn string

Amazon Resource Name (ARN) of the GuardDuty ThreatIntelSet.

DetectorId string

The detector ID of the GuardDuty.

Format string

The format of the file that contains the ThreatIntelSet. Valid values: TXT | STIX | OTX_CSV | ALIEN_VAULT | PROOF_POINT | FIRE_EYE

Location string

The URI of the file that contains the ThreatIntelSet.

Name string

The friendly name to identify the ThreatIntelSet.

Tags map[string]string

Key-value map of resource tags.

activate boolean

Specifies whether GuardDuty is to start using the uploaded ThreatIntelSet.

arn string

Amazon Resource Name (ARN) of the GuardDuty ThreatIntelSet.

detectorId string

The detector ID of the GuardDuty.

format string

The format of the file that contains the ThreatIntelSet. Valid values: TXT | STIX | OTX_CSV | ALIEN_VAULT | PROOF_POINT | FIRE_EYE

location string

The URI of the file that contains the ThreatIntelSet.

name string

The friendly name to identify the ThreatIntelSet.

tags {[key: string]: string}

Key-value map of resource tags.

activate bool

Specifies whether GuardDuty is to start using the uploaded ThreatIntelSet.

arn str

Amazon Resource Name (ARN) of the GuardDuty ThreatIntelSet.

detector_id str

The detector ID of the GuardDuty.

format str

The format of the file that contains the ThreatIntelSet. Valid values: TXT | STIX | OTX_CSV | ALIEN_VAULT | PROOF_POINT | FIRE_EYE

location str

The URI of the file that contains the ThreatIntelSet.

name str

The friendly name to identify the ThreatIntelSet.

tags Dict[str, str]

Key-value map of resource tags.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.