@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.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.SchemaRegistry = exports.PrivateEndpointConnection = exports.NamespaceNetworkRuleSet = exports.NamespaceAuthorizationRule = exports.Namespace = exports.EventHubAuthorizationRule = exports.EventHub = exports.DisasterRecoveryConfig = exports.ConsumerGroup = exports.Cluster = exports.ApplicationGroup = void 0;
const policy_1 = require("@pulumi/policy");
const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager");
const v20221001preview_1 = require("@pulumi/azure-native/eventhub/v20221001preview");
const v20221001preview_2 = require("@pulumi/azure-native/eventhub/v20221001preview");
const v20221001preview_3 = require("@pulumi/azure-native/eventhub/v20221001preview");
const v20221001preview_4 = require("@pulumi/azure-native/eventhub/v20221001preview");
const v20221001preview_5 = require("@pulumi/azure-native/eventhub/v20221001preview");
const v20221001preview_6 = require("@pulumi/azure-native/eventhub/v20221001preview");
const v20221001preview_7 = require("@pulumi/azure-native/eventhub/v20221001preview");
const v20221001preview_8 = require("@pulumi/azure-native/eventhub/v20221001preview");
const v20221001preview_9 = require("@pulumi/azure-native/eventhub/v20221001preview");
const v20221001preview_10 = require("@pulumi/azure-native/eventhub/v20221001preview");
const v20221001preview_11 = require("@pulumi/azure-native/eventhub/v20221001preview");
var ApplicationGroup;
(function (ApplicationGroup) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.ApplicationGroup).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
ApplicationGroup.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-eventhub-v20221001preview-applicationgroup-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.ApplicationGroup).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20221001preview_1.ApplicationGroup, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure ApplicationGroup shouldn't use an unstable API (eventhub.v20221001preview.ApplicationGroup). A compatible replacement can be found at 'eventhub.ApplicationGroup'.");
}),
},
vendors: ["azure"],
services: ["eventhub"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(ApplicationGroup || (ApplicationGroup = {}));
exports.ApplicationGroup = ApplicationGroup;
var Cluster;
(function (Cluster) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.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-eventhub-v20221001preview-cluster-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.Cluster).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20221001preview_2.Cluster, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Cluster shouldn't use an unstable API (eventhub.v20221001preview.Cluster). A compatible replacement can be found at 'eventhub.Cluster'.");
}),
},
vendors: ["azure"],
services: ["eventhub"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Cluster || (Cluster = {}));
exports.Cluster = Cluster;
var ConsumerGroup;
(function (ConsumerGroup) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.ConsumerGroup).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
ConsumerGroup.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-eventhub-v20221001preview-consumergroup-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.ConsumerGroup).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20221001preview_3.ConsumerGroup, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure ConsumerGroup shouldn't use an unstable API (eventhub.v20221001preview.ConsumerGroup). A compatible replacement can be found at 'eventhub.ConsumerGroup'.");
}),
},
vendors: ["azure"],
services: ["eventhub"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(ConsumerGroup || (ConsumerGroup = {}));
exports.ConsumerGroup = ConsumerGroup;
var DisasterRecoveryConfig;
(function (DisasterRecoveryConfig) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.DisasterRecoveryConfig).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
DisasterRecoveryConfig.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-eventhub-v20221001preview-disasterrecoveryconfig-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.DisasterRecoveryConfig).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20221001preview_4.DisasterRecoveryConfig, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure DisasterRecoveryConfig shouldn't use an unstable API (eventhub.v20221001preview.DisasterRecoveryConfig). A compatible replacement can be found at 'eventhub.DisasterRecoveryConfig'.");
}),
},
vendors: ["azure"],
services: ["eventhub"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(DisasterRecoveryConfig || (DisasterRecoveryConfig = {}));
exports.DisasterRecoveryConfig = DisasterRecoveryConfig;
var EventHub;
(function (EventHub) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.EventHub).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
EventHub.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-eventhub-v20221001preview-eventhub-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.EventHub).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20221001preview_5.EventHub, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure EventHub shouldn't use an unstable API (eventhub.v20221001preview.EventHub). A compatible replacement can be found at 'eventhub.EventHub'.");
}),
},
vendors: ["azure"],
services: ["eventhub"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(EventHub || (EventHub = {}));
exports.EventHub = EventHub;
var EventHubAuthorizationRule;
(function (EventHubAuthorizationRule) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.EventHubAuthorizationRule).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
EventHubAuthorizationRule.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-eventhub-v20221001preview-eventhubauthorizationrule-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.EventHubAuthorizationRule).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20221001preview_6.EventHubAuthorizationRule, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure EventHubAuthorizationRule shouldn't use an unstable API (eventhub.v20221001preview.EventHubAuthorizationRule). A compatible replacement can be found at 'eventhub.EventHubAuthorizationRule'.");
}),
},
vendors: ["azure"],
services: ["eventhub"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(EventHubAuthorizationRule || (EventHubAuthorizationRule = {}));
exports.EventHubAuthorizationRule = EventHubAuthorizationRule;
var Namespace;
(function (Namespace) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.Namespace).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
Namespace.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-eventhub-v20221001preview-namespace-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.Namespace).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20221001preview_7.Namespace, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Namespace shouldn't use an unstable API (eventhub.v20221001preview.Namespace). A compatible replacement can be found at 'eventhub.Namespace'.");
}),
},
vendors: ["azure"],
services: ["eventhub"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Namespace || (Namespace = {}));
exports.Namespace = Namespace;
var NamespaceAuthorizationRule;
(function (NamespaceAuthorizationRule) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.NamespaceAuthorizationRule).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
NamespaceAuthorizationRule.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-eventhub-v20221001preview-namespaceauthorizationrule-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.NamespaceAuthorizationRule).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20221001preview_8.NamespaceAuthorizationRule, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure NamespaceAuthorizationRule shouldn't use an unstable API (eventhub.v20221001preview.NamespaceAuthorizationRule). A compatible replacement can be found at 'eventhub.NamespaceAuthorizationRule'.");
}),
},
vendors: ["azure"],
services: ["eventhub"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(NamespaceAuthorizationRule || (NamespaceAuthorizationRule = {}));
exports.NamespaceAuthorizationRule = NamespaceAuthorizationRule;
var NamespaceNetworkRuleSet;
(function (NamespaceNetworkRuleSet) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.NamespaceNetworkRuleSet).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
NamespaceNetworkRuleSet.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-eventhub-v20221001preview-namespacenetworkruleset-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.NamespaceNetworkRuleSet).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20221001preview_9.NamespaceNetworkRuleSet, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure NamespaceNetworkRuleSet shouldn't use an unstable API (eventhub.v20221001preview.NamespaceNetworkRuleSet). A compatible replacement can be found at 'eventhub.NamespaceNetworkRuleSet'.");
}),
},
vendors: ["azure"],
services: ["eventhub"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(NamespaceNetworkRuleSet || (NamespaceNetworkRuleSet = {}));
exports.NamespaceNetworkRuleSet = NamespaceNetworkRuleSet;
var PrivateEndpointConnection;
(function (PrivateEndpointConnection) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.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-eventhub-v20221001preview-privateendpointconnection-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.PrivateEndpointConnection).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20221001preview_10.PrivateEndpointConnection, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure PrivateEndpointConnection shouldn't use an unstable API (eventhub.v20221001preview.PrivateEndpointConnection). A compatible replacement can be found at 'eventhub.PrivateEndpointConnection'.");
}),
},
vendors: ["azure"],
services: ["eventhub"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(PrivateEndpointConnection || (PrivateEndpointConnection = {}));
exports.PrivateEndpointConnection = PrivateEndpointConnection;
var SchemaRegistry;
(function (SchemaRegistry) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.SchemaRegistry).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
SchemaRegistry.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-eventhub-v20221001preview-schemaregistry-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (eventhub.v20221001preview.SchemaRegistry).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20221001preview_11.SchemaRegistry, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure SchemaRegistry shouldn't use an unstable API (eventhub.v20221001preview.SchemaRegistry). A compatible replacement can be found at 'eventhub.SchemaRegistry'.");
}),
},
vendors: ["azure"],
services: ["eventhub"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(SchemaRegistry || (SchemaRegistry = {}));
exports.SchemaRegistry = SchemaRegistry;