@pulumi/google-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) • 20.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.SpokeIamPolicy = exports.SpokeIamMember = exports.SpokeIamBinding = exports.Spoke = exports.InternalRangeIamPolicy = exports.InternalRangeIamMember = exports.InternalRangeIamBinding = exports.InternalRange = exports.HubIamPolicy = exports.HubIamMember = exports.HubIamBinding = exports.Hub = void 0;
const policy_1 = require("@pulumi/policy");
const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager");
const v1alpha1_1 = require("@pulumi/google-native/networkconnectivity/v1alpha1");
const v1alpha1_2 = require("@pulumi/google-native/networkconnectivity/v1alpha1");
const v1alpha1_3 = require("@pulumi/google-native/networkconnectivity/v1alpha1");
const v1alpha1_4 = require("@pulumi/google-native/networkconnectivity/v1alpha1");
const v1alpha1_5 = require("@pulumi/google-native/networkconnectivity/v1alpha1");
const v1alpha1_6 = require("@pulumi/google-native/networkconnectivity/v1alpha1");
const v1alpha1_7 = require("@pulumi/google-native/networkconnectivity/v1alpha1");
const v1alpha1_8 = require("@pulumi/google-native/networkconnectivity/v1alpha1");
const v1alpha1_9 = require("@pulumi/google-native/networkconnectivity/v1alpha1");
const v1alpha1_10 = require("@pulumi/google-native/networkconnectivity/v1alpha1");
const v1alpha1_11 = require("@pulumi/google-native/networkconnectivity/v1alpha1");
const v1alpha1_12 = require("@pulumi/google-native/networkconnectivity/v1alpha1");
var Hub;
(function (Hub) {
/**
* Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.Hub).
*
* @severity medium
* @frameworks none
* @topics alpha, api, unstable
* @link https://cloud.google.com/apis/design/versioning
*/
Hub.disallowAlphaResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "googlenative-networkconnectivity-v1alpha1-hub-disallow-alpha-resource",
description: "Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.Hub).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v1alpha1_1.Hub, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Networkconnectivity Hub shouldn't use an unstable API (networkconnectivity.v1alpha1.Hub).");
}),
},
vendors: ["google"],
services: ["networkconnectivity"],
severity: "medium",
topics: ["api", "unstable", "alpha"],
});
})(Hub || (Hub = {}));
exports.Hub = Hub;
var HubIamBinding;
(function (HubIamBinding) {
/**
* Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.HubIamBinding).
*
* @severity medium
* @frameworks none
* @topics alpha, api, unstable
* @link https://cloud.google.com/apis/design/versioning
*/
HubIamBinding.disallowAlphaResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "googlenative-networkconnectivity-v1alpha1-hubiambinding-disallow-alpha-resource",
description: "Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.HubIamBinding).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v1alpha1_2.HubIamBinding, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Networkconnectivity HubIamBinding shouldn't use an unstable API (networkconnectivity.v1alpha1.HubIamBinding).");
}),
},
vendors: ["google"],
services: ["networkconnectivity"],
severity: "medium",
topics: ["api", "unstable", "alpha"],
});
})(HubIamBinding || (HubIamBinding = {}));
exports.HubIamBinding = HubIamBinding;
var HubIamMember;
(function (HubIamMember) {
/**
* Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.HubIamMember).
*
* @severity medium
* @frameworks none
* @topics alpha, api, unstable
* @link https://cloud.google.com/apis/design/versioning
*/
HubIamMember.disallowAlphaResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "googlenative-networkconnectivity-v1alpha1-hubiammember-disallow-alpha-resource",
description: "Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.HubIamMember).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v1alpha1_3.HubIamMember, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Networkconnectivity HubIamMember shouldn't use an unstable API (networkconnectivity.v1alpha1.HubIamMember).");
}),
},
vendors: ["google"],
services: ["networkconnectivity"],
severity: "medium",
topics: ["api", "unstable", "alpha"],
});
})(HubIamMember || (HubIamMember = {}));
exports.HubIamMember = HubIamMember;
var HubIamPolicy;
(function (HubIamPolicy) {
/**
* Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.HubIamPolicy).
*
* @severity medium
* @frameworks none
* @topics alpha, api, unstable
* @link https://cloud.google.com/apis/design/versioning
*/
HubIamPolicy.disallowAlphaResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "googlenative-networkconnectivity-v1alpha1-hubiampolicy-disallow-alpha-resource",
description: "Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.HubIamPolicy).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v1alpha1_4.HubIamPolicy, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Networkconnectivity HubIamPolicy shouldn't use an unstable API (networkconnectivity.v1alpha1.HubIamPolicy).");
}),
},
vendors: ["google"],
services: ["networkconnectivity"],
severity: "medium",
topics: ["api", "unstable", "alpha"],
});
})(HubIamPolicy || (HubIamPolicy = {}));
exports.HubIamPolicy = HubIamPolicy;
var InternalRange;
(function (InternalRange) {
/**
* Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.InternalRange).
*
* @severity medium
* @frameworks none
* @topics alpha, api, unstable
* @link https://cloud.google.com/apis/design/versioning
*/
InternalRange.disallowAlphaResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "googlenative-networkconnectivity-v1alpha1-internalrange-disallow-alpha-resource",
description: "Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.InternalRange).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v1alpha1_5.InternalRange, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Networkconnectivity InternalRange shouldn't use an unstable API (networkconnectivity.v1alpha1.InternalRange).");
}),
},
vendors: ["google"],
services: ["networkconnectivity"],
severity: "medium",
topics: ["api", "unstable", "alpha"],
});
})(InternalRange || (InternalRange = {}));
exports.InternalRange = InternalRange;
var InternalRangeIamBinding;
(function (InternalRangeIamBinding) {
/**
* Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.InternalRangeIamBinding).
*
* @severity medium
* @frameworks none
* @topics alpha, api, unstable
* @link https://cloud.google.com/apis/design/versioning
*/
InternalRangeIamBinding.disallowAlphaResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "googlenative-networkconnectivity-v1alpha1-internalrangeiambinding-disallow-alpha-resource",
description: "Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.InternalRangeIamBinding).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v1alpha1_6.InternalRangeIamBinding, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Networkconnectivity InternalRangeIamBinding shouldn't use an unstable API (networkconnectivity.v1alpha1.InternalRangeIamBinding).");
}),
},
vendors: ["google"],
services: ["networkconnectivity"],
severity: "medium",
topics: ["api", "unstable", "alpha"],
});
})(InternalRangeIamBinding || (InternalRangeIamBinding = {}));
exports.InternalRangeIamBinding = InternalRangeIamBinding;
var InternalRangeIamMember;
(function (InternalRangeIamMember) {
/**
* Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.InternalRangeIamMember).
*
* @severity medium
* @frameworks none
* @topics alpha, api, unstable
* @link https://cloud.google.com/apis/design/versioning
*/
InternalRangeIamMember.disallowAlphaResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "googlenative-networkconnectivity-v1alpha1-internalrangeiammember-disallow-alpha-resource",
description: "Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.InternalRangeIamMember).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v1alpha1_7.InternalRangeIamMember, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Networkconnectivity InternalRangeIamMember shouldn't use an unstable API (networkconnectivity.v1alpha1.InternalRangeIamMember).");
}),
},
vendors: ["google"],
services: ["networkconnectivity"],
severity: "medium",
topics: ["api", "unstable", "alpha"],
});
})(InternalRangeIamMember || (InternalRangeIamMember = {}));
exports.InternalRangeIamMember = InternalRangeIamMember;
var InternalRangeIamPolicy;
(function (InternalRangeIamPolicy) {
/**
* Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.InternalRangeIamPolicy).
*
* @severity medium
* @frameworks none
* @topics alpha, api, unstable
* @link https://cloud.google.com/apis/design/versioning
*/
InternalRangeIamPolicy.disallowAlphaResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "googlenative-networkconnectivity-v1alpha1-internalrangeiampolicy-disallow-alpha-resource",
description: "Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.InternalRangeIamPolicy).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v1alpha1_8.InternalRangeIamPolicy, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Networkconnectivity InternalRangeIamPolicy shouldn't use an unstable API (networkconnectivity.v1alpha1.InternalRangeIamPolicy).");
}),
},
vendors: ["google"],
services: ["networkconnectivity"],
severity: "medium",
topics: ["api", "unstable", "alpha"],
});
})(InternalRangeIamPolicy || (InternalRangeIamPolicy = {}));
exports.InternalRangeIamPolicy = InternalRangeIamPolicy;
var Spoke;
(function (Spoke) {
/**
* Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.Spoke).
*
* @severity medium
* @frameworks none
* @topics alpha, api, unstable
* @link https://cloud.google.com/apis/design/versioning
*/
Spoke.disallowAlphaResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "googlenative-networkconnectivity-v1alpha1-spoke-disallow-alpha-resource",
description: "Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.Spoke).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v1alpha1_9.Spoke, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Networkconnectivity Spoke shouldn't use an unstable API (networkconnectivity.v1alpha1.Spoke).");
}),
},
vendors: ["google"],
services: ["networkconnectivity"],
severity: "medium",
topics: ["api", "unstable", "alpha"],
});
})(Spoke || (Spoke = {}));
exports.Spoke = Spoke;
var SpokeIamBinding;
(function (SpokeIamBinding) {
/**
* Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.SpokeIamBinding).
*
* @severity medium
* @frameworks none
* @topics alpha, api, unstable
* @link https://cloud.google.com/apis/design/versioning
*/
SpokeIamBinding.disallowAlphaResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "googlenative-networkconnectivity-v1alpha1-spokeiambinding-disallow-alpha-resource",
description: "Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.SpokeIamBinding).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v1alpha1_10.SpokeIamBinding, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Networkconnectivity SpokeIamBinding shouldn't use an unstable API (networkconnectivity.v1alpha1.SpokeIamBinding).");
}),
},
vendors: ["google"],
services: ["networkconnectivity"],
severity: "medium",
topics: ["api", "unstable", "alpha"],
});
})(SpokeIamBinding || (SpokeIamBinding = {}));
exports.SpokeIamBinding = SpokeIamBinding;
var SpokeIamMember;
(function (SpokeIamMember) {
/**
* Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.SpokeIamMember).
*
* @severity medium
* @frameworks none
* @topics alpha, api, unstable
* @link https://cloud.google.com/apis/design/versioning
*/
SpokeIamMember.disallowAlphaResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "googlenative-networkconnectivity-v1alpha1-spokeiammember-disallow-alpha-resource",
description: "Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.SpokeIamMember).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v1alpha1_11.SpokeIamMember, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Networkconnectivity SpokeIamMember shouldn't use an unstable API (networkconnectivity.v1alpha1.SpokeIamMember).");
}),
},
vendors: ["google"],
services: ["networkconnectivity"],
severity: "medium",
topics: ["api", "unstable", "alpha"],
});
})(SpokeIamMember || (SpokeIamMember = {}));
exports.SpokeIamMember = SpokeIamMember;
var SpokeIamPolicy;
(function (SpokeIamPolicy) {
/**
* Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.SpokeIamPolicy).
*
* @severity medium
* @frameworks none
* @topics alpha, api, unstable
* @link https://cloud.google.com/apis/design/versioning
*/
SpokeIamPolicy.disallowAlphaResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "googlenative-networkconnectivity-v1alpha1-spokeiampolicy-disallow-alpha-resource",
description: "Disallow the use of non-stable (Alpha) resouces (networkconnectivity.v1alpha1.SpokeIamPolicy).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v1alpha1_12.SpokeIamPolicy, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Networkconnectivity SpokeIamPolicy shouldn't use an unstable API (networkconnectivity.v1alpha1.SpokeIamPolicy).");
}),
},
vendors: ["google"],
services: ["networkconnectivity"],
severity: "medium",
topics: ["api", "unstable", "alpha"],
});
})(SpokeIamPolicy || (SpokeIamPolicy = {}));
exports.SpokeIamPolicy = SpokeIamPolicy;