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.

179 lines (178 loc) 9.32 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.NspProfile = exports.NspLink = exports.NspAssociation = exports.NspAccessRule = exports.NetworkSecurityPerimeter = void 0; const policy_1 = require("@pulumi/policy"); const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager"); const v20230801preview_1 = require("@pulumi/azure-native/network/v20230801preview"); const v20230801preview_2 = require("@pulumi/azure-native/network/v20230801preview"); const v20230801preview_3 = require("@pulumi/azure-native/network/v20230801preview"); const v20230801preview_4 = require("@pulumi/azure-native/network/v20230801preview"); const v20230801preview_5 = require("@pulumi/azure-native/network/v20230801preview"); var NetworkSecurityPerimeter; (function (NetworkSecurityPerimeter) { /** * Disallow the use of non-stable (Preview) Azure resouces (network.v20230801preview.NetworkSecurityPerimeter). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ NetworkSecurityPerimeter.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-network-v20230801preview-networksecurityperimeter-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (network.v20230801preview.NetworkSecurityPerimeter).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_1.NetworkSecurityPerimeter, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure NetworkSecurityPerimeter shouldn't use an unstable API (network.v20230801preview.NetworkSecurityPerimeter). A compatible replacement can be found at 'network.NetworkSecurityPerimeter'."); }), }, vendors: ["azure"], services: ["network"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(NetworkSecurityPerimeter || (NetworkSecurityPerimeter = {})); exports.NetworkSecurityPerimeter = NetworkSecurityPerimeter; var NspAccessRule; (function (NspAccessRule) { /** * Disallow the use of non-stable (Preview) Azure resouces (network.v20230801preview.NspAccessRule). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ NspAccessRule.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-network-v20230801preview-nspaccessrule-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (network.v20230801preview.NspAccessRule).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_2.NspAccessRule, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure NspAccessRule shouldn't use an unstable API (network.v20230801preview.NspAccessRule). A compatible replacement can be found at 'network.NspAccessRule'."); }), }, vendors: ["azure"], services: ["network"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(NspAccessRule || (NspAccessRule = {})); exports.NspAccessRule = NspAccessRule; var NspAssociation; (function (NspAssociation) { /** * Disallow the use of non-stable (Preview) Azure resouces (network.v20230801preview.NspAssociation). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ NspAssociation.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-network-v20230801preview-nspassociation-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (network.v20230801preview.NspAssociation).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_3.NspAssociation, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure NspAssociation shouldn't use an unstable API (network.v20230801preview.NspAssociation). A compatible replacement can be found at 'network.NspAssociation'."); }), }, vendors: ["azure"], services: ["network"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(NspAssociation || (NspAssociation = {})); exports.NspAssociation = NspAssociation; var NspLink; (function (NspLink) { /** * Disallow the use of non-stable (Preview) Azure resouces (network.v20230801preview.NspLink). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ NspLink.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-network-v20230801preview-nsplink-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (network.v20230801preview.NspLink).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_4.NspLink, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure NspLink shouldn't use an unstable API (network.v20230801preview.NspLink). A compatible replacement can be found at 'network.NspLink'."); }), }, vendors: ["azure"], services: ["network"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(NspLink || (NspLink = {})); exports.NspLink = NspLink; var NspProfile; (function (NspProfile) { /** * Disallow the use of non-stable (Preview) Azure resouces (network.v20230801preview.NspProfile). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ NspProfile.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-network-v20230801preview-nspprofile-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (network.v20230801preview.NspProfile).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_5.NspProfile, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure NspProfile shouldn't use an unstable API (network.v20230801preview.NspProfile). A compatible replacement can be found at 'network.NspProfile'."); }), }, vendors: ["azure"], services: ["network"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(NspProfile || (NspProfile = {})); exports.NspProfile = NspProfile;