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.

334 lines (333 loc) 18.4 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.VirtualMachineInstance = exports.VirtualHardDisk = exports.StorageContainer = exports.SecurityRule = exports.NetworkSecurityGroup = exports.NetworkInterface = exports.MarketplaceGalleryImage = exports.LogicalNetwork = exports.GuestAgent = exports.GalleryImage = void 0; const policy_1 = require("@pulumi/policy"); const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager"); const v20240201preview_1 = require("@pulumi/azure-native/azurestackhci/v20240201preview"); const v20240201preview_2 = require("@pulumi/azure-native/azurestackhci/v20240201preview"); const v20240201preview_3 = require("@pulumi/azure-native/azurestackhci/v20240201preview"); const v20240201preview_4 = require("@pulumi/azure-native/azurestackhci/v20240201preview"); const v20240201preview_5 = require("@pulumi/azure-native/azurestackhci/v20240201preview"); const v20240201preview_6 = require("@pulumi/azure-native/azurestackhci/v20240201preview"); const v20240201preview_7 = require("@pulumi/azure-native/azurestackhci/v20240201preview"); const v20240201preview_8 = require("@pulumi/azure-native/azurestackhci/v20240201preview"); const v20240201preview_9 = require("@pulumi/azure-native/azurestackhci/v20240201preview"); const v20240201preview_10 = require("@pulumi/azure-native/azurestackhci/v20240201preview"); var GalleryImage; (function (GalleryImage) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.GalleryImage). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ GalleryImage.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20240201preview-galleryimage-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.GalleryImage).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240201preview_1.GalleryImage, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure GalleryImage shouldn't use an unstable API (azurestackhci.v20240201preview.GalleryImage). A compatible replacement can be found at 'azurestackhci.GalleryImage'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(GalleryImage || (GalleryImage = {})); exports.GalleryImage = GalleryImage; var GuestAgent; (function (GuestAgent) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.GuestAgent). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ GuestAgent.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20240201preview-guestagent-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.GuestAgent).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240201preview_2.GuestAgent, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure GuestAgent shouldn't use an unstable API (azurestackhci.v20240201preview.GuestAgent). A compatible replacement can be found at 'azurestackhci.v20240101.GuestAgent'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(GuestAgent || (GuestAgent = {})); exports.GuestAgent = GuestAgent; var LogicalNetwork; (function (LogicalNetwork) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.LogicalNetwork). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ LogicalNetwork.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20240201preview-logicalnetwork-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.LogicalNetwork).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240201preview_3.LogicalNetwork, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure LogicalNetwork shouldn't use an unstable API (azurestackhci.v20240201preview.LogicalNetwork). A compatible replacement can be found at 'azurestackhci.LogicalNetwork'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(LogicalNetwork || (LogicalNetwork = {})); exports.LogicalNetwork = LogicalNetwork; var MarketplaceGalleryImage; (function (MarketplaceGalleryImage) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.MarketplaceGalleryImage). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ MarketplaceGalleryImage.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20240201preview-marketplacegalleryimage-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.MarketplaceGalleryImage).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240201preview_4.MarketplaceGalleryImage, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure MarketplaceGalleryImage shouldn't use an unstable API (azurestackhci.v20240201preview.MarketplaceGalleryImage). A compatible replacement can be found at 'azurestackhci.MarketplaceGalleryImage'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(MarketplaceGalleryImage || (MarketplaceGalleryImage = {})); exports.MarketplaceGalleryImage = MarketplaceGalleryImage; var NetworkInterface; (function (NetworkInterface) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.NetworkInterface). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ NetworkInterface.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20240201preview-networkinterface-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.NetworkInterface).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240201preview_5.NetworkInterface, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure NetworkInterface shouldn't use an unstable API (azurestackhci.v20240201preview.NetworkInterface). A compatible replacement can be found at 'azurestackhci.NetworkInterface'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(NetworkInterface || (NetworkInterface = {})); exports.NetworkInterface = NetworkInterface; var NetworkSecurityGroup; (function (NetworkSecurityGroup) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.NetworkSecurityGroup). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ NetworkSecurityGroup.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20240201preview-networksecuritygroup-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.NetworkSecurityGroup).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240201preview_6.NetworkSecurityGroup, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure NetworkSecurityGroup shouldn't use an unstable API (azurestackhci.v20240201preview.NetworkSecurityGroup). A compatible replacement can be found at 'azurestackhci.NetworkSecurityGroup'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(NetworkSecurityGroup || (NetworkSecurityGroup = {})); exports.NetworkSecurityGroup = NetworkSecurityGroup; var SecurityRule; (function (SecurityRule) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.SecurityRule). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ SecurityRule.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20240201preview-securityrule-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.SecurityRule).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240201preview_7.SecurityRule, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure SecurityRule shouldn't use an unstable API (azurestackhci.v20240201preview.SecurityRule). A compatible replacement can be found at 'azurestackhci.SecurityRule'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(SecurityRule || (SecurityRule = {})); exports.SecurityRule = SecurityRule; var StorageContainer; (function (StorageContainer) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.StorageContainer). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ StorageContainer.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20240201preview-storagecontainer-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.StorageContainer).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240201preview_8.StorageContainer, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure StorageContainer shouldn't use an unstable API (azurestackhci.v20240201preview.StorageContainer). A compatible replacement can be found at 'azurestackhci.StorageContainer'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(StorageContainer || (StorageContainer = {})); exports.StorageContainer = StorageContainer; var VirtualHardDisk; (function (VirtualHardDisk) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.VirtualHardDisk). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ VirtualHardDisk.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20240201preview-virtualharddisk-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.VirtualHardDisk).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240201preview_9.VirtualHardDisk, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure VirtualHardDisk shouldn't use an unstable API (azurestackhci.v20240201preview.VirtualHardDisk). A compatible replacement can be found at 'azurestackhci.VirtualHardDisk'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(VirtualHardDisk || (VirtualHardDisk = {})); exports.VirtualHardDisk = VirtualHardDisk; var VirtualMachineInstance; (function (VirtualMachineInstance) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.VirtualMachineInstance). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ VirtualMachineInstance.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20240201preview-virtualmachineinstance-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20240201preview.VirtualMachineInstance).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240201preview_10.VirtualMachineInstance, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure VirtualMachineInstance shouldn't use an unstable API (azurestackhci.v20240201preview.VirtualMachineInstance). A compatible replacement can be found at 'azurestackhci.VirtualMachineInstance'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(VirtualMachineInstance || (VirtualMachineInstance = {})); exports.VirtualMachineInstance = VirtualMachineInstance;