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.

241 lines (240 loc) 13.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.WebPubSubSharedPrivateLinkResource = exports.WebPubSubReplica = exports.WebPubSubPrivateEndpointConnection = exports.WebPubSubHub = exports.WebPubSubCustomDomain = exports.WebPubSubCustomCertificate = exports.WebPubSub = void 0; const policy_1 = require("@pulumi/policy"); const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager"); const v20240401preview_1 = require("@pulumi/azure-native/webpubsub/v20240401preview"); const v20240401preview_2 = require("@pulumi/azure-native/webpubsub/v20240401preview"); const v20240401preview_3 = require("@pulumi/azure-native/webpubsub/v20240401preview"); const v20240401preview_4 = require("@pulumi/azure-native/webpubsub/v20240401preview"); const v20240401preview_5 = require("@pulumi/azure-native/webpubsub/v20240401preview"); const v20240401preview_6 = require("@pulumi/azure-native/webpubsub/v20240401preview"); const v20240401preview_7 = require("@pulumi/azure-native/webpubsub/v20240401preview"); var WebPubSub; (function (WebPubSub) { /** * Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSub). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ WebPubSub.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-webpubsub-v20240401preview-webpubsub-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSub).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240401preview_1.WebPubSub, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure WebPubSub shouldn't use an unstable API (webpubsub.v20240401preview.WebPubSub). A compatible replacement can be found at 'webpubsub.WebPubSub'."); }), }, vendors: ["azure"], services: ["webpubsub"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(WebPubSub || (WebPubSub = {})); exports.WebPubSub = WebPubSub; var WebPubSubCustomCertificate; (function (WebPubSubCustomCertificate) { /** * Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSubCustomCertificate). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ WebPubSubCustomCertificate.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-webpubsub-v20240401preview-webpubsubcustomcertificate-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSubCustomCertificate).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240401preview_2.WebPubSubCustomCertificate, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure WebPubSubCustomCertificate shouldn't use an unstable API (webpubsub.v20240401preview.WebPubSubCustomCertificate). A compatible replacement can be found at 'webpubsub.WebPubSubCustomCertificate'."); }), }, vendors: ["azure"], services: ["webpubsub"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(WebPubSubCustomCertificate || (WebPubSubCustomCertificate = {})); exports.WebPubSubCustomCertificate = WebPubSubCustomCertificate; var WebPubSubCustomDomain; (function (WebPubSubCustomDomain) { /** * Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSubCustomDomain). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ WebPubSubCustomDomain.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-webpubsub-v20240401preview-webpubsubcustomdomain-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSubCustomDomain).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240401preview_3.WebPubSubCustomDomain, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure WebPubSubCustomDomain shouldn't use an unstable API (webpubsub.v20240401preview.WebPubSubCustomDomain). A compatible replacement can be found at 'webpubsub.WebPubSubCustomDomain'."); }), }, vendors: ["azure"], services: ["webpubsub"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(WebPubSubCustomDomain || (WebPubSubCustomDomain = {})); exports.WebPubSubCustomDomain = WebPubSubCustomDomain; var WebPubSubHub; (function (WebPubSubHub) { /** * Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSubHub). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ WebPubSubHub.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-webpubsub-v20240401preview-webpubsubhub-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSubHub).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240401preview_4.WebPubSubHub, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure WebPubSubHub shouldn't use an unstable API (webpubsub.v20240401preview.WebPubSubHub). A compatible replacement can be found at 'webpubsub.WebPubSubHub'."); }), }, vendors: ["azure"], services: ["webpubsub"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(WebPubSubHub || (WebPubSubHub = {})); exports.WebPubSubHub = WebPubSubHub; var WebPubSubPrivateEndpointConnection; (function (WebPubSubPrivateEndpointConnection) { /** * Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSubPrivateEndpointConnection). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ WebPubSubPrivateEndpointConnection.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-webpubsub-v20240401preview-webpubsubprivateendpointconnection-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSubPrivateEndpointConnection).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240401preview_5.WebPubSubPrivateEndpointConnection, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure WebPubSubPrivateEndpointConnection shouldn't use an unstable API (webpubsub.v20240401preview.WebPubSubPrivateEndpointConnection). A compatible replacement can be found at 'webpubsub.WebPubSubPrivateEndpointConnection'."); }), }, vendors: ["azure"], services: ["webpubsub"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(WebPubSubPrivateEndpointConnection || (WebPubSubPrivateEndpointConnection = {})); exports.WebPubSubPrivateEndpointConnection = WebPubSubPrivateEndpointConnection; var WebPubSubReplica; (function (WebPubSubReplica) { /** * Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSubReplica). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ WebPubSubReplica.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-webpubsub-v20240401preview-webpubsubreplica-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSubReplica).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240401preview_6.WebPubSubReplica, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure WebPubSubReplica shouldn't use an unstable API (webpubsub.v20240401preview.WebPubSubReplica). A compatible replacement can be found at 'webpubsub.WebPubSubReplica'."); }), }, vendors: ["azure"], services: ["webpubsub"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(WebPubSubReplica || (WebPubSubReplica = {})); exports.WebPubSubReplica = WebPubSubReplica; var WebPubSubSharedPrivateLinkResource; (function (WebPubSubSharedPrivateLinkResource) { /** * Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSubSharedPrivateLinkResource). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ WebPubSubSharedPrivateLinkResource.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-webpubsub-v20240401preview-webpubsubsharedprivatelinkresource-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (webpubsub.v20240401preview.WebPubSubSharedPrivateLinkResource).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20240401preview_7.WebPubSubSharedPrivateLinkResource, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure WebPubSubSharedPrivateLinkResource shouldn't use an unstable API (webpubsub.v20240401preview.WebPubSubSharedPrivateLinkResource). A compatible replacement can be found at 'webpubsub.WebPubSubSharedPrivateLinkResource'."); }), }, vendors: ["azure"], services: ["webpubsub"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(WebPubSubSharedPrivateLinkResource || (WebPubSubSharedPrivateLinkResource = {})); exports.WebPubSubSharedPrivateLinkResource = WebPubSubSharedPrivateLinkResource;