Browse Source

Fixed issues with User ID variable in scripts

main
kusum 1 year ago
parent
commit
8b0d85f535

+ 1
- 1
AUPropertyAutomation/ewlabtf/property-snippets/Add_testheader.json View File

@@ -16,7 +16,7 @@
"options": {
"matchOperator": "IS_ONE_OF",
"values": [
"<UserID>tflab-test.akaudevops.com"
"${env.UserID}tflab-test.akaudevops.com"
]
}
}

+ 1
- 1
AUPropertyAutomation/ewlabtf/property-snippets/Offload_origin.json View File

@@ -388,7 +388,7 @@
"options": {
"matchOperator": "IS_ONE_OF",
"values": [
"<User ID>tflab-test.akaudevops.com"
"${env.UserID}tflab-test.akaudevops.com"
]
}
}

+ 5
- 0
AUPropertyAutomation/terraformlabtf/configuration.tf View File

@@ -15,6 +15,11 @@ data "akamai_property_rules_template" "rules-template" {
value = "${var.cp_code_id}"
type = "number"
}
variables {
name = "user_id"
value = "${var.UserID}"
type = "bool"
}
}

resource "akamai_property" "lab_property" {

+ 1
- 1
AUPropertyAutomation/terraformlabtf/property-snippets/Add_testheader.json View File

@@ -16,7 +16,7 @@
"options": {
"matchOperator": "IS_ONE_OF",
"values": [
"<UserID>tflab-test.akaudevops.com"
"${env.UserID}tflab-test.akaudevops.com"
]
}
}

+ 1
- 1
AUPropertyAutomation/terraformlabtf/property-snippets/Offload_origin.json View File

@@ -388,7 +388,7 @@
"options": {
"matchOperator": "IS_ONE_OF",
"values": [
"<User ID>tflab-test.akaudevops.com"
"${env.UserID}tflab-test.akaudevops.com"
]
}
}

+ 27
- 0
tf-lab-master/modules/property/property-snippets/Add_testheader View File

@@ -0,0 +1,27 @@
{
"behaviors": [
{
"name": "modifyOutgoingResponseHeader",
"options": {
"action": "ADD",
"customHeaderName": "X-Test-Environment",
"headerValue": "true",
"standardAddHeaderName": "OTHER"
}
}
],
"criteria": [
{
"name": "hostname",
"options": {
"matchOperator": "IS_ONE_OF",
"values": [
"${env.user_id}tflab-test.akaudevops.com"
]
}
}
],
"name": "Add testheader",
"options": {},
"criteriaMustSatisfy": "all"
}

+ 10
- 1
tf-lab-master/modules/property/property-snippets/Offload_origin.json View File

@@ -382,11 +382,20 @@
"matchOperator": "IS_NOT",
"value": "CACHEABLE"
}
},
{
"name": "hostname",
"options": {
"matchOperator": "IS_ONE_OF",
"values": [
"${env.user_id}tflab-test.akaudevops.com"
]
}
}
],
"name": "Uncacheable objects",
"options": {},
"criteriaMustSatisfy": "all"
"criteriaMustSatisfy": "any"
}
],
"comments": "Control the settings related to caching content at the edge and in the browser. As a result, fewer requests go to your origin, fewer bytes leave your data centers, and your assets are closer to your users.",

+ 1
- 0
tf-lab-master/modules/property/property-snippets/main.json View File

@@ -23,6 +23,7 @@
}
],
"children": [
"#include:Add_testheader.json",
"#include:Augment_insights.json",
"#include:Accelerate_delivery.json",
"#include:Offload_origin.json",

+ 6
- 0
tf-lab-master/modules/property/property.tf View File

@@ -41,6 +41,12 @@ resource "akamai_property" "lab_property" {
cname_to = var.edge_hostname
cert_provisioning_type = "CPS_MANAGED"
}
hostnames{
cname_from = "${var.user_id}tflab-test.akaudevops.com"
cname_to = var.edge_hostname
cert_provisioning_type = "CPS_MANAGED"
}

rule_format = var.rule_format
rules = data.akamai_property_rules_template.rules-template.json
}

Loading…
Cancel
Save