AppSecWafMode

Use the akamai.AppSecWafMode resource to specify how your rule sets are updated. Use KRS mode to update the rule sets manually, or AAG to have them update automatically.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = @var.Security_configuration,
        }));
        var wafMode = new Akamai.AppSecWafMode("wafMode", new Akamai.AppSecWafModeArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            SecurityPolicyId = @var.Policy_id,
            Mode = @var.Mode,
        });
        this.WafModeMode = wafMode.Mode;
        this.WafModeCurrentRuleset = wafMode.CurrentRuleset;
        this.WafModeEvalStatus = wafMode.EvalStatus;
        this.WafModeEvalRuleset = wafMode.EvalRuleset;
        this.WafModeEvalExpirationDate = wafMode.EvalExpirationDate;
    }

    [Output("wafModeMode")]
    public Output<string> WafModeMode { get; set; }
    [Output("wafModeCurrentRuleset")]
    public Output<string> WafModeCurrentRuleset { get; set; }
    [Output("wafModeEvalStatus")]
    public Output<string> WafModeEvalStatus { get; set; }
    [Output("wafModeEvalRuleset")]
    public Output<string> WafModeEvalRuleset { get; set; }
    [Output("wafModeEvalExpirationDate")]
    public Output<string> WafModeEvalExpirationDate { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-akamai/sdk/v2/go/akamai"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := _var.Security_configuration
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &akamai.LookupAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		wafMode, err := akamai.NewAppSecWafMode(ctx, "wafMode", &akamai.AppSecWafModeArgs{
			ConfigId:         pulumi.Int(configuration.ConfigId),
			SecurityPolicyId: pulumi.Any(_var.Policy_id),
			Mode:             pulumi.Any(_var.Mode),
		})
		if err != nil {
			return err
		}
		ctx.Export("wafModeMode", wafMode.Mode)
		ctx.Export("wafModeCurrentRuleset", wafMode.CurrentRuleset)
		ctx.Export("wafModeEvalStatus", wafMode.EvalStatus)
		ctx.Export("wafModeEvalRuleset", wafMode.EvalRuleset)
		ctx.Export("wafModeEvalExpirationDate", wafMode.EvalExpirationDate)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
waf_mode = akamai.AppSecWafMode("wafMode",
    config_id=configuration.config_id,
    security_policy_id=var["policy_id"],
    mode=var["mode"])
pulumi.export("wafModeMode", waf_mode.mode)
pulumi.export("wafModeCurrentRuleset", waf_mode.current_ruleset)
pulumi.export("wafModeEvalStatus", waf_mode.eval_status)
pulumi.export("wafModeEvalRuleset", waf_mode.eval_ruleset)
pulumi.export("wafModeEvalExpirationDate", waf_mode.eval_expiration_date)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const wafMode = new akamai.AppSecWafMode("wafMode", {
    configId: configuration.then(configuration => configuration.configId),
    securityPolicyId: _var.policy_id,
    mode: _var.mode,
});
export const wafModeMode = wafMode.mode;
export const wafModeCurrentRuleset = wafMode.currentRuleset;
export const wafModeEvalStatus = wafMode.evalStatus;
export const wafModeEvalRuleset = wafMode.evalRuleset;
export const wafModeEvalExpirationDate = wafMode.evalExpirationDate;

Create a AppSecWafMode Resource

new AppSecWafMode(name: string, args: AppSecWafModeArgs, opts?: CustomResourceOptions);
@overload
def AppSecWafMode(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  config_id: Optional[int] = None,
                  mode: Optional[str] = None,
                  security_policy_id: Optional[str] = None)
@overload
def AppSecWafMode(resource_name: str,
                  args: AppSecWafModeArgs,
                  opts: Optional[ResourceOptions] = None)
func NewAppSecWafMode(ctx *Context, name string, args AppSecWafModeArgs, opts ...ResourceOption) (*AppSecWafMode, error)
public AppSecWafMode(string name, AppSecWafModeArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AppSecWafModeArgs
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 AppSecWafModeArgs
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 AppSecWafModeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppSecWafModeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

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

ConfigId int
The ID of the security configuration to use.
Mode string
“KRS” to update the rule sets manually, or “AAG” to have them update automatically.
SecurityPolicyId string
The ID of the security policy to use.
ConfigId int
The ID of the security configuration to use.
Mode string
“KRS” to update the rule sets manually, or “AAG” to have them update automatically.
SecurityPolicyId string
The ID of the security policy to use.
configId number
The ID of the security configuration to use.
mode string
“KRS” to update the rule sets manually, or “AAG” to have them update automatically.
securityPolicyId string
The ID of the security policy to use.
config_id int
The ID of the security configuration to use.
mode str
“KRS” to update the rule sets manually, or “AAG” to have them update automatically.
security_policy_id str
The ID of the security policy to use.

Outputs

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

CurrentRuleset string
The current rule set.
EvalExpirationDate string
The date on which the evaluation period ends.
EvalRuleset string
The rule set being evaluated if any.
EvalStatus string
Either enabled if an evaluation is currently in progress, or disabled otherwise.
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display showing the current rule set, WAF mode and evaluation status (enabled if a rule set is currently being evaluated, disabled otherwise).
CurrentRuleset string
The current rule set.
EvalExpirationDate string
The date on which the evaluation period ends.
EvalRuleset string
The rule set being evaluated if any.
EvalStatus string
Either enabled if an evaluation is currently in progress, or disabled otherwise.
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display showing the current rule set, WAF mode and evaluation status (enabled if a rule set is currently being evaluated, disabled otherwise).
currentRuleset string
The current rule set.
evalExpirationDate string
The date on which the evaluation period ends.
evalRuleset string
The rule set being evaluated if any.
evalStatus string
Either enabled if an evaluation is currently in progress, or disabled otherwise.
id string
The provider-assigned unique ID for this managed resource.
outputText string
A tabular display showing the current rule set, WAF mode and evaluation status (enabled if a rule set is currently being evaluated, disabled otherwise).
current_ruleset str
The current rule set.
eval_expiration_date str
The date on which the evaluation period ends.
eval_ruleset str
The rule set being evaluated if any.
eval_status str
Either enabled if an evaluation is currently in progress, or disabled otherwise.
id str
The provider-assigned unique ID for this managed resource.
output_text str
A tabular display showing the current rule set, WAF mode and evaluation status (enabled if a rule set is currently being evaluated, disabled otherwise).

Look up an Existing AppSecWafMode Resource

Get an existing AppSecWafMode 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?: AppSecWafModeState, opts?: CustomResourceOptions): AppSecWafMode
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        current_ruleset: Optional[str] = None,
        eval_expiration_date: Optional[str] = None,
        eval_ruleset: Optional[str] = None,
        eval_status: Optional[str] = None,
        mode: Optional[str] = None,
        output_text: Optional[str] = None,
        security_policy_id: Optional[str] = None) -> AppSecWafMode
