@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.
365 lines (364 loc) • 19.2 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.Schedule = exports.ProjectEnvironmentType = exports.Project = exports.Pool = exports.NetworkConnection = exports.Gallery = exports.EnvironmentType = exports.DevCenter = exports.DevBoxDefinition = exports.Catalog = exports.AttachedNetworkByDevCenter = 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/devcenter/v20230801preview");
const v20230801preview_2 = require("@pulumi/azure-native/devcenter/v20230801preview");
const v20230801preview_3 = require("@pulumi/azure-native/devcenter/v20230801preview");
const v20230801preview_4 = require("@pulumi/azure-native/devcenter/v20230801preview");
const v20230801preview_5 = require("@pulumi/azure-native/devcenter/v20230801preview");
const v20230801preview_6 = require("@pulumi/azure-native/devcenter/v20230801preview");
const v20230801preview_7 = require("@pulumi/azure-native/devcenter/v20230801preview");
const v20230801preview_8 = require("@pulumi/azure-native/devcenter/v20230801preview");
const v20230801preview_9 = require("@pulumi/azure-native/devcenter/v20230801preview");
const v20230801preview_10 = require("@pulumi/azure-native/devcenter/v20230801preview");
const v20230801preview_11 = require("@pulumi/azure-native/devcenter/v20230801preview");
var AttachedNetworkByDevCenter;
(function (AttachedNetworkByDevCenter) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.AttachedNetworkByDevCenter).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
AttachedNetworkByDevCenter.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-devcenter-v20230801preview-attachednetworkbydevcenter-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.AttachedNetworkByDevCenter).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_1.AttachedNetworkByDevCenter, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure AttachedNetworkByDevCenter shouldn't use an unstable API (devcenter.v20230801preview.AttachedNetworkByDevCenter). A compatible replacement can be found at 'devcenter.AttachedNetworkByDevCenter'.");
}),
},
vendors: ["azure"],
services: ["devcenter"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(AttachedNetworkByDevCenter || (AttachedNetworkByDevCenter = {}));
exports.AttachedNetworkByDevCenter = AttachedNetworkByDevCenter;
var Catalog;
(function (Catalog) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.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-devcenter-v20230801preview-catalog-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.Catalog).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_2.Catalog, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Catalog shouldn't use an unstable API (devcenter.v20230801preview.Catalog). A compatible replacement can be found at 'devcenter.Catalog'.");
}),
},
vendors: ["azure"],
services: ["devcenter"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Catalog || (Catalog = {}));
exports.Catalog = Catalog;
var DevBoxDefinition;
(function (DevBoxDefinition) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.DevBoxDefinition).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
DevBoxDefinition.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-devcenter-v20230801preview-devboxdefinition-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.DevBoxDefinition).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_3.DevBoxDefinition, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure DevBoxDefinition shouldn't use an unstable API (devcenter.v20230801preview.DevBoxDefinition). A compatible replacement can be found at 'devcenter.DevBoxDefinition'.");
}),
},
vendors: ["azure"],
services: ["devcenter"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(DevBoxDefinition || (DevBoxDefinition = {}));
exports.DevBoxDefinition = DevBoxDefinition;
var DevCenter;
(function (DevCenter) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.DevCenter).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
DevCenter.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-devcenter-v20230801preview-devcenter-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.DevCenter).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_4.DevCenter, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure DevCenter shouldn't use an unstable API (devcenter.v20230801preview.DevCenter). A compatible replacement can be found at 'devcenter.DevCenter'.");
}),
},
vendors: ["azure"],
services: ["devcenter"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(DevCenter || (DevCenter = {}));
exports.DevCenter = DevCenter;
var EnvironmentType;
(function (EnvironmentType) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.EnvironmentType).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
EnvironmentType.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-devcenter-v20230801preview-environmenttype-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.EnvironmentType).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_5.EnvironmentType, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure EnvironmentType shouldn't use an unstable API (devcenter.v20230801preview.EnvironmentType). A compatible replacement can be found at 'devcenter.EnvironmentType'.");
}),
},
vendors: ["azure"],
services: ["devcenter"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(EnvironmentType || (EnvironmentType = {}));
exports.EnvironmentType = EnvironmentType;
var Gallery;
(function (Gallery) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.Gallery).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
Gallery.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-devcenter-v20230801preview-gallery-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.Gallery).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_6.Gallery, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Gallery shouldn't use an unstable API (devcenter.v20230801preview.Gallery). A compatible replacement can be found at 'devcenter.Gallery'.");
}),
},
vendors: ["azure"],
services: ["devcenter"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Gallery || (Gallery = {}));
exports.Gallery = Gallery;
var NetworkConnection;
(function (NetworkConnection) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.NetworkConnection).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
NetworkConnection.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-devcenter-v20230801preview-networkconnection-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.NetworkConnection).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_7.NetworkConnection, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure NetworkConnection shouldn't use an unstable API (devcenter.v20230801preview.NetworkConnection). A compatible replacement can be found at 'devcenter.NetworkConnection'.");
}),
},
vendors: ["azure"],
services: ["devcenter"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(NetworkConnection || (NetworkConnection = {}));
exports.NetworkConnection = NetworkConnection;
var Pool;
(function (Pool) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.Pool).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
Pool.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-devcenter-v20230801preview-pool-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.Pool).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_8.Pool, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Pool shouldn't use an unstable API (devcenter.v20230801preview.Pool). A compatible replacement can be found at 'devcenter.Pool'.");
}),
},
vendors: ["azure"],
services: ["devcenter"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Pool || (Pool = {}));
exports.Pool = Pool;
var Project;
(function (Project) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.Project).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
Project.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-devcenter-v20230801preview-project-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.Project).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_9.Project, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Project shouldn't use an unstable API (devcenter.v20230801preview.Project). A compatible replacement can be found at 'devcenter.Project'.");
}),
},
vendors: ["azure"],
services: ["devcenter"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Project || (Project = {}));
exports.Project = Project;
var ProjectEnvironmentType;
(function (ProjectEnvironmentType) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.ProjectEnvironmentType).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
ProjectEnvironmentType.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-devcenter-v20230801preview-projectenvironmenttype-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.ProjectEnvironmentType).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_10.ProjectEnvironmentType, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure ProjectEnvironmentType shouldn't use an unstable API (devcenter.v20230801preview.ProjectEnvironmentType). A compatible replacement can be found at 'devcenter.ProjectEnvironmentType'.");
}),
},
vendors: ["azure"],
services: ["devcenter"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(ProjectEnvironmentType || (ProjectEnvironmentType = {}));
exports.ProjectEnvironmentType = ProjectEnvironmentType;
var Schedule;
(function (Schedule) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.Schedule).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
Schedule.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-devcenter-v20230801preview-schedule-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (devcenter.v20230801preview.Schedule).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230801preview_11.Schedule, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Schedule shouldn't use an unstable API (devcenter.v20230801preview.Schedule). A compatible replacement can be found at 'devcenter.Schedule'.");
}),
},
vendors: ["azure"],
services: ["devcenter"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Schedule || (Schedule = {}));
exports.Schedule = Schedule;