1. Packages
  2. Sysdig Provider
  3. API Docs
  4. SecureMacro
sysdig 1.54.0 published on Monday, Apr 28, 2025 by sysdiglabs

sysdig.SecureMacro

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as sysdig from "@pulumi/sysdig";

const httpPort = new sysdig.SecureMacro("httpPort", {condition: "fd.sport=80"});
const httpsPort = new sysdig.SecureMacro("httpsPort", {
    append: true,
    condition: "or fd.sport=443",
});
Copy
import pulumi
import pulumi_sysdig as sysdig

http_port = sysdig.SecureMacro("httpPort", condition="fd.sport=80")
https_port = sysdig.SecureMacro("httpsPort",
    append=True,
    condition="or fd.sport=443")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/sysdig/sysdig"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sysdig.NewSecureMacro(ctx, "httpPort", &sysdig.SecureMacroArgs{
			Condition: pulumi.String("fd.sport=80"),
		})
		if err != nil {
			return err
		}
		_, err = sysdig.NewSecureMacro(ctx, "httpsPort", &sysdig.SecureMacroArgs{
			Append:    pulumi.Bool(true),
			Condition: pulumi.String("or fd.sport=443"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sysdig = Pulumi.Sysdig;

return await Deployment.RunAsync(() => 
{
    var httpPort = new Sysdig.SecureMacro("httpPort", new()
    {
        Condition = "fd.sport=80",
    });

    var httpsPort = new Sysdig.SecureMacro("httpsPort", new()
    {
        Append = true,
        Condition = "or fd.sport=443",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sysdig.SecureMacro;
import com.pulumi.sysdig.SecureMacroArgs;
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 httpPort = new SecureMacro("httpPort", SecureMacroArgs.builder()
            .condition("fd.sport=80")
            .build());

        var httpsPort = new SecureMacro("httpsPort", SecureMacroArgs.builder()
            .append(true)
            .condition("or fd.sport=443")
            .build());

    }
}
Copy
resources:
  httpPort:
    type: sysdig:SecureMacro
    properties:
      condition: fd.sport=80
  httpsPort:
    type: sysdig:SecureMacro
    properties:
      append: true
      # default: false
      condition: or fd.sport=443
Copy

Create SecureMacro Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new SecureMacro(name: string, args: SecureMacroArgs, opts?: CustomResourceOptions);
@overload
def SecureMacro(resource_name: str,
                args: SecureMacroArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def SecureMacro(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                condition: Optional[str] = None,
                append: Optional[bool] = None,
                minimum_engine_version: Optional[float] = None,
                name: Optional[str] = None,
                secure_macro_id: Optional[str] = None,
                timeouts: Optional[SecureMacroTimeoutsArgs] = None)
func NewSecureMacro(ctx *Context, name string, args SecureMacroArgs, opts ...ResourceOption) (*SecureMacro, error)
public SecureMacro(string name, SecureMacroArgs args, CustomResourceOptions? opts = null)
public SecureMacro(String name, SecureMacroArgs args)
public SecureMacro(String name, SecureMacroArgs args, CustomResourceOptions options)
type: sysdig:SecureMacro
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SecureMacroArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SecureMacroArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SecureMacroArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SecureMacroArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SecureMacroArgs
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 secureMacroResource = new Sysdig.SecureMacro("secureMacroResource", new()
{
    Condition = "string",
    Append = false,
    MinimumEngineVersion = 0,
    Name = "string",
    SecureMacroId = "string",
    Timeouts = new Sysdig.Inputs.SecureMacroTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Read = "string",
        Update = "string",
    },
});
Copy
example, err := sysdig.NewSecureMacro(ctx, "secureMacroResource", &sysdig.SecureMacroArgs{
	Condition:            pulumi.String("string"),
	Append:               pulumi.Bool(false),
	MinimumEngineVersion: pulumi.Float64(0),
	Name:                 pulumi.String("string"),
	SecureMacroId:        pulumi.String("string"),
	Timeouts: &sysdig.SecureMacroTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
		Read:   pulumi.String("string"),
		Update: pulumi.String("string"),
	},
})
Copy
var secureMacroResource = new SecureMacro("secureMacroResource", SecureMacroArgs.builder()
    .condition("string")
    .append(false)
    .minimumEngineVersion(0)
    .name("string")
    .secureMacroId("string")
    .timeouts(SecureMacroTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .read("string")
        .update("string")
        .build())
    .build());
Copy
secure_macro_resource = sysdig.SecureMacro("secureMacroResource",
    condition="string",
    append=False,
    minimum_engine_version=0,
    name="string",
    secure_macro_id="string",
    timeouts={
        "create": "string",
        "delete": "string",
        "read": "string",
        "update": "string",
    })
Copy
const secureMacroResource = new sysdig.SecureMacro("secureMacroResource", {
    condition: "string",
    append: false,
    minimumEngineVersion: 0,
    name: "string",
    secureMacroId: "string",
    timeouts: {
        create: "string",
        "delete": "string",
        read: "string",
        update: "string",
    },
});
Copy
type: sysdig:SecureMacro
properties:
    append: false
    condition: string
    minimumEngineVersion: 0
    name: string
    secureMacroId: string
    timeouts:
        create: string
        delete: string
        read: string
        update: string
Copy

SecureMacro 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 SecureMacro resource accepts the following input properties:

Condition This property is required. string
Macro condition. It can contain lists or other macros.
Append bool
Adds these elements to an existing macro. Used to extend existing macros provided by Sysdig. The macros can only be extended once, for example if there is an existing macro called "foo", one can have another append macro called "foo" but not a second one. By default this is false.
MinimumEngineVersion double
This is used to indicate that the macro requires a minimum engine version. This can allow you to add macros that would not normally pass validation with older agents in your environment. The macro will only be processed by agents that support the minimum_engine_version specified.
Name string
The name of the macro. It must be unique if it's not in append mode.
SecureMacroId string
Timeouts SecureMacroTimeouts
Condition This property is required. string
Macro condition. It can contain lists or other macros.
Append bool
Adds these elements to an existing macro. Used to extend existing macros provided by Sysdig. The macros can only be extended once, for example if there is an existing macro called "foo", one can have another append macro called "foo" but not a second one. By default this is false.
MinimumEngineVersion float64
This is used to indicate that the macro requires a minimum engine version. This can allow you to add macros that would not normally pass validation with older agents in your environment. The macro will only be processed by agents that support the minimum_engine_version specified.
Name string
The name of the macro. It must be unique if it's not in append mode.
SecureMacroId string
Timeouts SecureMacroTimeoutsArgs
condition This property is required. String
Macro condition. It can contain lists or other macros.
append Boolean
Adds these elements to an existing macro. Used to extend existing macros provided by Sysdig. The macros can only be extended once, for example if there is an existing macro called "foo", one can have another append macro called "foo" but not a second one. By default this is false.
minimumEngineVersion Double
This is used to indicate that the macro requires a minimum engine version. This can allow you to add macros that would not normally pass validation with older agents in your environment. The macro will only be processed by agents that support the minimum_engine_version specified.
name String
The name of the macro. It must be unique if it's not in append mode.
secureMacroId String
timeouts SecureMacroTimeouts
condition This property is required. string
Macro condition. It can contain lists or other macros.
append boolean
Adds these elements to an existing macro. Used to extend existing macros provided by Sysdig. The macros can only be extended once, for example if there is an existing macro called "foo", one can have another append macro called "foo" but not a second one. By default this is false.
minimumEngineVersion number
This is used to indicate that the macro requires a minimum engine version. This can allow you to add macros that would not normally pass validation with older agents in your environment. The macro will only be processed by agents that support the minimum_engine_version specified.
name string
The name of the macro. It must be unique if it's not in append mode.
secureMacroId string
timeouts SecureMacroTimeouts
condition This property is required. str
Macro condition. It can contain lists or other macros.
append bool
Adds these elements to an existing macro. Used to extend existing macros provided by Sysdig. The macros can only be extended once, for example if there is an existing macro called "foo", one can have another append macro called "foo" but not a second one. By default this is false.
minimum_engine_version float
This is used to indicate that the macro requires a minimum engine version. This can allow you to add macros that would not normally pass validation with older agents in your environment. The macro will only be processed by agents that support the minimum_engine_version specified.
name str
The name of the macro. It must be unique if it's not in append mode.
secure_macro_id str
timeouts SecureMacroTimeoutsArgs
condition This property is required. String
Macro condition. It can contain lists or other macros.
append Boolean
Adds these elements to an existing macro. Used to extend existing macros provided by Sysdig. The macros can only be extended once, for example if there is an existing macro called "foo", one can have another append macro called "foo" but not a second one. By default this is false.
minimumEngineVersion Number
This is used to indicate that the macro requires a minimum engine version. This can allow you to add macros that would not normally pass validation with older agents in your environment. The macro will only be processed by agents that support the minimum_engine_version specified.
name String
The name of the macro. It must be unique if it's not in append mode.
secureMacroId String
timeouts Property Map

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Version double
Id string
The provider-assigned unique ID for this managed resource.
Version float64
id String
The provider-assigned unique ID for this managed resource.
version Double
id string
The provider-assigned unique ID for this managed resource.
version number
id str
The provider-assigned unique ID for this managed resource.
version float
id String
The provider-assigned unique ID for this managed resource.
version Number

Look up Existing SecureMacro Resource

Get an existing SecureMacro 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?: SecureMacroState, opts?: CustomResourceOptions): SecureMacro
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        append: Optional[bool] = None,
        condition: Optional[str] = None,
        minimum_engine_version: Optional[float] = None,
        name: Optional[str] = None,
        secure_macro_id: Optional[str] = None,
        timeouts: Optional[SecureMacroTimeoutsArgs] = None,
        version: Optional[float] = None) -> SecureMacro
func GetSecureMacro(ctx *Context, name string, id IDInput, state *SecureMacroState, opts ...ResourceOption) (*SecureMacro, error)
public static SecureMacro Get(string name, Input<string> id, SecureMacroState? state, CustomResourceOptions? opts = null)
public static SecureMacro get(String name, Output<String> id, SecureMacroState state, CustomResourceOptions options)
resources:  _:    type: sysdig:SecureMacro    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Append bool
Adds these elements to an existing macro. Used to extend existing macros provided by Sysdig. The macros can only be extended once, for example if there is an existing macro called "foo", one can have another append macro called "foo" but not a second one. By default this is false.
Condition string
Macro condition. It can contain lists or other macros.
MinimumEngineVersion double
This is used to indicate that the macro requires a minimum engine version. This can allow you to add macros that would not normally pass validation with older agents in your environment. The macro will only be processed by agents that support the minimum_engine_version specified.
Name string
The name of the macro. It must be unique if it's not in append mode.
SecureMacroId string
Timeouts SecureMacroTimeouts
Version double
Append bool
Adds these elements to an existing macro. Used to extend existing macros provided by Sysdig. The macros can only be extended once, for example if there is an existing macro called "foo", one can have another append macro called "foo" but not a second one. By default this is false.
Condition string
Macro condition. It can contain lists or other macros.
MinimumEngineVersion float64
This is used to indicate that the macro requires a minimum engine version. This can allow you to add macros that would not normally pass validation with older agents in your environment. The macro will only be processed by agents that support the minimum_engine_version specified.
Name string
The name of the macro. It must be unique if it's not in append mode.
SecureMacroId string
Timeouts SecureMacroTimeoutsArgs
Version float64
append Boolean
Adds these elements to an existing macro. Used to extend existing macros provided by Sysdig. The macros can only be extended once, for example if there is an existing macro called "foo", one can have another append macro called "foo" but not a second one. By default this is false.
condition String
Macro condition. It can contain lists or other macros.
minimumEngineVersion Double
This is used to indicate that the macro requires a minimum engine version. This can allow you to add macros that would not normally pass validation with older agents in your environment. The macro will only be processed by agents that support the minimum_engine_version specified.
name String
The name of the macro. It must be unique if it's not in append mode.
secureMacroId String
timeouts SecureMacroTimeouts
version Double
append boolean
Adds these elements to an existing macro. Used to extend existing macros provided by Sysdig. The macros can only be extended once, for example if there is an existing macro called "foo", one can have another append macro called "foo" but not a second one. By default this is false.
condition string
Macro condition. It can contain lists or other macros.
minimumEngineVersion number
This is used to indicate that the macro requires a minimum engine version. This can allow you to add macros that would not normally pass validation with older agents in your environment. The macro will only be processed by agents that support the minimum_engine_version specified.
name string
The name of the macro. It must be unique if it's not in append mode.
secureMacroId string
timeouts SecureMacroTimeouts
version number
append bool
Adds these elements to an existing macro. Used to extend existing macros provided by Sysdig. The macros can only be extended once, for example if there is an existing macro called "foo", one can have another append macro called "foo" but not a second one. By default this is false.
condition str
Macro condition. It can contain lists or other macros.
minimum_engine_version float
This is used to indicate that the macro requires a minimum engine version. This can allow you to add macros that would not normally pass validation with older agents in your environment. The macro will only be processed by agents that support the minimum_engine_version specified.
name str
The name of the macro. It must be unique if it's not in append mode.
secure_macro_id str
timeouts SecureMacroTimeoutsArgs
version float
append Boolean
Adds these elements to an existing macro. Used to extend existing macros provided by Sysdig. The macros can only be extended once, for example if there is an existing macro called "foo", one can have another append macro called "foo" but not a second one. By default this is false.
condition String
Macro condition. It can contain lists or other macros.
minimumEngineVersion Number
This is used to indicate that the macro requires a minimum engine version. This can allow you to add macros that would not normally pass validation with older agents in your environment. The macro will only be processed by agents that support the minimum_engine_version specified.
name String
The name of the macro. It must be unique if it's not in append mode.
secureMacroId String
timeouts Property Map
version Number

Supporting Types

SecureMacroTimeouts
, SecureMacroTimeoutsArgs

Create string
Delete string
Read string
Update string
Create string
Delete string
Read string
Update string
create String
delete String
read String
update String
create string
delete string
read string
update string
create str
delete str
read str
update str
create String
delete String
read String
update String

Import

Secure macros can be imported using the ID, e.g.

$ pulumi import sysdig:index/secureMacro:SecureMacro example 12345
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
sysdig sysdiglabs/terraform-provider-sysdig
License
Notes
This Pulumi package is based on the sysdig Terraform Provider.