func GetAppSecWafMode(ctx *Context, name string, id IDInput, state *AppSecWafModeState, opts ...ResourceOption) (*AppSecWafMode, error)
public static AppSecWafMode Get(string name, Input<string> id, AppSecWafModeState? 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:

ConfigId int
The ID of the security configuration to use.
CurrentRuleset string
The current rule set.
EvalExpirationDate string
The date on which the evaluation period ends.
EvalRuleset string
The rule set being evaluated if any.
EvalStatus string
Either enabled if an evaluation is currently in progress, or disabled otherwise.
Mode string
“KRS” to update the rule sets manually, or “AAG” to have them update automatically.
OutputText string
A tabular display showing the current rule set, WAF mode and evaluation status (enabled if a rule set is currently being evaluated, disabled otherwise).
SecurityPolicyId string
The ID of the security policy to use.
ConfigId int
The ID of the security configuration to use.
CurrentRuleset string
The current rule set.
EvalExpirationDate string
The date on which the evaluation period ends.
EvalRuleset string
The rule set being evaluated if any.
EvalStatus string
Either enabled if an evaluation is currently in progress, or disabled otherwise.
Mode string
“KRS” to update the rule sets manually, or “AAG” to have them update automatically.
OutputText string
A tabular display showing the current rule set, WAF mode and evaluation status (enabled if a rule set is currently being evaluated, disabled otherwise).
SecurityPolicyId string
The ID of the security policy to use.
configId number
The ID of the security configuration to use.
currentRuleset string
The current rule set.
evalExpirationDate string
The date on which the evaluation period ends.
evalRuleset string
The rule set being evaluated if any.
evalStatus string
Either enabled if an evaluation is currently in progress, or disabled otherwise.
mode string
“KRS” to update the rule sets manually, or “AAG” to have them update automatically.
outputText string
A tabular display showing the current rule set, WAF mode and evaluation status (enabled if a rule set is currently being evaluated, disabled otherwise).
securityPolicyId string
The ID of the security policy to use.
config_id int
The ID of the security configuration to use.
current_ruleset str
The current rule set.
eval_expiration_date str
The date on which the evaluation period ends.
eval_ruleset str
The rule set being evaluated if any.
eval_status str
Either enabled if an evaluation is currently in progress, or disabled otherwise.
mode str
“KRS” to update the rule sets manually, or “AAG” to have them update automatically.
output_text str
A tabular display showing the current rule set, WAF mode and evaluation status (enabled if a rule set is currently being evaluated, disabled otherwise).
security_policy_id str
The ID of the security policy to use.

Package Details

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