AppSecRuleUpgrade

TBD Use the akamai.AppSecRuleUpgrade resource to upgrade to the most recent version of the KRS rule set. Akamai periodically updates these rules to keep protections current. However, the rules you use in your security policies do not automatically upgrade to the latest version when using mode: KRS. These rules do update automatically when you have mode set to AAG. Before you upgrade, run Get upgrade details to see which rules have changed. If you want to test how these rules would operate with live traffic before committing to the upgrade, run them in evaluation mode. This applies to KRS rules only and does not allow you to make any changes to the rules themselves. The response is the same as the mode response.

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 ruleUpgrade = new Akamai.AppSecRuleUpgrade("ruleUpgrade", new Akamai.AppSecRuleUpgradeArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            SecurityPolicyId = @var.Security_policy_id,
        });
        this.RuleUpgradeCurrentRuleset = ruleUpgrade.CurrentRuleset;
        this.RuleUpgradeMode = ruleUpgrade.Mode;
        this.RuleUpgradeEvalStatus = ruleUpgrade.EvalStatus;
    }

    [Output("ruleUpgradeCurrentRuleset")]
    public Output<string> RuleUpgradeCurrentRuleset { get; set; }
    [Output("ruleUpgradeMode")]
    public Output<string> RuleUpgradeMode { get; set; }
    [Output("ruleUpgradeEvalStatus")]
    public Output<string> RuleUpgradeEvalStatus { 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
		}
		ruleUpgrade, err := akamai.NewAppSecRuleUpgrade(ctx, "ruleUpgrade", &akamai.AppSecRuleUpgradeArgs{
			ConfigId:         pulumi.Int(configuration.ConfigId),
			SecurityPolicyId: pulumi.Any(_var.Security_policy_id),
		})
		if err != nil {
			return err
		}
		ctx.Export("ruleUpgradeCurrentRuleset", ruleUpgrade.CurrentRuleset)
		ctx.Export("ruleUpgradeMode", ruleUpgrade.Mode)
		ctx.Export("ruleUpgradeEvalStatus", ruleUpgrade.EvalStatus)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
rule_upgrade = akamai.AppSecRuleUpgrade("ruleUpgrade",
    config_id=configuration.config_id,
    security_policy_id=var["security_policy_id"])
pulumi.export("ruleUpgradeCurrentRuleset", rule_upgrade.current_ruleset)
pulumi.export("ruleUpgradeMode", rule_upgrade.mode)
pulumi.export("ruleUpgradeEvalStatus", rule_upgrade.eval_status)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const ruleUpgrade = new akamai.AppSecRuleUpgrade("ruleUpgrade", {
    configId: configuration.then(configuration => configuration.configId),
    securityPolicyId: _var.security_policy_id,
});
export const ruleUpgradeCurrentRuleset = ruleUpgrade.currentRuleset;
export const ruleUpgradeMode = ruleUpgrade.mode;
export const ruleUpgradeEvalStatus = ruleUpgrade.evalStatus;

Create a AppSecRuleUpgrade Resource

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

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

ConfigId int
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
ConfigId int
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
configId number
The ID of the security configuration to use.
securityPolicyId string
The ID of the security policy to use.
config_id int
The ID of the security configuration to use.
security_policy_id str
The ID of the security policy to use.

Outputs

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

CurrentRuleset string
A string indicating the version number and release date of the current KRS rule set.
EvalStatus string
TBD
Id string
The provider-assigned unique ID for this managed resource.
Mode string
A string indicating the current mode, either “KRS” or “AAG”.
CurrentRuleset string
A string indicating the version number and release date of the current KRS rule set.
EvalStatus string
TBD
Id string
The provider-assigned unique ID for this managed resource.
Mode string
A string indicating the current mode, either “KRS” or “AAG”.
currentRuleset string
A string indicating the version number and release date of the current KRS rule set.
evalStatus string
TBD
id string
The provider-assigned unique ID for this managed resource.
mode string
A string indicating the current mode, either “KRS” or “AAG”.
current_ruleset str
A string indicating the version number and release date of the current KRS rule set.
eval_status str
TBD
id str
The provider-assigned unique ID for this managed resource.
mode str
A string indicating the current mode, either “KRS” or “AAG”.

Look up an Existing AppSecRuleUpgrade Resource

Get an existing AppSecRuleUpgrade 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?: AppSecRuleUpgradeState, opts?: CustomResourceOptions): AppSecRuleUpgrade
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        current_ruleset: Optional[str] = None,
        eval_status: Optional[str] = None,
        mode: Optional[str] = None,
        security_policy_id: Optional[str] = None) -> AppSecRuleUpgrade
func GetAppSecRuleUpgrade(ctx *Context, name string, id IDInput, state *AppSecRuleUpgradeState, opts ...ResourceOption) (*AppSecRuleUpgrade, error)
public static AppSecRuleUpgrade Get(string name, Input<string> id, AppSecRuleUpgradeState? 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
A string indicating the version number and release date of the current KRS rule set.
EvalStatus string
TBD
Mode string
A string indicating the current mode, either “KRS” or “AAG”.
SecurityPolicyId string
The ID of the security policy to use.
ConfigId int
The ID of the security configuration to use.
CurrentRuleset string
A string indicating the version number and release date of the current KRS rule set.
EvalStatus string
TBD
Mode string
A string indicating the current mode, either “KRS” or “AAG”.
SecurityPolicyId string
The ID of the security policy to use.
configId number
The ID of the security configuration to use.
currentRuleset string
A string indicating the version number and release date of the current KRS rule set.
evalStatus string
TBD
mode string
A string indicating the current mode, either “KRS” or “AAG”.
securityPolicyId string
The ID of the security policy to use.
config_id int
The ID of the security configuration to use.
current_ruleset str
A string indicating the version number and release date of the current KRS rule set.
eval_status str
TBD
mode str
A string indicating the current mode, either “KRS” or “AAG”.
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.