@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.
272 lines (271 loc) • 14.8 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.VirtualMachineInstance = exports.VirtualHardDisk = exports.StorageContainer = exports.NetworkInterface = exports.MarketplaceGalleryImage = exports.GuestAgent = exports.GalleryImage = void 0;
const policy_1 = require("@pulumi/policy");
const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager");
const v20230701preview_1 = require("@pulumi/azure-native/azurestackhci/v20230701preview");
const v20230701preview_2 = require("@pulumi/azure-native/azurestackhci/v20230701preview");
const v20230701preview_3 = require("@pulumi/azure-native/azurestackhci/v20230701preview");
const v20230701preview_4 = require("@pulumi/azure-native/azurestackhci/v20230701preview");
const v20230701preview_5 = require("@pulumi/azure-native/azurestackhci/v20230701preview");
const v20230701preview_6 = require("@pulumi/azure-native/azurestackhci/v20230701preview");
const v20230701preview_7 = require("@pulumi/azure-native/azurestackhci/v20230701preview");
const v20230701preview_8 = require("@pulumi/azure-native/azurestackhci/v20230701preview");
var GalleryImage;
(function (GalleryImage) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.GalleryImage).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
GalleryImage.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-azurestackhci-v20230701preview-galleryimage-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.GalleryImage).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230701preview_1.GalleryImage, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure GalleryImage shouldn't use an unstable API (azurestackhci.v20230701preview.GalleryImage). A compatible replacement can be found at 'azurestackhci.GalleryImage'.");
}),
},
vendors: ["azure"],
services: ["azurestackhci"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(GalleryImage || (GalleryImage = {}));
exports.GalleryImage = GalleryImage;
var GuestAgent;
(function (GuestAgent) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.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-azurestackhci-v20230701preview-guestagent-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.GuestAgent).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230701preview_2.GuestAgent, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure GuestAgent shouldn't use an unstable API (azurestackhci.v20230701preview.GuestAgent).");
}),
},
vendors: ["azure"],
services: ["azurestackhci"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(GuestAgent || (GuestAgent = {}));
exports.GuestAgent = GuestAgent;
var MarketplaceGalleryImage;
(function (MarketplaceGalleryImage) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.MarketplaceGalleryImage).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
MarketplaceGalleryImage.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-azurestackhci-v20230701preview-marketplacegalleryimage-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.MarketplaceGalleryImage).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230701preview_3.MarketplaceGalleryImage, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure MarketplaceGalleryImage shouldn't use an unstable API (azurestackhci.v20230701preview.MarketplaceGalleryImage). A compatible replacement can be found at 'azurestackhci.MarketplaceGalleryImage'.");
}),
},
vendors: ["azure"],
services: ["azurestackhci"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(MarketplaceGalleryImage || (MarketplaceGalleryImage = {}));
exports.MarketplaceGalleryImage = MarketplaceGalleryImage;
var NetworkInterface;
(function (NetworkInterface) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.NetworkInterface).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
NetworkInterface.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-azurestackhci-v20230701preview-networkinterface-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.NetworkInterface).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230701preview_4.NetworkInterface, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure NetworkInterface shouldn't use an unstable API (azurestackhci.v20230701preview.NetworkInterface). A compatible replacement can be found at 'azurestackhci.NetworkInterface'.");
}),
},
vendors: ["azure"],
services: ["azurestackhci"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(NetworkInterface || (NetworkInterface = {}));
exports.NetworkInterface = NetworkInterface;
var StorageContainer;
(function (StorageContainer) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.StorageContainer).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
StorageContainer.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-azurestackhci-v20230701preview-storagecontainer-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.StorageContainer).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230701preview_5.StorageContainer, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure StorageContainer shouldn't use an unstable API (azurestackhci.v20230701preview.StorageContainer). A compatible replacement can be found at 'azurestackhci.StorageContainer'.");
}),
},
vendors: ["azure"],
services: ["azurestackhci"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(StorageContainer || (StorageContainer = {}));
exports.StorageContainer = StorageContainer;
var VirtualHardDisk;
(function (VirtualHardDisk) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.VirtualHardDisk).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
VirtualHardDisk.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-azurestackhci-v20230701preview-virtualharddisk-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.VirtualHardDisk).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230701preview_6.VirtualHardDisk, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure VirtualHardDisk shouldn't use an unstable API (azurestackhci.v20230701preview.VirtualHardDisk). A compatible replacement can be found at 'azurestackhci.VirtualHardDisk'.");
}),
},
vendors: ["azure"],
services: ["azurestackhci"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(VirtualHardDisk || (VirtualHardDisk = {}));
exports.VirtualHardDisk = VirtualHardDisk;
var VirtualMachineInstance;
(function (VirtualMachineInstance) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.VirtualMachineInstance).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
VirtualMachineInstance.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-azurestackhci-v20230701preview-virtualmachineinstance-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.VirtualMachineInstance).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230701preview_7.VirtualMachineInstance, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure VirtualMachineInstance shouldn't use an unstable API (azurestackhci.v20230701preview.VirtualMachineInstance). A compatible replacement can be found at 'azurestackhci.VirtualMachineInstance'.");
}),
},
vendors: ["azure"],
services: ["azurestackhci"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(VirtualMachineInstance || (VirtualMachineInstance = {}));
exports.VirtualMachineInstance = VirtualMachineInstance;
var VirtualNetwork;
(function (VirtualNetwork) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.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-azurestackhci-v20230701preview-virtualnetwork-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (azurestackhci.v20230701preview.VirtualNetwork).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20230701preview_8.VirtualNetwork, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure VirtualNetwork shouldn't use an unstable API (azurestackhci.v20230701preview.VirtualNetwork). A compatible replacement can be found at 'azurestackhci.VirtualNetwork'.");
}),
},
vendors: ["azure"],
services: ["azurestackhci"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(VirtualNetwork || (VirtualNetwork = {}));
exports.VirtualNetwork = VirtualNetwork;