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.

272 lines (271 loc) 14.2 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.UpdateSummary = exports.UpdateRun = exports.Update = exports.Extension = exports.EdgeDevice = exports.DeploymentSetting = exports.Cluster = exports.ArcSetting = 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/azurestackhci/v20230801preview"); const v20230801preview_2 = require("@pulumi/azure-native/azurestackhci/v20230801preview"); const v20230801preview_3 = require("@pulumi/azure-native/azurestackhci/v20230801preview"); const v20230801preview_4 = require("@pulumi/azure-native/azurestackhci/v20230801preview"); const v20230801preview_5 = require("@pulumi/azure-native/azurestackhci/v20230801preview"); const v20230801preview_6 = require("@pulumi/azure-native/azurestackhci/v20230801preview"); const v20230801preview_7 = require("@pulumi/azure-native/azurestackhci/v20230801preview"); const v20230801preview_8 = require("@pulumi/azure-native/azurestackhci/v20230801preview"); var ArcSetting; (function (ArcSetting) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.ArcSetting). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ ArcSetting.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20230801preview-arcsetting-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.ArcSetting).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_1.ArcSetting, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure ArcSetting shouldn't use an unstable API (azurestackhci.v20230801preview.ArcSetting). A compatible replacement can be found at 'azurestackhci.ArcSetting'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(ArcSetting || (ArcSetting = {})); exports.ArcSetting = ArcSetting; var Cluster; (function (Cluster) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.Cluster). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ Cluster.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20230801preview-cluster-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.Cluster).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_2.Cluster, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure Cluster shouldn't use an unstable API (azurestackhci.v20230801preview.Cluster). A compatible replacement can be found at 'azurestackhci.Cluster'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(Cluster || (Cluster = {})); exports.Cluster = Cluster; var DeploymentSetting; (function (DeploymentSetting) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.DeploymentSetting). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ DeploymentSetting.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20230801preview-deploymentsetting-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.DeploymentSetting).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_3.DeploymentSetting, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure DeploymentSetting shouldn't use an unstable API (azurestackhci.v20230801preview.DeploymentSetting). A compatible replacement can be found at 'azurestackhci.DeploymentSetting'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(DeploymentSetting || (DeploymentSetting = {})); exports.DeploymentSetting = DeploymentSetting; var EdgeDevice; (function (EdgeDevice) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.EdgeDevice). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ EdgeDevice.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20230801preview-edgedevice-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.EdgeDevice).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_4.EdgeDevice, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure EdgeDevice shouldn't use an unstable API (azurestackhci.v20230801preview.EdgeDevice). A compatible replacement can be found at 'azurestackhci.EdgeDevice'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(EdgeDevice || (EdgeDevice = {})); exports.EdgeDevice = EdgeDevice; var Extension; (function (Extension) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.Extension). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ Extension.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20230801preview-extension-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.Extension).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_5.Extension, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure Extension shouldn't use an unstable API (azurestackhci.v20230801preview.Extension). A compatible replacement can be found at 'azurestackhci.Extension'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(Extension || (Extension = {})); exports.Extension = Extension; var Update; (function (Update) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.Update). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ Update.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20230801preview-update-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.Update).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_6.Update, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure Update shouldn't use an unstable API (azurestackhci.v20230801preview.Update). A compatible replacement can be found at 'azurestackhci.Update'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(Update || (Update = {})); exports.Update = Update; var UpdateRun; (function (UpdateRun) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.UpdateRun). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ UpdateRun.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20230801preview-updaterun-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.UpdateRun).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_7.UpdateRun, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure UpdateRun shouldn't use an unstable API (azurestackhci.v20230801preview.UpdateRun). A compatible replacement can be found at 'azurestackhci.UpdateRun'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(UpdateRun || (UpdateRun = {})); exports.UpdateRun = UpdateRun; var UpdateSummary; (function (UpdateSummary) { /** * Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.UpdateSummary). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ UpdateSummary.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-azurestackhci-v20230801preview-updatesummary-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230801preview.UpdateSummary).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_8.UpdateSummary, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure UpdateSummary shouldn't use an unstable API (azurestackhci.v20230801preview.UpdateSummary). A compatible replacement can be found at 'azurestackhci.UpdateSummary'."); }), }, vendors: ["azure"], services: ["azurestackhci"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(UpdateSummary || (UpdateSummary = {})); exports.UpdateSummary = UpdateSummary;