Bläddra i källkod

Updated CSP to CPC

main
kusum 1 månad sedan
förälder
incheckning
1f174c8ff9

AUPropertyAutomation/csp-lab/akamai.tf → AUPropertyAutomation/cpc-lab/akamai.tf Visa fil


AUPropertyAutomation/csp-lab/property-snippets/Accelerate_delivery.json → AUPropertyAutomation/cpc-lab/property-snippets/Accelerate_delivery.json Visa fil


AUPropertyAutomation/csp-lab/property-snippets/Augment_insights.json → AUPropertyAutomation/cpc-lab/property-snippets/Augment_insights.json Visa fil


AUPropertyAutomation/csp-lab/property-snippets/Increase_availability.json → AUPropertyAutomation/cpc-lab/property-snippets/Increase_availability.json Visa fil


AUPropertyAutomation/csp-lab/property-snippets/Minimize_payload.json → AUPropertyAutomation/cpc-lab/property-snippets/Minimize_payload.json Visa fil


AUPropertyAutomation/csp-lab/property-snippets/Offload_origin.json → AUPropertyAutomation/cpc-lab/property-snippets/Offload_origin.json Visa fil


AUPropertyAutomation/csp-lab/property-snippets/Strengthen_security.json → AUPropertyAutomation/cpc-lab/property-snippets/Strengthen_security.json Visa fil


AUPropertyAutomation/csp-lab/property-snippets/main.json → AUPropertyAutomation/cpc-lab/property-snippets/main.json Visa fil

@@ -1,5 +1,5 @@
{
"comments": "CSP Lab property",
"comments": "CPC Lab property",
"rules": {
"name": "default",
"behaviors": [

AUPropertyAutomation/csp-lab/property.tf → AUPropertyAutomation/cpc-lab/property.tf Visa fil

@@ -23,7 +23,7 @@ data "akamai_property_rules_template" "rules-template" {
}

resource "akamai_property" "lab_property" {
name = "${var.UserID}-csplab"
name = "${var.UserID}-cpclab"
product_id = "prd_SPM"
contract_id = "ctr_${var.contract_id}"
group_id = "grp_${var.group_id}"
@@ -41,7 +41,7 @@ resource "akamai_property_activation" "activation_staging" {
version = "${akamai_property.lab_property.latest_version}"
network = "${var.network}"
contact = ["${var.email}"]
note = "CSP Lab"
note = "CPS Lab"
auto_acknowledge_rule_warnings = true
timeouts {
default = "1h"

AUPropertyAutomation/csp-lab/security.tf → AUPropertyAutomation/cpc-lab/security.tf Visa fil

@@ -1,6 +1,6 @@
resource "akamai_appsec_configuration" "sec_config" {
name = "${var.UserID}-csplab"
description = "Security config for CSP lab hostname"
name = "${var.UserID}-cpclab"
description = "Security config for CPC lab hostname"
contract_id = var.contract_id
group_id = var.group_id
host_names = ["${var.UserID}.fm.akamaiusec.com"]
@@ -8,43 +8,43 @@ resource "akamai_appsec_configuration" "sec_config" {
}

data "akamai_appsec_configuration" "sec_config" {
name = "${var.UserID}-csplab"
name = "${var.UserID}-cpclab"
depends_on = [akamai_appsec_configuration.sec_config]
}

resource "akamai_appsec_security_policy" "CSPLab" {
resource "akamai_appsec_security_policy" "CPCLab" {
config_id = akamai_appsec_configuration.sec_config.config_id
default_settings = true
security_policy_name = "${var.UserID}-CSPLab"
security_policy_name = "${var.UserID}-CPCLab"
security_policy_prefix = "0001"
}

resource "akamai_appsec_match_target" "match_target" {
config_id = akamai_appsec_configuration.sec_config.config_id
depends_on = [akamai_appsec_security_policy.CSPLab]
depends_on = [akamai_appsec_security_policy.CPCLab]
match_target = <<EOT
{
"defaultFile": "NO_MATCH",
"filePaths": ["/*"],
"hostnames": ["${var.UserID}.fm.akamaiusec.com"],
"securityPolicy": {
"policyId": "${akamai_appsec_security_policy.CSPLab.security_policy_id}"
"policyId": "${akamai_appsec_security_policy.CPCLab.security_policy_id}"
},
"type": "website"
}
EOT
}
}

resource "akamai_appsec_version_notes" "version_notes" {
config_id = akamai_appsec_configuration.sec_config.config_id
version_notes = "Basic security configuration for CSP lab"
version_notes = "Basic security configuration for CPC lab"
depends_on = [akamai_appsec_configuration.sec_config]
}

resource "akamai_appsec_activations" "activation" {
config_id = akamai_appsec_configuration.sec_config.config_id
network = var.network
note = "Security Config for CSP lab"
note = "Security Config for CPC lab"
notification_emails = ["${var.email}"]
version = data.akamai_appsec_configuration.sec_config.latest_version
depends_on = [akamai_appsec_match_target.match_target]

AUPropertyAutomation/csp-lab/variables.tf → AUPropertyAutomation/cpc-lab/variables.tf Visa fil


AUPropertyAutomation/scripts/start_csplab.sh → AUPropertyAutomation/scripts/start_cpclab.sh Visa fil

@@ -1,7 +1,7 @@
#!/bin/bash

echo $PWD &&
cd csp-lab &&
cd cpc-lab &&
terraform init &&
terraform plan -out=.plan &&
terraform apply .plan &&

Laddar…
Avbryt
Spara