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) 10.6 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.Product = exports.Image = exports.DeviceGroup = exports.Device = exports.Deployment = exports.Catalog = void 0; const policy_1 = require("@pulumi/policy"); const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager"); const v20220901preview_1 = require("@pulumi/azure-native/azuresphere/v20220901preview"); const v20220901preview_2 = require("@pulumi/azure-native/azuresphere/v20220901preview"); const v20220901preview_3 = require("@pulumi/azure-native/azuresphere/v20220901preview"); const v20220901preview_4 = require("@pulumi/azure-native/azuresphere/v20220901preview"); const v20220901preview_5 = require("@pulumi/azure-native/azuresphere/v20220901preview"); const v20220901preview_6 = require("@pulumi/azure-native/azuresphere/v20220901preview"); var Catalog; (function (Catalog) { /** * Disallow the use of non-stable (Preview) Azure resouces (azuresphere.v20220901preview.Catalog). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ Catalog.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azuresphere-v20220901preview-catalog-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azuresphere.v20220901preview.Catalog).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20220901preview_1.Catalog, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure Catalog shouldn't use an unstable API (azuresphere.v20220901preview.Catalog). A compatible replacement can be found at 'azuresphere.Catalog'."); }), }, vendors: ["azure"], services: ["azuresphere"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(Catalog || (Catalog = {})); exports.Catalog = Catalog; var Deployment; (function (Deployment) { /** * Disallow the use of non-stable (Preview) Azure resouces (azuresphere.v20220901preview.Deployment). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ Deployment.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azuresphere-v20220901preview-deployment-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azuresphere.v20220901preview.Deployment).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20220901preview_2.Deployment, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure Deployment shouldn't use an unstable API (azuresphere.v20220901preview.Deployment). A compatible replacement can be found at 'azuresphere.Deployment'."); }), }, vendors: ["azure"], services: ["azuresphere"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(Deployment || (Deployment = {})); exports.Deployment = Deployment; var Device; (function (Device) { /** * Disallow the use of non-stable (Preview) Azure resouces (azuresphere.v20220901preview.Device). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ Device.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azuresphere-v20220901preview-device-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azuresphere.v20220901preview.Device).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20220901preview_3.Device, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure Device shouldn't use an unstable API (azuresphere.v20220901preview.Device). A compatible replacement can be found at 'azuresphere.Device'."); }), }, vendors: ["azure"], services: ["azuresphere"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(Device || (Device = {})); exports.Device = Device; var DeviceGroup; (function (DeviceGroup) { /** * Disallow the use of non-stable (Preview) Azure resouces (azuresphere.v20220901preview.DeviceGroup). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ DeviceGroup.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azuresphere-v20220901preview-devicegroup-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azuresphere.v20220901preview.DeviceGroup).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20220901preview_4.DeviceGroup, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure DeviceGroup shouldn't use an unstable API (azuresphere.v20220901preview.DeviceGroup). A compatible replacement can be found at 'azuresphere.DeviceGroup'."); }), }, vendors: ["azure"], services: ["azuresphere"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(DeviceGroup || (DeviceGroup = {})); exports.DeviceGroup = DeviceGroup; var Image; (function (Image) { /** * Disallow the use of non-stable (Preview) Azure resouces (azuresphere.v20220901preview.Image). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ Image.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azuresphere-v20220901preview-image-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azuresphere.v20220901preview.Image).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20220901preview_5.Image, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure Image shouldn't use an unstable API (azuresphere.v20220901preview.Image). A compatible replacement can be found at 'azuresphere.Image'."); }), }, vendors: ["azure"], services: ["azuresphere"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(Image || (Image = {})); exports.Image = Image; var Product; (function (Product) { /** * Disallow the use of non-stable (Preview) Azure resouces (azuresphere.v20220901preview.Product). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ Product.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azuresphere-v20220901preview-product-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azuresphere.v20220901preview.Product).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20220901preview_6.Product, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure Product shouldn't use an unstable API (azuresphere.v20220901preview.Product). A compatible replacement can be found at 'azuresphere.Product'."); }), }, vendors: ["azure"], services: ["azuresphere"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(Product || (Product = {})); exports.Product = Product;