UNPKG

@pulumi/azure-compliance-policies

Version:

This repository contains a growing set of Compliance Policies to validate your infrastructure using Pulumi's Crossguard Policy-as-Code framework.

210 lines (209 loc) 12 kB
"use strict"; // Copyright 2016-2024, Pulumi Corporation. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // ------------------------------- WARNING ------------------------------------- // This file was programmatically generated. Do not edit unless you know what // you're doing. // ------------------------------- WARNING ------------------------------------- Object.defineProperty(exports, "__esModule", { value: true }); exports.IspCustomer = exports.IspCacheNodesOperation = exports.EnterpriseMccCustomer = exports.EnterpriseMccCacheNodesOperation = exports.EnterpriseCustomerOperation = exports.CacheNodesOperation = void 0; const policy_1 = require("@pulumi/policy"); const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager"); const v20230501preview_1 = require("@pulumi/azure-native/connectedcache/v20230501preview"); const v20230501preview_2 = require("@pulumi/azure-native/connectedcache/v20230501preview"); const v20230501preview_3 = require("@pulumi/azure-native/connectedcache/v20230501preview"); const v20230501preview_4 = require("@pulumi/azure-native/connectedcache/v20230501preview"); const v20230501preview_5 = require("@pulumi/azure-native/connectedcache/v20230501preview"); const v20230501preview_6 = require("@pulumi/azure-native/connectedcache/v20230501preview"); var CacheNodesOperation; (function (CacheNodesOperation) { /** * Disallow the use of non-stable (Preview) Azure resouces (connectedcache.v20230501preview.CacheNodesOperation). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ CacheNodesOperation.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-connectedcache-v20230501preview-cachenodesoperation-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (connectedcache.v20230501preview.CacheNodesOperation).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230501preview_1.CacheNodesOperation, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure CacheNodesOperation shouldn't use an unstable API (connectedcache.v20230501preview.CacheNodesOperation). A compatible replacement can be found at 'connectedcache.CacheNodesOperation'."); }), }, vendors: ["azure"], services: ["connectedcache"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(CacheNodesOperation || (CacheNodesOperation = {})); exports.CacheNodesOperation = CacheNodesOperation; var EnterpriseCustomerOperation; (function (EnterpriseCustomerOperation) { /** * Disallow the use of non-stable (Preview) Azure resouces (connectedcache.v20230501preview.EnterpriseCustomerOperation). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ EnterpriseCustomerOperation.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-connectedcache-v20230501preview-enterprisecustomeroperation-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (connectedcache.v20230501preview.EnterpriseCustomerOperation).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230501preview_2.EnterpriseCustomerOperation, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure EnterpriseCustomerOperation shouldn't use an unstable API (connectedcache.v20230501preview.EnterpriseCustomerOperation). A compatible replacement can be found at 'connectedcache.EnterpriseCustomerOperation'."); }), }, vendors: ["azure"], services: ["connectedcache"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(EnterpriseCustomerOperation || (EnterpriseCustomerOperation = {})); exports.EnterpriseCustomerOperation = EnterpriseCustomerOperation; var EnterpriseMccCacheNodesOperation; (function (EnterpriseMccCacheNodesOperation) { /** * Disallow the use of non-stable (Preview) Azure resouces (connectedcache.v20230501preview.EnterpriseMccCacheNodesOperation). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ EnterpriseMccCacheNodesOperation.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-connectedcache-v20230501preview-enterprisemcccachenodesoperation-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (connectedcache.v20230501preview.EnterpriseMccCacheNodesOperation).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230501preview_3.EnterpriseMccCacheNodesOperation, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure EnterpriseMccCacheNodesOperation shouldn't use an unstable API (connectedcache.v20230501preview.EnterpriseMccCacheNodesOperation). A compatible replacement can be found at 'connectedcache.EnterpriseMccCacheNodesOperation'."); }), }, vendors: ["azure"], services: ["connectedcache"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(EnterpriseMccCacheNodesOperation || (EnterpriseMccCacheNodesOperation = {})); exports.EnterpriseMccCacheNodesOperation = EnterpriseMccCacheNodesOperation; var EnterpriseMccCustomer; (function (EnterpriseMccCustomer) { /** * Disallow the use of non-stable (Preview) Azure resouces (connectedcache.v20230501preview.EnterpriseMccCustomer). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ EnterpriseMccCustomer.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-connectedcache-v20230501preview-enterprisemcccustomer-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (connectedcache.v20230501preview.EnterpriseMccCustomer).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230501preview_4.EnterpriseMccCustomer, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure EnterpriseMccCustomer shouldn't use an unstable API (connectedcache.v20230501preview.EnterpriseMccCustomer). A compatible replacement can be found at 'connectedcache.EnterpriseMccCustomer'."); }), }, vendors: ["azure"], services: ["connectedcache"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(EnterpriseMccCustomer || (EnterpriseMccCustomer = {})); exports.EnterpriseMccCustomer = EnterpriseMccCustomer; var IspCacheNodesOperation; (function (IspCacheNodesOperation) { /** * Disallow the use of non-stable (Preview) Azure resouces (connectedcache.v20230501preview.IspCacheNodesOperation). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ IspCacheNodesOperation.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-connectedcache-v20230501preview-ispcachenodesoperation-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (connectedcache.v20230501preview.IspCacheNodesOperation).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230501preview_5.IspCacheNodesOperation, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure IspCacheNodesOperation shouldn't use an unstable API (connectedcache.v20230501preview.IspCacheNodesOperation). A compatible replacement can be found at 'connectedcache.IspCacheNodesOperation'."); }), }, vendors: ["azure"], services: ["connectedcache"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(IspCacheNodesOperation || (IspCacheNodesOperation = {})); exports.IspCacheNodesOperation = IspCacheNodesOperation; var IspCustomer; (function (IspCustomer) { /** * Disallow the use of non-stable (Preview) Azure resouces (connectedcache.v20230501preview.IspCustomer). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ IspCustomer.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-connectedcache-v20230501preview-ispcustomer-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (connectedcache.v20230501preview.IspCustomer).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230501preview_6.IspCustomer, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure IspCustomer shouldn't use an unstable API (connectedcache.v20230501preview.IspCustomer). A compatible replacement can be found at 'connectedcache.IspCustomer'."); }), }, vendors: ["azure"], services: ["connectedcache"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(IspCustomer || (IspCustomer = {})); exports.IspCustomer = IspCustomer;