1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. threatdetection
  5. HoneypotPreset
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.threatdetection.HoneypotPreset

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    Provides a Threat Detection Honeypot Preset resource.

    For information about Threat Detection Honeypot Preset and how to use it, see What is Honeypot Preset.

    NOTE: Available since v1.195.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tfexample";
    const defaultHoneypotImages = alicloud.threatdetection.getHoneypotImages({
        nameRegex: "^ruoyi",
    });
    const defaultHoneypotNode = new alicloud.threatdetection.HoneypotNode("defaultHoneypotNode", {
        nodeName: name,
        availableProbeNum: 20,
        securityGroupProbeIpLists: ["0.0.0.0/0"],
    });
    const defaultHoneypotPreset = new alicloud.threatdetection.HoneypotPreset("defaultHoneypotPreset", {
        presetName: name,
        nodeId: defaultHoneypotNode.id,
        honeypotImageName: defaultHoneypotImages.then(defaultHoneypotImages => defaultHoneypotImages.images?.[0]?.honeypotImageName),
        meta: {
            portraitOption: true,
            burp: "open",
        },
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tfexample"
    default_honeypot_images = alicloud.threatdetection.get_honeypot_images(name_regex="^ruoyi")
    default_honeypot_node = alicloud.threatdetection.HoneypotNode("defaultHoneypotNode",
        node_name=name,
        available_probe_num=20,
        security_group_probe_ip_lists=["0.0.0.0/0"])
    default_honeypot_preset = alicloud.threatdetection.HoneypotPreset("defaultHoneypotPreset",
        preset_name=name,
        node_id=default_honeypot_node.id,
        honeypot_image_name=default_honeypot_images.images[0].honeypot_image_name,
        meta=alicloud.threatdetection.HoneypotPresetMetaArgs(
            portrait_option=True,
            burp="open",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/threatdetection"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tfexample"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		defaultHoneypotImages, err := threatdetection.GetHoneypotImages(ctx, &threatdetection.GetHoneypotImagesArgs{
    			NameRegex: pulumi.StringRef("^ruoyi"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultHoneypotNode, err := threatdetection.NewHoneypotNode(ctx, "defaultHoneypotNode", &threatdetection.HoneypotNodeArgs{
    			NodeName:          pulumi.String(name),
    			AvailableProbeNum: pulumi.Int(20),
    			SecurityGroupProbeIpLists: pulumi.StringArray{
    				pulumi.String("0.0.0.0/0"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = threatdetection.NewHoneypotPreset(ctx, "defaultHoneypotPreset", &threatdetection.HoneypotPresetArgs{
    			PresetName:        pulumi.String(name),
    			NodeId:            defaultHoneypotNode.ID(),
    			HoneypotImageName: pulumi.String(defaultHoneypotImages.Images[0].HoneypotImageName),
    			Meta: &threatdetection.HoneypotPresetMetaArgs{
    				PortraitOption: pulumi.Bool(true),
    				Burp:           pulumi.String("open"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tfexample";
        var defaultHoneypotImages = AliCloud.ThreatDetection.GetHoneypotImages.Invoke(new()
        {
            NameRegex = "^ruoyi",
        });
    
        var defaultHoneypotNode = new AliCloud.ThreatDetection.HoneypotNode("defaultHoneypotNode", new()
        {
            NodeName = name,
            AvailableProbeNum = 20,
            SecurityGroupProbeIpLists = new[]
            {
                "0.0.0.0/0",
            },
        });
    
        var defaultHoneypotPreset = new AliCloud.ThreatDetection.HoneypotPreset("defaultHoneypotPreset", new()
        {
            PresetName = name,
            NodeId = defaultHoneypotNode.Id,
            HoneypotImageName = defaultHoneypotImages.Apply(getHoneypotImagesResult => getHoneypotImagesResult.Images[0]?.HoneypotImageName),
            Meta = new AliCloud.ThreatDetection.Inputs.HoneypotPresetMetaArgs
            {
                PortraitOption = true,
                Burp = "open",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.threatdetection.ThreatdetectionFunctions;
    import com.pulumi.alicloud.threatdetection.inputs.GetHoneypotImagesArgs;
    import com.pulumi.alicloud.threatdetection.HoneypotNode;
    import com.pulumi.alicloud.threatdetection.HoneypotNodeArgs;
    import com.pulumi.alicloud.threatdetection.HoneypotPreset;
    import com.pulumi.alicloud.threatdetection.HoneypotPresetArgs;
    import com.pulumi.alicloud.threatdetection.inputs.HoneypotPresetMetaArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tfexample");
            final var defaultHoneypotImages = ThreatdetectionFunctions.getHoneypotImages(GetHoneypotImagesArgs.builder()
                .nameRegex("^ruoyi")
                .build());
    
            var defaultHoneypotNode = new HoneypotNode("defaultHoneypotNode", HoneypotNodeArgs.builder()        
                .nodeName(name)
                .availableProbeNum(20)
                .securityGroupProbeIpLists("0.0.0.0/0")
                .build());
    
            var defaultHoneypotPreset = new HoneypotPreset("defaultHoneypotPreset", HoneypotPresetArgs.builder()        
                .presetName(name)
                .nodeId(defaultHoneypotNode.id())
                .honeypotImageName(defaultHoneypotImages.applyValue(getHoneypotImagesResult -> getHoneypotImagesResult.images()[0].honeypotImageName()))
                .meta(HoneypotPresetMetaArgs.builder()
                    .portraitOption(true)
                    .burp("open")
                    .build())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tfexample
    resources:
      defaultHoneypotNode:
        type: alicloud:threatdetection:HoneypotNode
        properties:
          nodeName: ${name}
          availableProbeNum: 20
          securityGroupProbeIpLists:
            - 0.0.0.0/0
      defaultHoneypotPreset:
        type: alicloud:threatdetection:HoneypotPreset
        properties:
          presetName: ${name}
          nodeId: ${defaultHoneypotNode.id}
          honeypotImageName: ${defaultHoneypotImages.images[0].honeypotImageName}
          meta:
            portraitOption: true
            burp: open
    variables:
      defaultHoneypotImages:
        fn::invoke:
          Function: alicloud:threatdetection:getHoneypotImages
          Arguments:
            nameRegex: ^ruoyi
    

    Create HoneypotPreset Resource

    new HoneypotPreset(name: string, args: HoneypotPresetArgs, opts?: CustomResourceOptions);
    @overload
    def HoneypotPreset(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       honeypot_image_name: Optional[str] = None,
                       meta: Optional[HoneypotPresetMetaArgs] = None,
                       node_id: Optional[str] = None,
                       preset_name: Optional[str] = None)
    @overload
    def HoneypotPreset(resource_name: str,
                       args: HoneypotPresetArgs,
                       opts: Optional[ResourceOptions] = None)
    func NewHoneypotPreset(ctx *Context, name string, args HoneypotPresetArgs, opts ...ResourceOption) (*HoneypotPreset, error)
    public HoneypotPreset(string name, HoneypotPresetArgs args, CustomResourceOptions? opts = null)
    public HoneypotPreset(String name, HoneypotPresetArgs args)
    public HoneypotPreset(String name, HoneypotPresetArgs args, CustomResourceOptions options)
    
    type: alicloud:threatdetection:HoneypotPreset
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args HoneypotPresetArgs
    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 HoneypotPresetArgs
    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 HoneypotPresetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args HoneypotPresetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args HoneypotPresetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    HoneypotPreset Resource Properties

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

    Inputs

    The HoneypotPreset resource accepts the following input properties:

    HoneypotImageName string
    Honeypot mirror name
    Meta Pulumi.AliCloud.ThreatDetection.Inputs.HoneypotPresetMeta
    Honeypot template custom parameters. See meta below.
    NodeId string
    Unique id of management node
    PresetName string
    Honeypot template custom name
    HoneypotImageName string
    Honeypot mirror name
    Meta HoneypotPresetMetaArgs
    Honeypot template custom parameters. See meta below.
    NodeId string
    Unique id of management node
    PresetName string
    Honeypot template custom name
    honeypotImageName String
    Honeypot mirror name
    meta HoneypotPresetMeta
    Honeypot template custom parameters. See meta below.
    nodeId String
    Unique id of management node
    presetName String
    Honeypot template custom name
    honeypotImageName string
    Honeypot mirror name
    meta HoneypotPresetMeta
    Honeypot template custom parameters. See meta below.
    nodeId string
    Unique id of management node
    presetName string
    Honeypot template custom name
    honeypot_image_name str
    Honeypot mirror name
    meta HoneypotPresetMetaArgs
    Honeypot template custom parameters. See meta below.
    node_id str
    Unique id of management node
    preset_name str
    Honeypot template custom name
    honeypotImageName String
    Honeypot mirror name
    meta Property Map
    Honeypot template custom parameters. See meta below.
    nodeId String
    Unique id of management node
    presetName String
    Honeypot template custom name

    Outputs

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

    HoneypotPresetId string
    Unique ID of honeypot Template
    Id string
    The provider-assigned unique ID for this managed resource.
    HoneypotPresetId string
    Unique ID of honeypot Template
    Id string
    The provider-assigned unique ID for this managed resource.
    honeypotPresetId String
    Unique ID of honeypot Template
    id String
    The provider-assigned unique ID for this managed resource.
    honeypotPresetId string
    Unique ID of honeypot Template
    id string
    The provider-assigned unique ID for this managed resource.
    honeypot_preset_id str
    Unique ID of honeypot Template
    id str
    The provider-assigned unique ID for this managed resource.
    honeypotPresetId String
    Unique ID of honeypot Template
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing HoneypotPreset Resource

    Get an existing HoneypotPreset 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?: HoneypotPresetState, opts?: CustomResourceOptions): HoneypotPreset
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            honeypot_image_name: Optional[str] = None,
            honeypot_preset_id: Optional[str] = None,
            meta: Optional[HoneypotPresetMetaArgs] = None,
            node_id: Optional[str] = None,
            preset_name: Optional[str] = None) -> HoneypotPreset
    func GetHoneypotPreset(ctx *Context, name string, id IDInput, state *HoneypotPresetState, opts ...ResourceOption) (*HoneypotPreset, error)
    public static HoneypotPreset Get(string name, Input<string> id, HoneypotPresetState? state, CustomResourceOptions? opts = null)
    public static HoneypotPreset get(String name, Output<String> id, HoneypotPresetState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    HoneypotImageName string
    Honeypot mirror name
    HoneypotPresetId string
    Unique ID of honeypot Template
    Meta Pulumi.AliCloud.ThreatDetection.Inputs.HoneypotPresetMeta
    Honeypot template custom parameters. See meta below.
    NodeId string
    Unique id of management node
    PresetName string
    Honeypot template custom name
    HoneypotImageName string
    Honeypot mirror name
    HoneypotPresetId string
    Unique ID of honeypot Template
    Meta HoneypotPresetMetaArgs
    Honeypot template custom parameters. See meta below.
    NodeId string
    Unique id of management node
    PresetName string
    Honeypot template custom name
    honeypotImageName String
    Honeypot mirror name
    honeypotPresetId String
    Unique ID of honeypot Template
    meta HoneypotPresetMeta
    Honeypot template custom parameters. See meta below.
    nodeId String
    Unique id of management node
    presetName String
    Honeypot template custom name
    honeypotImageName string
    Honeypot mirror name
    honeypotPresetId string
    Unique ID of honeypot Template
    meta HoneypotPresetMeta
    Honeypot template custom parameters. See meta below.
    nodeId string
    Unique id of management node
    presetName string
    Honeypot template custom name
    honeypot_image_name str
    Honeypot mirror name
    honeypot_preset_id str
    Unique ID of honeypot Template
    meta HoneypotPresetMetaArgs
    Honeypot template custom parameters. See meta below.
    node_id str
    Unique id of management node
    preset_name str
    Honeypot template custom name
    honeypotImageName String
    Honeypot mirror name
    honeypotPresetId String
    Unique ID of honeypot Template
    meta Property Map
    Honeypot template custom parameters. See meta below.
    nodeId String
    Unique id of management node
    presetName String
    Honeypot template custom name

    Supporting Types

    HoneypotPresetMeta, HoneypotPresetMetaArgs

    Burp string
    Burp counter.
    PortraitOption bool
    Social traceability.
    TrojanGit string
    Git countered.
    Burp string
    Burp counter.
    PortraitOption bool
    Social traceability.
    TrojanGit string
    Git countered.
    burp String
    Burp counter.
    portraitOption Boolean
    Social traceability.
    trojanGit String
    Git countered.
    burp string
    Burp counter.
    portraitOption boolean
    Social traceability.
    trojanGit string
    Git countered.
    burp str
    Burp counter.
    portrait_option bool
    Social traceability.
    trojan_git str
    Git countered.
    burp String
    Burp counter.
    portraitOption Boolean
    Social traceability.
    trojanGit String
    Git countered.

    Import

    Threat Detection Honeypot Preset can be imported using the id, e.g.

    $ pulumi import alicloud:threatdetection/honeypotPreset:HoneypotPreset example <id>
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi