@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.
396 lines (395 loc) • 21.9 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.VirtualNetwork = exports.VirtualMachineTemplate = exports.VirtualMachine = exports.VCenter = exports.ResourcePool = exports.MachineExtension = exports.InventoryItem = exports.HybridIdentityMetadatum = exports.Host = exports.GuestAgent = exports.Datastore = exports.Cluster = void 0;
const policy_1 = require("@pulumi/policy");
const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager");
const v20220715preview_1 = require("@pulumi/azure-native/connectedvmwarevsphere/v20220715preview");
const v20220715preview_2 = require("@pulumi/azure-native/connectedvmwarevsphere/v20220715preview");
const v20220715preview_3 = require("@pulumi/azure-native/connectedvmwarevsphere/v20220715preview");
const v20220715preview_4 = require("@pulumi/azure-native/connectedvmwarevsphere/v20220715preview");
const v20220715preview_5 = require("@pulumi/azure-native/connectedvmwarevsphere/v20220715preview");
const v20220715preview_6 = require("@pulumi/azure-native/connectedvmwarevsphere/v20220715preview");
const v20220715preview_7 = require("@pulumi/azure-native/connectedvmwarevsphere/v20220715preview");
const v20220715preview_8 = require("@pulumi/azure-native/connectedvmwarevsphere/v20220715preview");
const v20220715preview_9 = require("@pulumi/azure-native/connectedvmwarevsphere/v20220715preview");
const v20220715preview_10 = require("@pulumi/azure-native/connectedvmwarevsphere/v20220715preview");
const v20220715preview_11 = require("@pulumi/azure-native/connectedvmwarevsphere/v20220715preview");
const v20220715preview_12 = require("@pulumi/azure-native/connectedvmwarevsphere/v20220715preview");
var Cluster;
(function (Cluster) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.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-connectedvmwarevsphere-v20220715preview-cluster-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.Cluster).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220715preview_1.Cluster, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Cluster shouldn't use an unstable API (connectedvmwarevsphere.v20220715preview.Cluster). A compatible replacement can be found at 'connectedvmwarevsphere.Cluster'.");
}),
},
vendors: ["azure"],
services: ["connectedvmwarevsphere"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Cluster || (Cluster = {}));
exports.Cluster = Cluster;
var Datastore;
(function (Datastore) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.Datastore).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
Datastore.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-connectedvmwarevsphere-v20220715preview-datastore-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.Datastore).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220715preview_2.Datastore, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Datastore shouldn't use an unstable API (connectedvmwarevsphere.v20220715preview.Datastore). A compatible replacement can be found at 'connectedvmwarevsphere.Datastore'.");
}),
},
vendors: ["azure"],
services: ["connectedvmwarevsphere"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Datastore || (Datastore = {}));
exports.Datastore = Datastore;
var GuestAgent;
(function (GuestAgent) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.GuestAgent).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
GuestAgent.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-connectedvmwarevsphere-v20220715preview-guestagent-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.GuestAgent).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220715preview_3.GuestAgent, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure GuestAgent shouldn't use an unstable API (connectedvmwarevsphere.v20220715preview.GuestAgent). A compatible replacement can be found at 'connectedvmwarevsphere.GuestAgent'.");
}),
},
vendors: ["azure"],
services: ["connectedvmwarevsphere"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(GuestAgent || (GuestAgent = {}));
exports.GuestAgent = GuestAgent;
var Host;
(function (Host) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.Host).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
Host.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-connectedvmwarevsphere-v20220715preview-host-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.Host).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220715preview_4.Host, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Host shouldn't use an unstable API (connectedvmwarevsphere.v20220715preview.Host). A compatible replacement can be found at 'connectedvmwarevsphere.Host'.");
}),
},
vendors: ["azure"],
services: ["connectedvmwarevsphere"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Host || (Host = {}));
exports.Host = Host;
var HybridIdentityMetadatum;
(function (HybridIdentityMetadatum) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.HybridIdentityMetadatum).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
HybridIdentityMetadatum.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-connectedvmwarevsphere-v20220715preview-hybrididentitymetadatum-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.HybridIdentityMetadatum).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220715preview_5.HybridIdentityMetadatum, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure HybridIdentityMetadatum shouldn't use an unstable API (connectedvmwarevsphere.v20220715preview.HybridIdentityMetadatum). A compatible replacement can be found at 'connectedvmwarevsphere.HybridIdentityMetadatum'.");
}),
},
vendors: ["azure"],
services: ["connectedvmwarevsphere"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(HybridIdentityMetadatum || (HybridIdentityMetadatum = {}));
exports.HybridIdentityMetadatum = HybridIdentityMetadatum;
var InventoryItem;
(function (InventoryItem) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.InventoryItem).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
InventoryItem.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-connectedvmwarevsphere-v20220715preview-inventoryitem-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.InventoryItem).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220715preview_6.InventoryItem, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure InventoryItem shouldn't use an unstable API (connectedvmwarevsphere.v20220715preview.InventoryItem). A compatible replacement can be found at 'connectedvmwarevsphere.InventoryItem'.");
}),
},
vendors: ["azure"],
services: ["connectedvmwarevsphere"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(InventoryItem || (InventoryItem = {}));
exports.InventoryItem = InventoryItem;
var MachineExtension;
(function (MachineExtension) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.MachineExtension).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
MachineExtension.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-connectedvmwarevsphere-v20220715preview-machineextension-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.MachineExtension).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220715preview_7.MachineExtension, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure MachineExtension shouldn't use an unstable API (connectedvmwarevsphere.v20220715preview.MachineExtension). A compatible replacement can be found at 'connectedvmwarevsphere.MachineExtension'.");
}),
},
vendors: ["azure"],
services: ["connectedvmwarevsphere"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(MachineExtension || (MachineExtension = {}));
exports.MachineExtension = MachineExtension;
var ResourcePool;
(function (ResourcePool) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.ResourcePool).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
ResourcePool.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-connectedvmwarevsphere-v20220715preview-resourcepool-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.ResourcePool).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220715preview_8.ResourcePool, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure ResourcePool shouldn't use an unstable API (connectedvmwarevsphere.v20220715preview.ResourcePool). A compatible replacement can be found at 'connectedvmwarevsphere.ResourcePool'.");
}),
},
vendors: ["azure"],
services: ["connectedvmwarevsphere"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(ResourcePool || (ResourcePool = {}));
exports.ResourcePool = ResourcePool;
var VCenter;
(function (VCenter) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.VCenter).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
VCenter.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-connectedvmwarevsphere-v20220715preview-vcenter-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.VCenter).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220715preview_9.VCenter, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure VCenter shouldn't use an unstable API (connectedvmwarevsphere.v20220715preview.VCenter). A compatible replacement can be found at 'connectedvmwarevsphere.VCenter'.");
}),
},
vendors: ["azure"],
services: ["connectedvmwarevsphere"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(VCenter || (VCenter = {}));
exports.VCenter = VCenter;
var VirtualMachine;
(function (VirtualMachine) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.VirtualMachine).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
VirtualMachine.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-connectedvmwarevsphere-v20220715preview-virtualmachine-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.VirtualMachine).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220715preview_10.VirtualMachine, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure VirtualMachine shouldn't use an unstable API (connectedvmwarevsphere.v20220715preview.VirtualMachine). A compatible replacement can be found at 'connectedvmwarevsphere.VirtualMachine'.");
}),
},
vendors: ["azure"],
services: ["connectedvmwarevsphere"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(VirtualMachine || (VirtualMachine = {}));
exports.VirtualMachine = VirtualMachine;
var VirtualMachineTemplate;
(function (VirtualMachineTemplate) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.VirtualMachineTemplate).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
VirtualMachineTemplate.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-connectedvmwarevsphere-v20220715preview-virtualmachinetemplate-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.VirtualMachineTemplate).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220715preview_11.VirtualMachineTemplate, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure VirtualMachineTemplate shouldn't use an unstable API (connectedvmwarevsphere.v20220715preview.VirtualMachineTemplate). A compatible replacement can be found at 'connectedvmwarevsphere.VirtualMachineTemplate'.");
}),
},
vendors: ["azure"],
services: ["connectedvmwarevsphere"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(VirtualMachineTemplate || (VirtualMachineTemplate = {}));
exports.VirtualMachineTemplate = VirtualMachineTemplate;
var VirtualNetwork;
(function (VirtualNetwork) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.VirtualNetwork).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
VirtualNetwork.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-connectedvmwarevsphere-v20220715preview-virtualnetwork-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (connectedvmwarevsphere.v20220715preview.VirtualNetwork).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220715preview_12.VirtualNetwork, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure VirtualNetwork shouldn't use an unstable API (connectedvmwarevsphere.v20220715preview.VirtualNetwork). A compatible replacement can be found at 'connectedvmwarevsphere.VirtualNetwork'.");
}),
},
vendors: ["azure"],
services: ["connectedvmwarevsphere"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(VirtualNetwork || (VirtualNetwork = {}));
exports.VirtualNetwork = VirtualNetwork;