@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.
148 lines (147 loc) • 7.66 kB
JavaScript
"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.PrivateEndpointConnection = exports.Channel = exports.BotConnection = exports.Bot = void 0;
const policy_1 = require("@pulumi/policy");
const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager");
const v20230915preview_1 = require("@pulumi/azure-native/botservice/v20230915preview");
const v20230915preview_2 = require("@pulumi/azure-native/botservice/v20230915preview");
const v20230915preview_3 = require("@pulumi/azure-native/botservice/v20230915preview");
const v20230915preview_4 = require("@pulumi/azure-native/botservice/v20230915preview");
var Bot;
(function (Bot) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (botservice.v20230915preview.Bot).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
Bot.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-botservice-v20230915preview-bot-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (botservice.v20230915preview.Bot).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230915preview_1.Bot, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Bot shouldn't use an unstable API (botservice.v20230915preview.Bot). A compatible replacement can be found at 'botservice.Bot'.");
}),
},
vendors: ["azure"],
services: ["botservice"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Bot || (Bot = {}));
exports.Bot = Bot;
var BotConnection;
(function (BotConnection) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (botservice.v20230915preview.BotConnection).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
BotConnection.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-botservice-v20230915preview-botconnection-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (botservice.v20230915preview.BotConnection).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230915preview_2.BotConnection, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure BotConnection shouldn't use an unstable API (botservice.v20230915preview.BotConnection). A compatible replacement can be found at 'botservice.BotConnection'.");
}),
},
vendors: ["azure"],
services: ["botservice"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(BotConnection || (BotConnection = {}));
exports.BotConnection = BotConnection;
var Channel;
(function (Channel) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (botservice.v20230915preview.Channel).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
Channel.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-botservice-v20230915preview-channel-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (botservice.v20230915preview.Channel).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230915preview_3.Channel, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Channel shouldn't use an unstable API (botservice.v20230915preview.Channel). A compatible replacement can be found at 'botservice.Channel'.");
}),
},
vendors: ["azure"],
services: ["botservice"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Channel || (Channel = {}));
exports.Channel = Channel;
var PrivateEndpointConnection;
(function (PrivateEndpointConnection) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (botservice.v20230915preview.PrivateEndpointConnection).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
PrivateEndpointConnection.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-botservice-v20230915preview-privateendpointconnection-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (botservice.v20230915preview.PrivateEndpointConnection).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230915preview_4.PrivateEndpointConnection, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure PrivateEndpointConnection shouldn't use an unstable API (botservice.v20230915preview.PrivateEndpointConnection). A compatible replacement can be found at 'botservice.PrivateEndpointConnection'.");
}),
},
vendors: ["azure"],
services: ["botservice"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(PrivateEndpointConnection || (PrivateEndpointConnection = {}));
exports.PrivateEndpointConnection = PrivateEndpointConnection;