@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
245 lines • 10.4 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Workload = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* The AssuredWorkloads Workload resource
*
* ## Example Usage
*
* ### Basic_workload
* A basic test of a assuredworkloads api
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const primary = new gcp.assuredworkloads.Workload("primary", {
* complianceRegime: "FEDRAMP_MODERATE",
* displayName: "{{display}}",
* location: "us-west1",
* organization: "123456789",
* billingAccount: "billingAccounts/000000-0000000-0000000-000000",
* kmsSettings: {
* nextRotationTime: "9999-10-02T15:01:23Z",
* rotationPeriod: "10368000s",
* },
* provisionedResourcesParent: "folders/519620126891",
* resourceSettings: [
* {
* displayName: "{{name}}",
* resourceType: "CONSUMER_FOLDER",
* },
* {
* resourceType: "ENCRYPTION_KEYS_PROJECT",
* },
* {
* resourceId: "ring",
* resourceType: "KEYRING",
* },
* ],
* violationNotificationsEnabled: true,
* workloadOptions: {
* kajEnrollmentType: "KEY_ACCESS_TRANSPARENCY_OFF",
* },
* labels: {
* "label-one": "value-one",
* },
* });
* ```
* ### Sovereign_controls_workload
* A Sovereign Controls test of the assuredworkloads api
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const primary = new gcp.assuredworkloads.Workload("primary", {
* complianceRegime: "EU_REGIONS_AND_SUPPORT",
* displayName: "display",
* location: "europe-west9",
* organization: "123456789",
* billingAccount: "billingAccounts/000000-0000000-0000000-000000",
* enableSovereignControls: true,
* kmsSettings: {
* nextRotationTime: "9999-10-02T15:01:23Z",
* rotationPeriod: "10368000s",
* },
* resourceSettings: [
* {
* resourceType: "CONSUMER_FOLDER",
* },
* {
* resourceType: "ENCRYPTION_KEYS_PROJECT",
* },
* {
* resourceId: "ring",
* resourceType: "KEYRING",
* },
* ],
* labels: {
* "label-one": "value-one",
* },
* });
* ```
* ### Split_billing_partner_workload
* A Split billing partner test of the assuredworkloads api
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const primary = new gcp.assuredworkloads.Workload("primary", {
* complianceRegime: "ASSURED_WORKLOADS_FOR_PARTNERS",
* displayName: "display",
* location: "europe-west8",
* organization: "123456789",
* billingAccount: "billingAccounts/000000-0000000-0000000-000000",
* partner: "SOVEREIGN_CONTROLS_BY_PSN",
* partnerPermissions: {
* assuredWorkloadsMonitoring: true,
* dataLogsViewer: true,
* serviceAccessApprover: true,
* },
* partnerServicesBillingAccount: "billingAccounts/01BF3F-2C6DE5-30C607",
* resourceSettings: [
* {
* resourceType: "CONSUMER_FOLDER",
* },
* {
* resourceType: "ENCRYPTION_KEYS_PROJECT",
* },
* {
* resourceId: "ring",
* resourceType: "KEYRING",
* },
* ],
* violationNotificationsEnabled: true,
* labels: {
* "label-one": "value-one",
* },
* });
* ```
*
* ## Import
*
* Workload can be imported using any of these accepted formats:
*
* * `organizations/{{organization}}/locations/{{location}}/workloads/{{name}}`
*
* * `{{organization}}/{{location}}/{{name}}`
*
* When using the `pulumi import` command, Workload can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:assuredworkloads/workload:Workload default organizations/{{organization}}/locations/{{location}}/workloads/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:assuredworkloads/workload:Workload default {{organization}}/{{location}}/{{name}}
* ```
*/
class Workload extends pulumi.CustomResource {
/**
* Get an existing Workload resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new Workload(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Workload. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Workload.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["billingAccount"] = state?.billingAccount;
resourceInputs["complianceRegime"] = state?.complianceRegime;
resourceInputs["complianceStatuses"] = state?.complianceStatuses;
resourceInputs["compliantButDisallowedServices"] = state?.compliantButDisallowedServices;
resourceInputs["createTime"] = state?.createTime;
resourceInputs["displayName"] = state?.displayName;
resourceInputs["effectiveLabels"] = state?.effectiveLabels;
resourceInputs["ekmProvisioningResponses"] = state?.ekmProvisioningResponses;
resourceInputs["enableSovereignControls"] = state?.enableSovereignControls;
resourceInputs["kajEnrollmentState"] = state?.kajEnrollmentState;
resourceInputs["kmsSettings"] = state?.kmsSettings;
resourceInputs["labels"] = state?.labels;
resourceInputs["location"] = state?.location;
resourceInputs["name"] = state?.name;
resourceInputs["organization"] = state?.organization;
resourceInputs["partner"] = state?.partner;
resourceInputs["partnerPermissions"] = state?.partnerPermissions;
resourceInputs["partnerServicesBillingAccount"] = state?.partnerServicesBillingAccount;
resourceInputs["provisionedResourcesParent"] = state?.provisionedResourcesParent;
resourceInputs["pulumiLabels"] = state?.pulumiLabels;
resourceInputs["resourceSettings"] = state?.resourceSettings;
resourceInputs["resources"] = state?.resources;
resourceInputs["saaEnrollmentResponses"] = state?.saaEnrollmentResponses;
resourceInputs["violationNotificationsEnabled"] = state?.violationNotificationsEnabled;
resourceInputs["workloadOptions"] = state?.workloadOptions;
}
else {
const args = argsOrState;
if (args?.complianceRegime === undefined && !opts.urn) {
throw new Error("Missing required property 'complianceRegime'");
}
if (args?.displayName === undefined && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
if (args?.location === undefined && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if (args?.organization === undefined && !opts.urn) {
throw new Error("Missing required property 'organization'");
}
resourceInputs["billingAccount"] = args?.billingAccount;
resourceInputs["complianceRegime"] = args?.complianceRegime;
resourceInputs["displayName"] = args?.displayName;
resourceInputs["enableSovereignControls"] = args?.enableSovereignControls;
resourceInputs["kmsSettings"] = args?.kmsSettings;
resourceInputs["labels"] = args?.labels;
resourceInputs["location"] = args?.location;
resourceInputs["organization"] = args?.organization;
resourceInputs["partner"] = args?.partner;
resourceInputs["partnerPermissions"] = args?.partnerPermissions;
resourceInputs["partnerServicesBillingAccount"] = args?.partnerServicesBillingAccount;
resourceInputs["provisionedResourcesParent"] = args?.provisionedResourcesParent;
resourceInputs["resourceSettings"] = args?.resourceSettings;
resourceInputs["violationNotificationsEnabled"] = args?.violationNotificationsEnabled;
resourceInputs["workloadOptions"] = args?.workloadOptions;
resourceInputs["complianceStatuses"] = undefined /*out*/;
resourceInputs["compliantButDisallowedServices"] = undefined /*out*/;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["effectiveLabels"] = undefined /*out*/;
resourceInputs["ekmProvisioningResponses"] = undefined /*out*/;
resourceInputs["kajEnrollmentState"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["pulumiLabels"] = undefined /*out*/;
resourceInputs["resources"] = undefined /*out*/;
resourceInputs["saaEnrollmentResponses"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Workload.__pulumiType, name, resourceInputs, opts);
}
}
exports.Workload = Workload;
/** @internal */
Workload.__pulumiType = 'gcp:assuredworkloads/workload:Workload';
//# sourceMappingURL=workload.js.map
;