alicloud.threatdetection.HoneyPot
Explore with Pulumi AI
Provides a Threat Detection Honey Pot resource.
For information about Threat Detection Honey Pot and how to use it, see What is Honey Pot.
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 default = alicloud.threatdetection.getHoneypotImages({
nameRegex: "^ruoyi",
});
const defaultHoneypotNode = new alicloud.threatdetection.HoneypotNode("default", {
nodeName: name,
availableProbeNum: 20,
securityGroupProbeIpLists: ["0.0.0.0/0"],
});
const defaultHoneyPot = new alicloud.threatdetection.HoneyPot("default", {
honeypotImageName: _default.then(_default => _default.images?.[0]?.honeypotImageName),
honeypotImageId: _default.then(_default => _default.images?.[0]?.honeypotImageId),
honeypotName: name,
nodeId: defaultHoneypotNode.id,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tfexample"
default = alicloud.threatdetection.get_honeypot_images(name_regex="^ruoyi")
default_honeypot_node = alicloud.threatdetection.HoneypotNode("default",
node_name=name,
available_probe_num=20,
security_group_probe_ip_lists=["0.0.0.0/0"])
default_honey_pot = alicloud.threatdetection.HoneyPot("default",
honeypot_image_name=default.images[0].honeypot_image_name,
honeypot_image_id=default.images[0].honeypot_image_id,
honeypot_name=name,
node_id=default_honeypot_node.id)
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
}
_default, err := threatdetection.GetHoneypotImages(ctx, &threatdetection.GetHoneypotImagesArgs{
NameRegex: pulumi.StringRef("^ruoyi"),
}, nil)
if err != nil {
return err
}
defaultHoneypotNode, err := threatdetection.NewHoneypotNode(ctx, "default", &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.NewHoneyPot(ctx, "default", &threatdetection.HoneyPotArgs{
HoneypotImageName: pulumi.String(_default.Images[0].HoneypotImageName),
HoneypotImageId: pulumi.String(_default.Images[0].HoneypotImageId),
HoneypotName: pulumi.String(name),
NodeId: defaultHoneypotNode.ID(),
})
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 @default = AliCloud.ThreatDetection.GetHoneypotImages.Invoke(new()
{
NameRegex = "^ruoyi",
});
var defaultHoneypotNode = new AliCloud.ThreatDetection.HoneypotNode("default", new()
{
NodeName = name,
AvailableProbeNum = 20,
SecurityGroupProbeIpLists = new[]
{
"0.0.0.0/0",
},
});
var defaultHoneyPot = new AliCloud.ThreatDetection.HoneyPot("default", new()
{
HoneypotImageName = @default.Apply(@default => @default.Apply(getHoneypotImagesResult => getHoneypotImagesResult.Images[0]?.HoneypotImageName)),
HoneypotImageId = @default.Apply(@default => @default.Apply(getHoneypotImagesResult => getHoneypotImagesResult.Images[0]?.HoneypotImageId)),
HoneypotName = name,
NodeId = defaultHoneypotNode.Id,
});
});
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.HoneyPot;
import com.pulumi.alicloud.threatdetection.HoneyPotArgs;
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 default = 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 defaultHoneyPot = new HoneyPot("defaultHoneyPot", HoneyPotArgs.builder()
.honeypotImageName(default_.images()[0].honeypotImageName())
.honeypotImageId(default_.images()[0].honeypotImageId())
.honeypotName(name)
.nodeId(defaultHoneypotNode.id())
.build());
}
}
configuration:
name:
type: string
default: tfexample
resources:
defaultHoneypotNode:
type: alicloud:threatdetection:HoneypotNode
name: default
properties:
nodeName: ${name}
availableProbeNum: 20
securityGroupProbeIpLists:
- 0.0.0.0/0
defaultHoneyPot:
type: alicloud:threatdetection:HoneyPot
name: default
properties:
honeypotImageName: ${default.images[0].honeypotImageName}
honeypotImageId: ${default.images[0].honeypotImageId}
honeypotName: ${name}
nodeId: ${defaultHoneypotNode.id}
variables:
default:
fn::invoke:
Function: alicloud:threatdetection:getHoneypotImages
Arguments:
nameRegex: ^ruoyi
Create HoneyPot Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new HoneyPot(name: string, args: HoneyPotArgs, opts?: CustomResourceOptions);
@overload
def HoneyPot(resource_name: str,
args: HoneyPotArgs,
opts: Optional[ResourceOptions] = None)
@overload
def HoneyPot(resource_name: str,
opts: Optional[ResourceOptions] = None,
honeypot_image_id: Optional[str] = None,
honeypot_image_name: Optional[str] = None,
honeypot_name: Optional[str] = None,
node_id: Optional[str] = None)
func NewHoneyPot(ctx *Context, name string, args HoneyPotArgs, opts ...ResourceOption) (*HoneyPot, error)
public HoneyPot(string name, HoneyPotArgs args, CustomResourceOptions? opts = null)
public HoneyPot(String name, HoneyPotArgs args)
public HoneyPot(String name, HoneyPotArgs args, CustomResourceOptions options)
type: alicloud:threatdetection:HoneyPot
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 HoneyPotArgs
- 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 HoneyPotArgs
- 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 HoneyPotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HoneyPotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HoneyPotArgs
- 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 honeyPotResource = new AliCloud.ThreatDetection.HoneyPot("honeyPotResource", new()
{
HoneypotImageId = "string",
HoneypotImageName = "string",
HoneypotName = "string",
NodeId = "string",
});
example, err := threatdetection.NewHoneyPot(ctx, "honeyPotResource", &threatdetection.HoneyPotArgs{
HoneypotImageId: pulumi.String("string"),
HoneypotImageName: pulumi.String("string"),
HoneypotName: pulumi.String("string"),
NodeId: pulumi.String("string"),
})
var honeyPotResource = new HoneyPot("honeyPotResource", HoneyPotArgs.builder()
.honeypotImageId("string")
.honeypotImageName("string")
.honeypotName("string")
.nodeId("string")
.build());
honey_pot_resource = alicloud.threatdetection.HoneyPot("honeyPotResource",
honeypot_image_id="string",
honeypot_image_name="string",
honeypot_name="string",
node_id="string")
const honeyPotResource = new alicloud.threatdetection.HoneyPot("honeyPotResource", {
honeypotImageId: "string",
honeypotImageName: "string",
honeypotName: "string",
nodeId: "string",
});
type: alicloud:threatdetection:HoneyPot
properties:
honeypotImageId: string
honeypotImageName: string
honeypotName: string
nodeId: string
HoneyPot 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 HoneyPot resource accepts the following input properties:
- Honeypot
Image stringId - The image ID of the honeypot.
- Honeypot
Image stringName - Honeypot mirror name.
- Honeypot
Name string - Honeypot custom name.
- Node
Id string - The ID of the honeypot management node.
- Honeypot
Image stringId - The image ID of the honeypot.
- Honeypot
Image stringName - Honeypot mirror name.
- Honeypot
Name string - Honeypot custom name.
- Node
Id string - The ID of the honeypot management node.
- honeypot
Image StringId - The image ID of the honeypot.
- honeypot
Image StringName - Honeypot mirror name.
- honeypot
Name String - Honeypot custom name.
- node
Id String - The ID of the honeypot management node.
- honeypot
Image stringId - The image ID of the honeypot.
- honeypot
Image stringName - Honeypot mirror name.
- honeypot
Name string - Honeypot custom name.
- node
Id string - The ID of the honeypot management node.
- honeypot_
image_ strid - The image ID of the honeypot.
- honeypot_
image_ strname - Honeypot mirror name.
- honeypot_
name str - Honeypot custom name.
- node_
id str - The ID of the honeypot management node.
- honeypot
Image StringId - The image ID of the honeypot.
- honeypot
Image StringName - Honeypot mirror name.
- honeypot
Name String - Honeypot custom name.
- node
Id String - The ID of the honeypot management node.
Outputs
All input properties are implicitly available as output properties. Additionally, the HoneyPot resource produces the following output properties:
- Honeypot
Id string - Honeypot ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Preset
Id string - The custom parameter ID of honeypot.
- States List<string>
- Honeypot status.
- Status string
- The status of the resource.
- Honeypot
Id string - Honeypot ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Preset
Id string - The custom parameter ID of honeypot.
- States []string
- Honeypot status.
- Status string
- The status of the resource.
- honeypot
Id String - Honeypot ID.
- id String
- The provider-assigned unique ID for this managed resource.
- preset
Id String - The custom parameter ID of honeypot.
- states List<String>
- Honeypot status.
- status String
- The status of the resource.
- honeypot
Id string - Honeypot ID.
- id string
- The provider-assigned unique ID for this managed resource.
- preset
Id string - The custom parameter ID of honeypot.
- states string[]
- Honeypot status.
- status string
- The status of the resource.
- honeypot_
id str - Honeypot ID.
- id str
- The provider-assigned unique ID for this managed resource.
- preset_
id str - The custom parameter ID of honeypot.
- states Sequence[str]
- Honeypot status.
- status str
- The status of the resource.
- honeypot
Id String - Honeypot ID.
- id String
- The provider-assigned unique ID for this managed resource.
- preset
Id String - The custom parameter ID of honeypot.
- states List<String>
- Honeypot status.
- status String
- The status of the resource.
Look up Existing HoneyPot Resource
Get an existing HoneyPot 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?: HoneyPotState, opts?: CustomResourceOptions): HoneyPot
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
honeypot_id: Optional[str] = None,
honeypot_image_id: Optional[str] = None,
honeypot_image_name: Optional[str] = None,
honeypot_name: Optional[str] = None,
node_id: Optional[str] = None,
preset_id: Optional[str] = None,
states: Optional[Sequence[str]] = None,
status: Optional[str] = None) -> HoneyPot
func GetHoneyPot(ctx *Context, name string, id IDInput, state *HoneyPotState, opts ...ResourceOption) (*HoneyPot, error)
public static HoneyPot Get(string name, Input<string> id, HoneyPotState? state, CustomResourceOptions? opts = null)
public static HoneyPot get(String name, Output<String> id, HoneyPotState 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.
- Honeypot
Id string - Honeypot ID.
- Honeypot
Image stringId - The image ID of the honeypot.
- Honeypot
Image stringName - Honeypot mirror name.
- Honeypot
Name string - Honeypot custom name.
- Node
Id string - The ID of the honeypot management node.
- Preset
Id string - The custom parameter ID of honeypot.
- States List<string>
- Honeypot status.
- Status string
- The status of the resource.
- Honeypot
Id string - Honeypot ID.
- Honeypot
Image stringId - The image ID of the honeypot.
- Honeypot
Image stringName - Honeypot mirror name.
- Honeypot
Name string - Honeypot custom name.
- Node
Id string - The ID of the honeypot management node.
- Preset
Id string - The custom parameter ID of honeypot.
- States []string
- Honeypot status.
- Status string
- The status of the resource.
- honeypot
Id String - Honeypot ID.
- honeypot
Image StringId - The image ID of the honeypot.
- honeypot
Image StringName - Honeypot mirror name.
- honeypot
Name String - Honeypot custom name.
- node
Id String - The ID of the honeypot management node.
- preset
Id String - The custom parameter ID of honeypot.
- states List<String>
- Honeypot status.
- status String
- The status of the resource.
- honeypot
Id string - Honeypot ID.
- honeypot
Image stringId - The image ID of the honeypot.
- honeypot
Image stringName - Honeypot mirror name.
- honeypot
Name string - Honeypot custom name.
- node
Id string - The ID of the honeypot management node.
- preset
Id string - The custom parameter ID of honeypot.
- states string[]
- Honeypot status.
- status string
- The status of the resource.
- honeypot_
id str - Honeypot ID.
- honeypot_
image_ strid - The image ID of the honeypot.
- honeypot_
image_ strname - Honeypot mirror name.
- honeypot_
name str - Honeypot custom name.
- node_
id str - The ID of the honeypot management node.
- preset_
id str - The custom parameter ID of honeypot.
- states Sequence[str]
- Honeypot status.
- status str
- The status of the resource.
- honeypot
Id String - Honeypot ID.
- honeypot
Image StringId - The image ID of the honeypot.
- honeypot
Image StringName - Honeypot mirror name.
- honeypot
Name String - Honeypot custom name.
- node
Id String - The ID of the honeypot management node.
- preset
Id String - The custom parameter ID of honeypot.
- states List<String>
- Honeypot status.
- status String
- The status of the resource.
Import
Threat Detection Honey Pot can be imported using the id, e.g.
$ pulumi import alicloud:threatdetection/honeyPot:HoneyPot example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.