com.pulumi.gcp.assuredworkloads.kotlin.WorkloadArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.assuredworkloads.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.assuredworkloads.WorkloadArgs.builder
import com.pulumi.gcp.assuredworkloads.kotlin.inputs.WorkloadKmsSettingsArgs
import com.pulumi.gcp.assuredworkloads.kotlin.inputs.WorkloadKmsSettingsArgsBuilder
import com.pulumi.gcp.assuredworkloads.kotlin.inputs.WorkloadPartnerPermissionsArgs
import com.pulumi.gcp.assuredworkloads.kotlin.inputs.WorkloadPartnerPermissionsArgsBuilder
import com.pulumi.gcp.assuredworkloads.kotlin.inputs.WorkloadResourceSettingArgs
import com.pulumi.gcp.assuredworkloads.kotlin.inputs.WorkloadResourceSettingArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* 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: "folder-display-name",
* resourceType: "CONSUMER_FOLDER",
* },
* {
* resourceType: "ENCRYPTION_KEYS_PROJECT",
* },
* {
* resourceId: "ring",
* resourceType: "KEYRING",
* },
* ],
* violationNotificationsEnabled: true,
* labels: {
* "label-one": "value-one",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* primary = gcp.assuredworkloads.Workload("primary",
* compliance_regime="FEDRAMP_MODERATE",
* display_name="{{display}}",
* location="us-west1",
* organization="123456789",
* billing_account="billingAccounts/000000-0000000-0000000-000000",
* kms_settings=gcp.assuredworkloads.WorkloadKmsSettingsArgs(
* next_rotation_time="9999-10-02T15:01:23Z",
* rotation_period="10368000s",
* ),
* provisioned_resources_parent="folders/519620126891",
* resource_settings=[
* gcp.assuredworkloads.WorkloadResourceSettingArgs(
* display_name="folder-display-name",
* resource_type="CONSUMER_FOLDER",
* ),
* gcp.assuredworkloads.WorkloadResourceSettingArgs(
* resource_type="ENCRYPTION_KEYS_PROJECT",
* ),
* gcp.assuredworkloads.WorkloadResourceSettingArgs(
* resource_id="ring",
* resource_type="KEYRING",
* ),
* ],
* violation_notifications_enabled=True,
* labels={
* "label-one": "value-one",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var primary = new Gcp.AssuredWorkloads.Workload("primary", new()
* {
* ComplianceRegime = "FEDRAMP_MODERATE",
* DisplayName = "{{display}}",
* Location = "us-west1",
* Organization = "123456789",
* BillingAccount = "billingAccounts/000000-0000000-0000000-000000",
* KmsSettings = new Gcp.AssuredWorkloads.Inputs.WorkloadKmsSettingsArgs
* {
* NextRotationTime = "9999-10-02T15:01:23Z",
* RotationPeriod = "10368000s",
* },
* ProvisionedResourcesParent = "folders/519620126891",
* ResourceSettings = new[]
* {
* new Gcp.AssuredWorkloads.Inputs.WorkloadResourceSettingArgs
* {
* DisplayName = "folder-display-name",
* ResourceType = "CONSUMER_FOLDER",
* },
* new Gcp.AssuredWorkloads.Inputs.WorkloadResourceSettingArgs
* {
* ResourceType = "ENCRYPTION_KEYS_PROJECT",
* },
* new Gcp.AssuredWorkloads.Inputs.WorkloadResourceSettingArgs
* {
* ResourceId = "ring",
* ResourceType = "KEYRING",
* },
* },
* ViolationNotificationsEnabled = true,
* Labels =
* {
* { "label-one", "value-one" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/assuredworkloads"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := assuredworkloads.NewWorkload(ctx, "primary", &assuredworkloads.WorkloadArgs{
* ComplianceRegime: pulumi.String("FEDRAMP_MODERATE"),
* DisplayName: pulumi.String("{{display}}"),
* Location: pulumi.String("us-west1"),
* Organization: pulumi.String("123456789"),
* BillingAccount: pulumi.String("billingAccounts/000000-0000000-0000000-000000"),
* KmsSettings: &assuredworkloads.WorkloadKmsSettingsArgs{
* NextRotationTime: pulumi.String("9999-10-02T15:01:23Z"),
* RotationPeriod: pulumi.String("10368000s"),
* },
* ProvisionedResourcesParent: pulumi.String("folders/519620126891"),
* ResourceSettings: assuredworkloads.WorkloadResourceSettingArray{
* &assuredworkloads.WorkloadResourceSettingArgs{
* DisplayName: pulumi.String("folder-display-name"),
* ResourceType: pulumi.String("CONSUMER_FOLDER"),
* },
* &assuredworkloads.WorkloadResourceSettingArgs{
* ResourceType: pulumi.String("ENCRYPTION_KEYS_PROJECT"),
* },
* &assuredworkloads.WorkloadResourceSettingArgs{
* ResourceId: pulumi.String("ring"),
* ResourceType: pulumi.String("KEYRING"),
* },
* },
* ViolationNotificationsEnabled: pulumi.Bool(true),
* Labels: pulumi.StringMap{
* "label-one": pulumi.String("value-one"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.assuredworkloads.Workload;
* import com.pulumi.gcp.assuredworkloads.WorkloadArgs;
* import com.pulumi.gcp.assuredworkloads.inputs.WorkloadKmsSettingsArgs;
* import com.pulumi.gcp.assuredworkloads.inputs.WorkloadResourceSettingArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var primary = new Workload("primary", WorkloadArgs.builder()
* .complianceRegime("FEDRAMP_MODERATE")
* .displayName("{{display}}")
* .location("us-west1")
* .organization("123456789")
* .billingAccount("billingAccounts/000000-0000000-0000000-000000")
* .kmsSettings(WorkloadKmsSettingsArgs.builder()
* .nextRotationTime("9999-10-02T15:01:23Z")
* .rotationPeriod("10368000s")
* .build())
* .provisionedResourcesParent("folders/519620126891")
* .resourceSettings(
* WorkloadResourceSettingArgs.builder()
* .displayName("folder-display-name")
* .resourceType("CONSUMER_FOLDER")
* .build(),
* WorkloadResourceSettingArgs.builder()
* .resourceType("ENCRYPTION_KEYS_PROJECT")
* .build(),
* WorkloadResourceSettingArgs.builder()
* .resourceId("ring")
* .resourceType("KEYRING")
* .build())
* .violationNotificationsEnabled(true)
* .labels(Map.of("label-one", "value-one"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* primary:
* type: gcp:assuredworkloads:Workload
* properties:
* 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: folder-display-name
* resourceType: CONSUMER_FOLDER
* - resourceType: ENCRYPTION_KEYS_PROJECT
* - resourceId: ring
* resourceType: KEYRING
* violationNotificationsEnabled: true
* 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",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* primary = gcp.assuredworkloads.Workload("primary",
* compliance_regime="EU_REGIONS_AND_SUPPORT",
* display_name="display",
* location="europe-west9",
* organization="123456789",
* billing_account="billingAccounts/000000-0000000-0000000-000000",
* enable_sovereign_controls=True,
* kms_settings=gcp.assuredworkloads.WorkloadKmsSettingsArgs(
* next_rotation_time="9999-10-02T15:01:23Z",
* rotation_period="10368000s",
* ),
* resource_settings=[
* gcp.assuredworkloads.WorkloadResourceSettingArgs(
* resource_type="CONSUMER_FOLDER",
* ),
* gcp.assuredworkloads.WorkloadResourceSettingArgs(
* resource_type="ENCRYPTION_KEYS_PROJECT",
* ),
* gcp.assuredworkloads.WorkloadResourceSettingArgs(
* resource_id="ring",
* resource_type="KEYRING",
* ),
* ],
* labels={
* "label-one": "value-one",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var primary = new Gcp.AssuredWorkloads.Workload("primary", new()
* {
* ComplianceRegime = "EU_REGIONS_AND_SUPPORT",
* DisplayName = "display",
* Location = "europe-west9",
* Organization = "123456789",
* BillingAccount = "billingAccounts/000000-0000000-0000000-000000",
* EnableSovereignControls = true,
* KmsSettings = new Gcp.AssuredWorkloads.Inputs.WorkloadKmsSettingsArgs
* {
* NextRotationTime = "9999-10-02T15:01:23Z",
* RotationPeriod = "10368000s",
* },
* ResourceSettings = new[]
* {
* new Gcp.AssuredWorkloads.Inputs.WorkloadResourceSettingArgs
* {
* ResourceType = "CONSUMER_FOLDER",
* },
* new Gcp.AssuredWorkloads.Inputs.WorkloadResourceSettingArgs
* {
* ResourceType = "ENCRYPTION_KEYS_PROJECT",
* },
* new Gcp.AssuredWorkloads.Inputs.WorkloadResourceSettingArgs
* {
* ResourceId = "ring",
* ResourceType = "KEYRING",
* },
* },
* Labels =
* {
* { "label-one", "value-one" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/assuredworkloads"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := assuredworkloads.NewWorkload(ctx, "primary", &assuredworkloads.WorkloadArgs{
* ComplianceRegime: pulumi.String("EU_REGIONS_AND_SUPPORT"),
* DisplayName: pulumi.String("display"),
* Location: pulumi.String("europe-west9"),
* Organization: pulumi.String("123456789"),
* BillingAccount: pulumi.String("billingAccounts/000000-0000000-0000000-000000"),
* EnableSovereignControls: pulumi.Bool(true),
* KmsSettings: &assuredworkloads.WorkloadKmsSettingsArgs{
* NextRotationTime: pulumi.String("9999-10-02T15:01:23Z"),
* RotationPeriod: pulumi.String("10368000s"),
* },
* ResourceSettings: assuredworkloads.WorkloadResourceSettingArray{
* &assuredworkloads.WorkloadResourceSettingArgs{
* ResourceType: pulumi.String("CONSUMER_FOLDER"),
* },
* &assuredworkloads.WorkloadResourceSettingArgs{
* ResourceType: pulumi.String("ENCRYPTION_KEYS_PROJECT"),
* },
* &assuredworkloads.WorkloadResourceSettingArgs{
* ResourceId: pulumi.String("ring"),
* ResourceType: pulumi.String("KEYRING"),
* },
* },
* Labels: pulumi.StringMap{
* "label-one": pulumi.String("value-one"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.assuredworkloads.Workload;
* import com.pulumi.gcp.assuredworkloads.WorkloadArgs;
* import com.pulumi.gcp.assuredworkloads.inputs.WorkloadKmsSettingsArgs;
* import com.pulumi.gcp.assuredworkloads.inputs.WorkloadResourceSettingArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var primary = new Workload("primary", WorkloadArgs.builder()
* .complianceRegime("EU_REGIONS_AND_SUPPORT")
* .displayName("display")
* .location("europe-west9")
* .organization("123456789")
* .billingAccount("billingAccounts/000000-0000000-0000000-000000")
* .enableSovereignControls(true)
* .kmsSettings(WorkloadKmsSettingsArgs.builder()
* .nextRotationTime("9999-10-02T15:01:23Z")
* .rotationPeriod("10368000s")
* .build())
* .resourceSettings(
* WorkloadResourceSettingArgs.builder()
* .resourceType("CONSUMER_FOLDER")
* .build(),
* WorkloadResourceSettingArgs.builder()
* .resourceType("ENCRYPTION_KEYS_PROJECT")
* .build(),
* WorkloadResourceSettingArgs.builder()
* .resourceId("ring")
* .resourceType("KEYRING")
* .build())
* .labels(Map.of("label-one", "value-one"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* primary:
* type: gcp:assuredworkloads:Workload
* properties:
* 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
* ```
*
* ## 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}}
* ```
* @property billingAccount Optional. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.
* @property complianceRegime Required. Immutable. Compliance Regime associated with this workload. Possible values: COMPLIANCE_REGIME_UNSPECIFIED, IL4, CJIS, FEDRAMP_HIGH, FEDRAMP_MODERATE, US_REGIONAL_ACCESS, HIPAA, HITRUST, EU_REGIONS_AND_SUPPORT, CA_REGIONS_AND_SUPPORT, ITAR, AU_REGIONS_AND_US_SUPPORT, ASSURED_WORKLOADS_FOR_PARTNERS, ISR_REGIONS, ISR_REGIONS_AND_SUPPORT, CA_PROTECTED_B, IL5, IL2, JP_REGIONS_AND_SUPPORT
* @property displayName Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload
* @property enableSovereignControls Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers.
* @property kmsSettings **DEPRECATED** Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
* @property labels Optional. Labels applied to the workload.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effective_labels` for all of the labels present on the resource.
* @property location The location for the resource
* @property organization The organization for the resource
* - - -
* @property partner Optional. Partner regime associated with this workload. Possible values: PARTNER_UNSPECIFIED, LOCAL_CONTROLS_BY_S3NS, SOVEREIGN_CONTROLS_BY_T_SYSTEMS, SOVEREIGN_CONTROLS_BY_SIA_MINSAIT, SOVEREIGN_CONTROLS_BY_PSN
* @property partnerPermissions Optional. Permissions granted to the AW Partner SA account for the customer workload
* @property provisionedResourcesParent Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}
* @property resourceSettings Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.
* @property violationNotificationsEnabled Optional. Indicates whether the e-mail notification for a violation is enabled for a workload. This value will be by default True, and if not present will be considered as true. This should only be updated via updateWorkload call. Any Changes to this field during the createWorkload call will not be honored. This will always be true while creating the workload.
*/
public data class WorkloadArgs(
public val billingAccount: Output? = null,
public val complianceRegime: Output? = null,
public val displayName: Output? = null,
public val enableSovereignControls: Output? = null,
public val kmsSettings: Output? = null,
public val labels: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy