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.33 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.VirtualNetworkRule = exports.Server = exports.FirewallRule = exports.Database = exports.Configuration = void 0; const policy_1 = require("@pulumi/policy"); const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager"); const v20180601preview_1 = require("@pulumi/azure-native/dbformariadb/v20180601preview"); const v20180601preview_2 = require("@pulumi/azure-native/dbformariadb/v20180601preview"); const v20180601preview_3 = require("@pulumi/azure-native/dbformariadb/v20180601preview"); const v20180601preview_4 = require("@pulumi/azure-native/dbformariadb/v20180601preview"); const v20180601preview_5 = require("@pulumi/azure-native/dbformariadb/v20180601preview"); var Configuration; (function (Configuration) { /** * Disallow the use of non-stable (Preview) Azure resouces (dbformariadb.v20180601preview.Configuration). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ Configuration.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-dbformariadb-v20180601preview-configuration-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (dbformariadb.v20180601preview.Configuration).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20180601preview_1.Configuration, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure Configuration shouldn't use an unstable API (dbformariadb.v20180601preview.Configuration). A compatible replacement can be found at 'dbformariadb.Configuration'."); }), }, vendors: ["azure"], services: ["dbformariadb"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(Configuration || (Configuration = {})); exports.Configuration = Configuration; var Database; (function (Database) { /** * Disallow the use of non-stable (Preview) Azure resouces (dbformariadb.v20180601preview.Database). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ Database.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-dbformariadb-v20180601preview-database-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (dbformariadb.v20180601preview.Database).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20180601preview_2.Database, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure Database shouldn't use an unstable API (dbformariadb.v20180601preview.Database). A compatible replacement can be found at 'dbformariadb.Database'."); }), }, vendors: ["azure"], services: ["dbformariadb"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(Database || (Database = {})); exports.Database = Database; var FirewallRule; (function (FirewallRule) { /** * Disallow the use of non-stable (Preview) Azure resouces (dbformariadb.v20180601preview.FirewallRule). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ FirewallRule.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-dbformariadb-v20180601preview-firewallrule-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (dbformariadb.v20180601preview.FirewallRule).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20180601preview_3.FirewallRule, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure FirewallRule shouldn't use an unstable API (dbformariadb.v20180601preview.FirewallRule). A compatible replacement can be found at 'dbformariadb.FirewallRule'."); }), }, vendors: ["azure"], services: ["dbformariadb"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(FirewallRule || (FirewallRule = {})); exports.FirewallRule = FirewallRule; var Server; (function (Server) { /** * Disallow the use of non-stable (Preview) Azure resouces (dbformariadb.v20180601preview.Server). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ Server.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-dbformariadb-v20180601preview-server-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (dbformariadb.v20180601preview.Server).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20180601preview_4.Server, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure Server shouldn't use an unstable API (dbformariadb.v20180601preview.Server). A compatible replacement can be found at 'dbformariadb.Server'."); }), }, vendors: ["azure"], services: ["dbformariadb"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(Server || (Server = {})); exports.Server = Server; var VirtualNetworkRule; (function (VirtualNetworkRule) { /** * Disallow the use of non-stable (Preview) Azure resouces (dbformariadb.v20180601preview.VirtualNetworkRule). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ VirtualNetworkRule.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-dbformariadb-v20180601preview-virtualnetworkrule-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (dbformariadb.v20180601preview.VirtualNetworkRule).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20180601preview_5.VirtualNetworkRule, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure VirtualNetworkRule shouldn't use an unstable API (dbformariadb.v20180601preview.VirtualNetworkRule). A compatible replacement can be found at 'dbformariadb.VirtualNetworkRule'."); }), }, vendors: ["azure"], services: ["dbformariadb"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(VirtualNetworkRule || (VirtualNetworkRule = {})); exports.VirtualNetworkRule = VirtualNetworkRule;