Documentation ¶
Overview ¶
Package appsec contains implementation for Akamai Terraform sub-provider responsible for Application Security
Index ¶
- Constants
- Variables
- func InitTemplates(otm map[string]*OutputTemplate)
- func Provider() *schema.Provider
- func RenderTemplates(ots map[string]*OutputTemplate, key string, str interface{}) (string, error)
- func Subprovider(opts ...Option) akamai.Subprovider
- func ValidateActions(v interface{}, path cty.Path) diag.Diagnostics
- func VerifyIDUnchanged(_ context.Context, d *schema.ResourceDiff, m interface{}) error
- type MatchTargetOutputText
- type Option
- type OutputTemplate
- type OutputTemplates
Constants ¶
const ( APITarget = "API" WebsiteTarget = "Website" )
Definition of constant variables
const ( Alert = "alert" Deny = "deny" None = "none" )
Constant values
const ( Start = "START" Stop = "STOP" Restart = "RESTART" Update = "UPDATE" Complete = "COMPLETE" )
Definition of constant variables
const ( Allow = "allow" Block = "block" )
Definition of constant variables
const ( Append = "APPEND" Replace = "REPLACE" Remove = "REMOVE" )
Append Replace Remove mode flags
const ( // AAG = Automated Attack Groups AAG = "AAG" // KRS = Kona Rule Sets KRS = "KRS" // AseAuto = Adaptive Security Engine - Auto AseAuto = "ASE_AUTO" // AseManual = Adaptive Security Engine - Manual AseManual = "ASE_MANUAL" )
Definition of constant variables
const (
Abort = "abort"
)
Definition of constant variables
const ( // ActivationPollMinimum is the minimum polling interval for activation creation ActivationPollMinimum = time.Minute )
const ProviderVersion string = "v1.0.1"
ProviderVersion update version string anytime provider adds new features
Variables ¶
var ( // GetModifiableConfigVersion returns the number of the latest editable version // of the given security configuration. If the most recent version is not editable // (because it is active in staging or production) a new version is cloned and the // new version's number is returned. API calls are made using the supplied context // and the API client obtained from m. Log messages are written to m's logger. A // mutex prevents calls made by multiple resources from creating unnecessary clones. GetModifiableConfigVersion = getModifiableConfigVersion // GetLatestConfigVersion returns the latest version number of the given security // configuration. API calls are made using the supplied context and the API client // obtained from m. Log messages are written to m's logger. GetLatestConfigVersion = getLatestConfigVersion )
var ( // ActivationPollInterval is the interval for polling an activation status on creation ActivationPollInterval = ActivationPollMinimum // AppsecResourceTimeout is the default timeout for the resource operations AppsecResourceTimeout = time.Minute * 90 )
Functions ¶
func InitTemplates ¶
func InitTemplates(otm map[string]*OutputTemplate)
InitTemplates populates map of templates given as argument with output templates
func RenderTemplates ¶
func RenderTemplates(ots map[string]*OutputTemplate, key string, str interface{}) (string, error)
RenderTemplates renders a template and returns it as a string.
func Subprovider ¶
func Subprovider(opts ...Option) akamai.Subprovider
Subprovider returns a core sub provider
func ValidateActions ¶
func ValidateActions(v interface{}, path cty.Path) diag.Diagnostics
ValidateActions ensure actions are correct for API call
func VerifyIDUnchanged ¶
func VerifyIDUnchanged(_ context.Context, d *schema.ResourceDiff, m interface{}) error
VerifyIDUnchanged compares the configuration's value for the configuration ID with the resource's value specified in the resources's ID, to ensure that the user has not inadvertently modified the configuration's value; any such modifications indicate an incorrect understanding of the Update operation.
Types ¶
type MatchTargetOutputText ¶
MatchTargetOutputText holds data for templates
type Option ¶
type Option func(p *provider)
Option is a appsec provider option
func WithClient ¶
WithClient sets the client interface function, used for mocking and testing
type OutputTemplate ¶
type OutputTemplate struct { TemplateName string TemplateType string TableTitle string TemplateString string }
OutputTemplate contains template data
func GetTemplate ¶
func GetTemplate(ots map[string]*OutputTemplate, key string) (*OutputTemplate, error)
GetTemplate given map of templates and a key, returns template stored under this key
type OutputTemplates ¶
type OutputTemplates map[string]*OutputTemplate
OutputTemplates is a map of templates
Source Files ¶
- config_versions.go
- custom_validations.go
- data_akamai_appsec_advanced_settings_attack_payload_logging.go
- data_akamai_appsec_advanced_settings_evasive_path_match.go
- data_akamai_appsec_advanced_settings_logging.go
- data_akamai_appsec_advanced_settings_pragma_header.go
- data_akamai_appsec_advanced_settings_prefetch.go
- data_akamai_appsec_advanced_settings_request_body.go
- data_akamai_appsec_api_endpoints.go
- data_akamai_appsec_api_hostname_coverage.go
- data_akamai_appsec_api_hostname_coverage_match_targets.go
- data_akamai_appsec_api_hostname_coverage_overlapping.go
- data_akamai_appsec_api_request_constraints.go
- data_akamai_appsec_attack_groups.go
- data_akamai_appsec_bypass_network_lists.go
- data_akamai_appsec_configuration.go
- data_akamai_appsec_configuration_version.go
- data_akamai_appsec_contracts_groups.go
- data_akamai_appsec_custom_deny.go
- data_akamai_appsec_custom_rule_actions.go
- data_akamai_appsec_custom_rules.go
- data_akamai_appsec_eval.go
- data_akamai_appsec_eval_groups.go
- data_akamai_appsec_eval_penalty_box.go
- data_akamai_appsec_eval_rules.go
- data_akamai_appsec_export_configuration.go
- data_akamai_appsec_failover_hostnames.go
- data_akamai_appsec_ip_geo.go
- data_akamai_appsec_malware_content_types.go
- data_akamai_appsec_malware_policies.go
- data_akamai_appsec_malware_policy_actions.go
- data_akamai_appsec_match_targets.go
- data_akamai_appsec_penalty_box.go
- data_akamai_appsec_rate_policies.go
- data_akamai_appsec_rate_policy_actions.go
- data_akamai_appsec_reputation_analysis.go
- data_akamai_appsec_reputation_profile_actions.go
- data_akamai_appsec_reputation_profiles.go
- data_akamai_appsec_rule_upgrade.go
- data_akamai_appsec_rules.go
- data_akamai_appsec_security_policy.go
- data_akamai_appsec_security_policy_protections.go
- data_akamai_appsec_selectable_hostnames.go
- data_akamai_appsec_selected_hostnames.go
- data_akamai_appsec_siem_definitions.go
- data_akamai_appsec_siem_settings.go
- data_akamai_appsec_slow_post_protection_settings.go
- data_akamai_appsec_threat_intel.go
- data_akamai_appsec_tuning_recommendations.go
- data_akamai_appsec_version_notes.go
- data_akamai_appsec_waf_mode.go
- data_akamai_appsec_wap_selected_hostnames.go
- diff_suppress_funcs.go
- provider.go
- resource_akamai_appsec_activations.go
- resource_akamai_appsec_advanced_settings_attack_payload_logging.go
- resource_akamai_appsec_advanced_settings_evasive_path_match.go
- resource_akamai_appsec_advanced_settings_logging.go
- resource_akamai_appsec_advanced_settings_pragma_header.go
- resource_akamai_appsec_advanced_settings_prefetch.go
- resource_akamai_appsec_advanced_settings_request_body.go
- resource_akamai_appsec_api_constraints_protection.go
- resource_akamai_appsec_api_request_constraints.go
- resource_akamai_appsec_attack_group.go
- resource_akamai_appsec_bypass_network_lists.go
- resource_akamai_appsec_configuration.go
- resource_akamai_appsec_configuration_rename.go
- resource_akamai_appsec_custom_deny.go
- resource_akamai_appsec_custom_rule.go
- resource_akamai_appsec_custom_rule_action.go
- resource_akamai_appsec_eval.go
- resource_akamai_appsec_eval_group.go
- resource_akamai_appsec_eval_penalty_box.go
- resource_akamai_appsec_eval_rule.go
- resource_akamai_appsec_ip_geo.go
- resource_akamai_appsec_ip_geo_protection.go
- resource_akamai_appsec_malware_policy.go
- resource_akamai_appsec_malware_policy_action.go
- resource_akamai_appsec_malware_policy_actions.go
- resource_akamai_appsec_malware_protection.go
- resource_akamai_appsec_match_target.go
- resource_akamai_appsec_match_target_sequence.go
- resource_akamai_appsec_penalty_box.go
- resource_akamai_appsec_rate_policy.go
- resource_akamai_appsec_rate_policy_action.go
- resource_akamai_appsec_rate_protection.go
- resource_akamai_appsec_reputation_analysis.go
- resource_akamai_appsec_reputation_profile.go
- resource_akamai_appsec_reputation_profile_action.go
- resource_akamai_appsec_reputation_protection.go
- resource_akamai_appsec_rule.go
- resource_akamai_appsec_rule_upgrade.go
- resource_akamai_appsec_security_policy.go
- resource_akamai_appsec_security_policy_rename.go
- resource_akamai_appsec_selected_hostname.go
- resource_akamai_appsec_siem_settings.go
- resource_akamai_appsec_slow_post_protection_setting.go
- resource_akamai_appsec_slowpost_protection.go
- resource_akamai_appsec_threat_intel.go
- resource_akamai_appsec_version_notes.go
- resource_akamai_appsec_waf_mode.go
- resource_akamai_appsec_waf_protection.go
- resource_akamai_appsec_wap_selected_hostnames.go
- templates.go