π§ Google GCE External Forwarding Rule is configured to use a Target HTTP Proxy - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/google/load-balancing/external-forwarding-rule-http-proxy/prod.logic.yaml - Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
- π Google GCE Forwarding Rule
- π Google GCE Forwarding Rule - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2025-10-25T12:02:47.827762175Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| π’ | test1 | βοΈ 99 | βοΈ isDisappeared(CA10__disappearanceTime__c) | βοΈ null |
| π’ | test2 | βοΈ 199 | βοΈ not(setOfText(['caGoogleGceForwardingRuleGlobal', 'caGoogleGceForwardingRuleExternal']).contains(RecordType.DeveloperName)) | βοΈ null |
| π’ | test3 | βοΈ 299 | βοΈ not(setOfText(['EXTERNAL', 'EXTERNAL_MANAGED']).contains(extract('CA10__loadBalancingScheme__c'))) | βοΈ null |
| π’ | test4 | βοΈ 399 | βοΈ extract('CA10__targetHttpProxyUniqueId__c').isNotEmpty() | βοΈ null |
| π’ | test5 | βοΈ 499 | βοΈ extract('CA10__targetHttpsProxyUniqueId__c').isNotEmpty() | βοΈ null |
| π’ | test6 | βοΈ 500 | βοΈ otherwise | βοΈ null |
Generation Bundleβ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/google/load-balancing/external-forwarding-rule-http-proxy/policy.yaml | D5570868AF7916D6921BB8B4F1736035 |
| Open | /ce/ca/google/load-balancing/external-forwarding-rule-http-proxy/prod.logic.yaml | 435D8EEF249490E3C6AE7750DE3F7BD5 |
| Open | /ce/ca/google/load-balancing/external-forwarding-rule-http-proxy/test-data.json | C1024DAB296848AD5D3D90AFC993AFC6 |
| Open | /types/CA10__CaGoogleGceForwardingRule__c/object.extracts.yaml | BE18BDBE6D507613F938DAE80D0901D0 |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/google/load-balancing/external-forwarding-rule-http-proxy/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/google/load-balancing/external-forwarding-rule-http-proxy/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/google/load-balancing/external-forwarding-rule-http-proxy/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/google/load-balancing/external-forwarding-rule-http-proxy/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/google/load-balancing/external-forwarding-rule-http-proxy/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaGoogleGceForwardingRule__c"
importExtracts:
- file: /types/CA10__CaGoogleGceForwardingRule__c/object.extracts.yaml
recordTypes:
- "caGoogleGceForwardingRuleGlobal"
- "caGoogleGceForwardingRuleExternal"
testData:
- file: "test-data.json"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The policy applies only to external forwarding rules."
check:
NOT:
arg:
CONTAINS:
arg:
SET:
itemType: "TEXT"
items:
- "EXTERNAL"
- "EXTERNAL_MANAGED"
search:
EXTRACT: "CA10__loadBalancingScheme__c"
- status: "INCOMPLIANT"
currentStateMessage: "The external forwarding rule uses an HTTP instead of an HTTPS proxy."
remediationMessage: "The forwarding rule should use a target HTTPS proxy to ensure traffic is encrypted."
check:
NOT_EMPTY:
arg:
EXTRACT: "CA10__targetHttpProxyUniqueId__c"
- status: "COMPLIANT"
currentStateMessage: "The external forwarding rule is configured to use an HTTPS proxy."
check:
NOT_EMPTY:
arg:
EXTRACT: "CA10__targetHttpsProxyUniqueId__c"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "The forwarding rule targets a different type of resource."