gcp.logging.ProjectBucketConfig
Explore with Pulumi AI
Manages a project-level logging bucket config. For more information see the official logging documentation and Storing Logs.
Note: Logging buckets are automatically created for a given folder, project, organization, billingAccount and cannot be deleted. Creating a resource of this type will acquire and update the resource that already exists at the desired location. These buckets cannot be removed so deleting this resource will remove the bucket config from your state but will leave the logging bucket unchanged. The buckets that are currently automatically created are “_Default” and “_Required”.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.organizations.Project("default", {
projectId: "your-project-id",
name: "your-project-id",
orgId: "123456789",
});
const basic = new gcp.logging.ProjectBucketConfig("basic", {
project: _default.projectId,
location: "global",
retentionDays: 30,
bucketId: "_Default",
});
import pulumi
import pulumi_gcp as gcp
default = gcp.organizations.Project("default",
project_id="your-project-id",
name="your-project-id",
org_id="123456789")
basic = gcp.logging.ProjectBucketConfig("basic",
project=default.project_id,
location="global",
retention_days=30,
bucket_id="_Default")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/logging"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := organizations.NewProject(ctx, "default", &organizations.ProjectArgs{
ProjectId: pulumi.String("your-project-id"),
Name: pulumi.String("your-project-id"),
OrgId: pulumi.String("123456789"),
})
if err != nil {
return err
}
_, err = logging.NewProjectBucketConfig(ctx, "basic", &logging.ProjectBucketConfigArgs{
Project: _default.ProjectId,
Location: pulumi.String("global"),
RetentionDays: pulumi.Int(30),
BucketId: pulumi.String("_Default"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.Organizations.Project("default", new()
{
ProjectId = "your-project-id",
Name = "your-project-id",
OrgId = "123456789",
});
var basic = new Gcp.Logging.ProjectBucketConfig("basic", new()
{
Project = @default.ProjectId,
Location = "global",
RetentionDays = 30,
BucketId = "_Default",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumi.gcp.logging.ProjectBucketConfig;
import com.pulumi.gcp.logging.ProjectBucketConfigArgs;
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 default_ = new Project("default", ProjectArgs.builder()
.projectId("your-project-id")
.name("your-project-id")
.orgId("123456789")
.build());
var basic = new ProjectBucketConfig("basic", ProjectBucketConfigArgs.builder()
.project(default_.projectId())
.location("global")
.retentionDays(30)
.bucketId("_Default")
.build());
}
}
resources:
default:
type: gcp:organizations:Project
properties:
projectId: your-project-id
name: your-project-id
orgId: '123456789'
basic:
type: gcp:logging:ProjectBucketConfig
properties:
project: ${default.projectId}
location: global
retentionDays: 30
bucketId: _Default
Create logging bucket with customId
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const basic = new gcp.logging.ProjectBucketConfig("basic", {
project: "project_id",
location: "global",
retentionDays: 30,
bucketId: "custom-bucket",
});
import pulumi
import pulumi_gcp as gcp
basic = gcp.logging.ProjectBucketConfig("basic",
project="project_id",
location="global",
retention_days=30,
bucket_id="custom-bucket")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/logging"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := logging.NewProjectBucketConfig(ctx, "basic", &logging.ProjectBucketConfigArgs{
Project: pulumi.String("project_id"),
Location: pulumi.String("global"),
RetentionDays: pulumi.Int(30),
BucketId: pulumi.String("custom-bucket"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var basic = new Gcp.Logging.ProjectBucketConfig("basic", new()
{
Project = "project_id",
Location = "global",
RetentionDays = 30,
BucketId = "custom-bucket",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.logging.ProjectBucketConfig;
import com.pulumi.gcp.logging.ProjectBucketConfigArgs;
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 basic = new ProjectBucketConfig("basic", ProjectBucketConfigArgs.builder()
.project("project_id")
.location("global")
.retentionDays(30)
.bucketId("custom-bucket")
.build());
}
}
resources:
basic:
type: gcp:logging:ProjectBucketConfig
properties:
project: project_id
location: global
retentionDays: 30
bucketId: custom-bucket
Create logging bucket with Log Analytics enabled
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const analytics_enabled_bucket = new gcp.logging.ProjectBucketConfig("analytics-enabled-bucket", {
project: "project_id",
location: "global",
retentionDays: 30,
enableAnalytics: true,
bucketId: "custom-bucket",
});
import pulumi
import pulumi_gcp as gcp
analytics_enabled_bucket = gcp.logging.ProjectBucketConfig("analytics-enabled-bucket",
project="project_id",
location="global",
retention_days=30,
enable_analytics=True,
bucket_id="custom-bucket")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/logging"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := logging.NewProjectBucketConfig(ctx, "analytics-enabled-bucket", &logging.ProjectBucketConfigArgs{
Project: pulumi.String("project_id"),
Location: pulumi.String("global"),
RetentionDays: pulumi.Int(30),
EnableAnalytics: pulumi.Bool(true),
BucketId: pulumi.String("custom-bucket"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var analytics_enabled_bucket = new Gcp.Logging.ProjectBucketConfig("analytics-enabled-bucket", new()
{
Project = "project_id",
Location = "global",
RetentionDays = 30,
EnableAnalytics = true,
BucketId = "custom-bucket",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.logging.ProjectBucketConfig;
import com.pulumi.gcp.logging.ProjectBucketConfigArgs;
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 analytics_enabled_bucket = new ProjectBucketConfig("analytics-enabled-bucket", ProjectBucketConfigArgs.builder()
.project("project_id")
.location("global")
.retentionDays(30)
.enableAnalytics(true)
.bucketId("custom-bucket")
.build());
}
}
resources:
analytics-enabled-bucket:
type: gcp:logging:ProjectBucketConfig
properties:
project: project_id
location: global
retentionDays: 30
enableAnalytics: true
bucketId: custom-bucket
Create logging bucket with customId and cmekSettings
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const cmekSettings = gcp.logging.getProjectCmekSettings({
project: "project_id",
});
const keyring = new gcp.kms.KeyRing("keyring", {
name: "keyring-example",
location: "us-central1",
});
const key = new gcp.kms.CryptoKey("key", {
name: "crypto-key-example",
keyRing: keyring.id,
rotationPeriod: "7776000s",
});
const cryptoKeyBinding = new gcp.kms.CryptoKeyIAMBinding("crypto_key_binding", {
cryptoKeyId: key.id,
role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
members: [cmekSettings.then(cmekSettings => `serviceAccount:${cmekSettings.serviceAccountId}`)],
});
const example_project_bucket_cmek_settings = new gcp.logging.ProjectBucketConfig("example-project-bucket-cmek-settings", {
project: "project_id",
location: "us-central1",
retentionDays: 30,
bucketId: "custom-bucket",
cmekSettings: {
kmsKeyName: key.id,
},
}, {
dependsOn: [cryptoKeyBinding],
});
import pulumi
import pulumi_gcp as gcp
cmek_settings = gcp.logging.get_project_cmek_settings(project="project_id")
keyring = gcp.kms.KeyRing("keyring",
name="keyring-example",
location="us-central1")
key = gcp.kms.CryptoKey("key",
name="crypto-key-example",
key_ring=keyring.id,
rotation_period="7776000s")
crypto_key_binding = gcp.kms.CryptoKeyIAMBinding("crypto_key_binding",
crypto_key_id=key.id,
role="roles/cloudkms.cryptoKeyEncrypterDecrypter",
members=[f"serviceAccount:{cmek_settings.service_account_id}"])
example_project_bucket_cmek_settings = gcp.logging.ProjectBucketConfig("example-project-bucket-cmek-settings",
project="project_id",
location="us-central1",
retention_days=30,
bucket_id="custom-bucket",
cmek_settings={
"kms_key_name": key.id,
},
opts = pulumi.ResourceOptions(depends_on=[crypto_key_binding]))
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/kms"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/logging"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cmekSettings, err := logging.GetProjectCmekSettings(ctx, &logging.GetProjectCmekSettingsArgs{
Project: "project_id",
}, nil)
if err != nil {
return err
}
keyring, err := kms.NewKeyRing(ctx, "keyring", &kms.KeyRingArgs{
Name: pulumi.String("keyring-example"),
Location: pulumi.String("us-central1"),
})
if err != nil {
return err
}
key, err := kms.NewCryptoKey(ctx, "key", &kms.CryptoKeyArgs{
Name: pulumi.String("crypto-key-example"),
KeyRing: keyring.ID(),
RotationPeriod: pulumi.String("7776000s"),
})
if err != nil {
return err
}
cryptoKeyBinding, err := kms.NewCryptoKeyIAMBinding(ctx, "crypto_key_binding", &kms.CryptoKeyIAMBindingArgs{
CryptoKeyId: key.ID(),
Role: pulumi.String("roles/cloudkms.cryptoKeyEncrypterDecrypter"),
Members: pulumi.StringArray{
pulumi.Sprintf("serviceAccount:%v", cmekSettings.ServiceAccountId),
},
})
if err != nil {
return err
}
_, err = logging.NewProjectBucketConfig(ctx, "example-project-bucket-cmek-settings", &logging.ProjectBucketConfigArgs{
Project: pulumi.String("project_id"),
Location: pulumi.String("us-central1"),
RetentionDays: pulumi.Int(30),
BucketId: pulumi.String("custom-bucket"),
CmekSettings: &logging.ProjectBucketConfigCmekSettingsArgs{
KmsKeyName: key.ID(),
},
}, pulumi.DependsOn([]pulumi.Resource{
cryptoKeyBinding,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var cmekSettings = Gcp.Logging.GetProjectCmekSettings.Invoke(new()
{
Project = "project_id",
});
var keyring = new Gcp.Kms.KeyRing("keyring", new()
{
Name = "keyring-example",
Location = "us-central1",
});
var key = new Gcp.Kms.CryptoKey("key", new()
{
Name = "crypto-key-example",
KeyRing = keyring.Id,
RotationPeriod = "7776000s",
});
var cryptoKeyBinding = new Gcp.Kms.CryptoKeyIAMBinding("crypto_key_binding", new()
{
CryptoKeyId = key.Id,
Role = "roles/cloudkms.cryptoKeyEncrypterDecrypter",
Members = new[]
{
$"serviceAccount:{cmekSettings.Apply(getProjectCmekSettingsResult => getProjectCmekSettingsResult.ServiceAccountId)}",
},
});
var example_project_bucket_cmek_settings = new Gcp.Logging.ProjectBucketConfig("example-project-bucket-cmek-settings", new()
{
Project = "project_id",
Location = "us-central1",
RetentionDays = 30,
BucketId = "custom-bucket",
CmekSettings = new Gcp.Logging.Inputs.ProjectBucketConfigCmekSettingsArgs
{
KmsKeyName = key.Id,
},
}, new CustomResourceOptions
{
DependsOn =
{
cryptoKeyBinding,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.logging.LoggingFunctions;
import com.pulumi.gcp.logging.inputs.GetProjectCmekSettingsArgs;
import com.pulumi.gcp.kms.KeyRing;
import com.pulumi.gcp.kms.KeyRingArgs;
import com.pulumi.gcp.kms.CryptoKey;
import com.pulumi.gcp.kms.CryptoKeyArgs;
import com.pulumi.gcp.kms.CryptoKeyIAMBinding;
import com.pulumi.gcp.kms.CryptoKeyIAMBindingArgs;
import com.pulumi.gcp.logging.ProjectBucketConfig;
import com.pulumi.gcp.logging.ProjectBucketConfigArgs;
import com.pulumi.gcp.logging.inputs.ProjectBucketConfigCmekSettingsArgs;
import com.pulumi.resources.CustomResourceOptions;
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) {
final var cmekSettings = LoggingFunctions.getProjectCmekSettings(GetProjectCmekSettingsArgs.builder()
.project("project_id")
.build());
var keyring = new KeyRing("keyring", KeyRingArgs.builder()
.name("keyring-example")
.location("us-central1")
.build());
var key = new CryptoKey("key", CryptoKeyArgs.builder()
.name("crypto-key-example")
.keyRing(keyring.id())
.rotationPeriod("7776000s")
.build());
var cryptoKeyBinding = new CryptoKeyIAMBinding("cryptoKeyBinding", CryptoKeyIAMBindingArgs.builder()
.cryptoKeyId(key.id())
.role("roles/cloudkms.cryptoKeyEncrypterDecrypter")
.members(String.format("serviceAccount:%s", cmekSettings.applyValue(getProjectCmekSettingsResult -> getProjectCmekSettingsResult.serviceAccountId())))
.build());
var example_project_bucket_cmek_settings = new ProjectBucketConfig("example-project-bucket-cmek-settings", ProjectBucketConfigArgs.builder()
.project("project_id")
.location("us-central1")
.retentionDays(30)
.bucketId("custom-bucket")
.cmekSettings(ProjectBucketConfigCmekSettingsArgs.builder()
.kmsKeyName(key.id())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(cryptoKeyBinding)
.build());
}
}
resources:
keyring:
type: gcp:kms:KeyRing
properties:
name: keyring-example
location: us-central1
key:
type: gcp:kms:CryptoKey
properties:
name: crypto-key-example
keyRing: ${keyring.id}
rotationPeriod: 7776000s
cryptoKeyBinding:
type: gcp:kms:CryptoKeyIAMBinding
name: crypto_key_binding
properties:
cryptoKeyId: ${key.id}
role: roles/cloudkms.cryptoKeyEncrypterDecrypter
members:
- serviceAccount:${cmekSettings.serviceAccountId}
example-project-bucket-cmek-settings:
type: gcp:logging:ProjectBucketConfig
properties:
project: project_id
location: us-central1
retentionDays: 30
bucketId: custom-bucket
cmekSettings:
kmsKeyName: ${key.id}
options:
dependson:
- ${cryptoKeyBinding}
variables:
cmekSettings:
fn::invoke:
Function: gcp:logging:getProjectCmekSettings
Arguments:
project: project_id
Create logging bucket with index configs
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example_project_bucket_index_configs = new gcp.logging.ProjectBucketConfig("example-project-bucket-index-configs", {
project: "project_id",
location: "global",
retentionDays: 30,
bucketId: "custom-bucket",
indexConfigs: [{
fieldPath: "jsonPayload.request.status",
type: "INDEX_TYPE_STRING",
}],
});
import pulumi
import pulumi_gcp as gcp
example_project_bucket_index_configs = gcp.logging.ProjectBucketConfig("example-project-bucket-index-configs",
project="project_id",
location="global",
retention_days=30,
bucket_id="custom-bucket",
index_configs=[{
"field_path": "jsonPayload.request.status",
"type": "INDEX_TYPE_STRING",
}])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/logging"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := logging.NewProjectBucketConfig(ctx, "example-project-bucket-index-configs", &logging.ProjectBucketConfigArgs{
Project: pulumi.String("project_id"),
Location: pulumi.String("global"),
RetentionDays: pulumi.Int(30),
BucketId: pulumi.String("custom-bucket"),
IndexConfigs: logging.ProjectBucketConfigIndexConfigArray{
&logging.ProjectBucketConfigIndexConfigArgs{
FieldPath: pulumi.String("jsonPayload.request.status"),
Type: pulumi.String("INDEX_TYPE_STRING"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example_project_bucket_index_configs = new Gcp.Logging.ProjectBucketConfig("example-project-bucket-index-configs", new()
{
Project = "project_id",
Location = "global",
RetentionDays = 30,
BucketId = "custom-bucket",
IndexConfigs = new[]
{
new Gcp.Logging.Inputs.ProjectBucketConfigIndexConfigArgs
{
FieldPath = "jsonPayload.request.status",
Type = "INDEX_TYPE_STRING",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.logging.ProjectBucketConfig;
import com.pulumi.gcp.logging.ProjectBucketConfigArgs;
import com.pulumi.gcp.logging.inputs.ProjectBucketConfigIndexConfigArgs;
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 example_project_bucket_index_configs = new ProjectBucketConfig("example-project-bucket-index-configs", ProjectBucketConfigArgs.builder()
.project("project_id")
.location("global")
.retentionDays(30)
.bucketId("custom-bucket")
.indexConfigs(ProjectBucketConfigIndexConfigArgs.builder()
.fieldPath("jsonPayload.request.status")
.type("INDEX_TYPE_STRING")
.build())
.build());
}
}
resources:
example-project-bucket-index-configs:
type: gcp:logging:ProjectBucketConfig
properties:
project: project_id
location: global
retentionDays: 30
bucketId: custom-bucket
indexConfigs:
- fieldPath: jsonPayload.request.status
type: INDEX_TYPE_STRING
Create ProjectBucketConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectBucketConfig(name: string, args: ProjectBucketConfigArgs, opts?: CustomResourceOptions);
@overload
def ProjectBucketConfig(resource_name: str,
args: ProjectBucketConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectBucketConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket_id: Optional[str] = None,
location: Optional[str] = None,
project: Optional[str] = None,
cmek_settings: Optional[ProjectBucketConfigCmekSettingsArgs] = None,
description: Optional[str] = None,
enable_analytics: Optional[bool] = None,
index_configs: Optional[Sequence[ProjectBucketConfigIndexConfigArgs]] = None,
locked: Optional[bool] = None,
retention_days: Optional[int] = None)
func NewProjectBucketConfig(ctx *Context, name string, args ProjectBucketConfigArgs, opts ...ResourceOption) (*ProjectBucketConfig, error)
public ProjectBucketConfig(string name, ProjectBucketConfigArgs args, CustomResourceOptions? opts = null)
public ProjectBucketConfig(String name, ProjectBucketConfigArgs args)
public ProjectBucketConfig(String name, ProjectBucketConfigArgs args, CustomResourceOptions options)
type: gcp:logging:ProjectBucketConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ProjectBucketConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ProjectBucketConfigArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ProjectBucketConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectBucketConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectBucketConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var projectBucketConfigResource = new Gcp.Logging.ProjectBucketConfig("projectBucketConfigResource", new()
{
BucketId = "string",
Location = "string",
Project = "string",
CmekSettings = new Gcp.Logging.Inputs.ProjectBucketConfigCmekSettingsArgs
{
KmsKeyName = "string",
KmsKeyVersionName = "string",
Name = "string",
ServiceAccountId = "string",
},
Description = "string",
EnableAnalytics = false,
IndexConfigs = new[]
{
new Gcp.Logging.Inputs.ProjectBucketConfigIndexConfigArgs
{
FieldPath = "string",
Type = "string",
},
},
Locked = false,
RetentionDays = 0,
});
example, err := logging.NewProjectBucketConfig(ctx, "projectBucketConfigResource", &logging.ProjectBucketConfigArgs{
BucketId: pulumi.String("string"),
Location: pulumi.String("string"),
Project: pulumi.String("string"),
CmekSettings: &logging.ProjectBucketConfigCmekSettingsArgs{
KmsKeyName: pulumi.String("string"),
KmsKeyVersionName: pulumi.String("string"),
Name: pulumi.String("string"),
ServiceAccountId: pulumi.String("string"),
},
Description: pulumi.String("string"),
EnableAnalytics: pulumi.Bool(false),
IndexConfigs: logging.ProjectBucketConfigIndexConfigArray{
&logging.ProjectBucketConfigIndexConfigArgs{
FieldPath: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
Locked: pulumi.Bool(false),
RetentionDays: pulumi.Int(0),
})
var projectBucketConfigResource = new ProjectBucketConfig("projectBucketConfigResource", ProjectBucketConfigArgs.builder()
.bucketId("string")
.location("string")
.project("string")
.cmekSettings(ProjectBucketConfigCmekSettingsArgs.builder()
.kmsKeyName("string")
.kmsKeyVersionName("string")
.name("string")
.serviceAccountId("string")
.build())
.description("string")
.enableAnalytics(false)
.indexConfigs(ProjectBucketConfigIndexConfigArgs.builder()
.fieldPath("string")
.type("string")
.build())
.locked(false)
.retentionDays(0)
.build());
project_bucket_config_resource = gcp.logging.ProjectBucketConfig("projectBucketConfigResource",
bucket_id="string",
location="string",
project="string",
cmek_settings={
"kmsKeyName": "string",
"kmsKeyVersionName": "string",
"name": "string",
"serviceAccountId": "string",
},
description="string",
enable_analytics=False,
index_configs=[{
"fieldPath": "string",
"type": "string",
}],
locked=False,
retention_days=0)
const projectBucketConfigResource = new gcp.logging.ProjectBucketConfig("projectBucketConfigResource", {
bucketId: "string",
location: "string",
project: "string",
cmekSettings: {
kmsKeyName: "string",
kmsKeyVersionName: "string",
name: "string",
serviceAccountId: "string",
},
description: "string",
enableAnalytics: false,
indexConfigs: [{
fieldPath: "string",
type: "string",
}],
locked: false,
retentionDays: 0,
});
type: gcp:logging:ProjectBucketConfig
properties:
bucketId: string
cmekSettings:
kmsKeyName: string
kmsKeyVersionName: string
name: string
serviceAccountId: string
description: string
enableAnalytics: false
indexConfigs:
- fieldPath: string
type: string
location: string
locked: false
project: string
retentionDays: 0
ProjectBucketConfig Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ProjectBucketConfig resource accepts the following input properties:
- Bucket
Id string - The name of the logging bucket. Logging automatically creates two log buckets:
_Required
and_Default
. - Location string
- The location of the bucket.
- Project string
- The parent resource that contains the logging bucket.
- Cmek
Settings ProjectBucket Config Cmek Settings - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. Structure is documented below.
- Description string
- Describes this bucket.
- Enable
Analytics bool - Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled.
- Index
Configs List<ProjectBucket Config Index Config> - A list of indexed fields and related configuration data. Structure is documented below.
- Locked bool
- Whether the bucket is locked. The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
- Retention
Days int - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
- Bucket
Id string - The name of the logging bucket. Logging automatically creates two log buckets:
_Required
and_Default
. - Location string
- The location of the bucket.
- Project string
- The parent resource that contains the logging bucket.
- Cmek
Settings ProjectBucket Config Cmek Settings Args - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. Structure is documented below.
- Description string
- Describes this bucket.
- Enable
Analytics bool - Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled.
- Index
Configs []ProjectBucket Config Index Config Args - A list of indexed fields and related configuration data. Structure is documented below.
- Locked bool
- Whether the bucket is locked. The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
- Retention
Days int - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
- bucket
Id String - The name of the logging bucket. Logging automatically creates two log buckets:
_Required
and_Default
. - location String
- The location of the bucket.
- project String
- The parent resource that contains the logging bucket.
- cmek
Settings ProjectBucket Config Cmek Settings - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. Structure is documented below.
- description String
- Describes this bucket.
- enable
Analytics Boolean - Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled.
- index
Configs List<ProjectBucket Config Index Config> - A list of indexed fields and related configuration data. Structure is documented below.
- locked Boolean
- Whether the bucket is locked. The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
- retention
Days Integer - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
- bucket
Id string - The name of the logging bucket. Logging automatically creates two log buckets:
_Required
and_Default
. - location string
- The location of the bucket.
- project string
- The parent resource that contains the logging bucket.
- cmek
Settings ProjectBucket Config Cmek Settings - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. Structure is documented below.
- description string
- Describes this bucket.
- enable
Analytics boolean - Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled.
- index
Configs ProjectBucket Config Index Config[] - A list of indexed fields and related configuration data. Structure is documented below.
- locked boolean
- Whether the bucket is locked. The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
- retention
Days number - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
- bucket_
id str - The name of the logging bucket. Logging automatically creates two log buckets:
_Required
and_Default
. - location str
- The location of the bucket.
- project str
- The parent resource that contains the logging bucket.
- cmek_
settings ProjectBucket Config Cmek Settings Args - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. Structure is documented below.
- description str
- Describes this bucket.
- enable_
analytics bool - Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled.
- index_
configs Sequence[ProjectBucket Config Index Config Args] - A list of indexed fields and related configuration data. Structure is documented below.
- locked bool
- Whether the bucket is locked. The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
- retention_
days int - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
- bucket
Id String - The name of the logging bucket. Logging automatically creates two log buckets:
_Required
and_Default
. - location String
- The location of the bucket.
- project String
- The parent resource that contains the logging bucket.
- cmek
Settings Property Map - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. Structure is documented below.
- description String
- Describes this bucket.
- enable
Analytics Boolean - Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled.
- index
Configs List<Property Map> - A list of indexed fields and related configuration data. Structure is documented below.
- locked Boolean
- Whether the bucket is locked. The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
- retention
Days Number - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectBucketConfig resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
State string - The bucket's lifecycle such as active or deleted. See LifecycleState.
- Name string
- The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
State string - The bucket's lifecycle such as active or deleted. See LifecycleState.
- Name string
- The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
State String - The bucket's lifecycle such as active or deleted. See LifecycleState.
- name String
- The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycle
State string - The bucket's lifecycle such as active or deleted. See LifecycleState.
- name string
- The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"
- id str
- The provider-assigned unique ID for this managed resource.
- lifecycle_
state str - The bucket's lifecycle such as active or deleted. See LifecycleState.
- name str
- The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
State String - The bucket's lifecycle such as active or deleted. See LifecycleState.
- name String
- The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"
Look up Existing ProjectBucketConfig Resource
Get an existing ProjectBucketConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ProjectBucketConfigState, opts?: CustomResourceOptions): ProjectBucketConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket_id: Optional[str] = None,
cmek_settings: Optional[ProjectBucketConfigCmekSettingsArgs] = None,
description: Optional[str] = None,
enable_analytics: Optional[bool] = None,
index_configs: Optional[Sequence[ProjectBucketConfigIndexConfigArgs]] = None,
lifecycle_state: Optional[str] = None,
location: Optional[str] = None,
locked: Optional[bool] = None,
name: Optional[str] = None,
project: Optional[str] = None,
retention_days: Optional[int] = None) -> ProjectBucketConfig
func GetProjectBucketConfig(ctx *Context, name string, id IDInput, state *ProjectBucketConfigState, opts ...ResourceOption) (*ProjectBucketConfig, error)
public static ProjectBucketConfig Get(string name, Input<string> id, ProjectBucketConfigState? state, CustomResourceOptions? opts = null)
public static ProjectBucketConfig get(String name, Output<String> id, ProjectBucketConfigState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Bucket
Id string - The name of the logging bucket. Logging automatically creates two log buckets:
_Required
and_Default
. - Cmek
Settings ProjectBucket Config Cmek Settings - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. Structure is documented below.
- Description string
- Describes this bucket.
- Enable
Analytics bool - Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled.
- Index
Configs List<ProjectBucket Config Index Config> - A list of indexed fields and related configuration data. Structure is documented below.
- Lifecycle
State string - The bucket's lifecycle such as active or deleted. See LifecycleState.
- Location string
- The location of the bucket.
- Locked bool
- Whether the bucket is locked. The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
- Name string
- The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"
- Project string
- The parent resource that contains the logging bucket.
- Retention
Days int - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
- Bucket
Id string - The name of the logging bucket. Logging automatically creates two log buckets:
_Required
and_Default
. - Cmek
Settings ProjectBucket Config Cmek Settings Args - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. Structure is documented below.
- Description string
- Describes this bucket.
- Enable
Analytics bool - Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled.
- Index
Configs []ProjectBucket Config Index Config Args - A list of indexed fields and related configuration data. Structure is documented below.
- Lifecycle
State string - The bucket's lifecycle such as active or deleted. See LifecycleState.
- Location string
- The location of the bucket.
- Locked bool
- Whether the bucket is locked. The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
- Name string
- The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"
- Project string
- The parent resource that contains the logging bucket.
- Retention
Days int - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
- bucket
Id String - The name of the logging bucket. Logging automatically creates two log buckets:
_Required
and_Default
. - cmek
Settings ProjectBucket Config Cmek Settings - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. Structure is documented below.
- description String
- Describes this bucket.
- enable
Analytics Boolean - Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled.
- index
Configs List<ProjectBucket Config Index Config> - A list of indexed fields and related configuration data. Structure is documented below.
- lifecycle
State String - The bucket's lifecycle such as active or deleted. See LifecycleState.
- location String
- The location of the bucket.
- locked Boolean
- Whether the bucket is locked. The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
- name String
- The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"
- project String
- The parent resource that contains the logging bucket.
- retention
Days Integer - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
- bucket
Id string - The name of the logging bucket. Logging automatically creates two log buckets:
_Required
and_Default
. - cmek
Settings ProjectBucket Config Cmek Settings - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. Structure is documented below.
- description string
- Describes this bucket.
- enable
Analytics boolean - Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled.
- index
Configs ProjectBucket Config Index Config[] - A list of indexed fields and related configuration data. Structure is documented below.
- lifecycle
State string - The bucket's lifecycle such as active or deleted. See LifecycleState.
- location string
- The location of the bucket.
- locked boolean
- Whether the bucket is locked. The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
- name string
- The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"
- project string
- The parent resource that contains the logging bucket.
- retention
Days number - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
- bucket_
id str - The name of the logging bucket. Logging automatically creates two log buckets:
_Required
and_Default
. - cmek_
settings ProjectBucket Config Cmek Settings Args - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. Structure is documented below.
- description str
- Describes this bucket.
- enable_
analytics bool - Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled.
- index_
configs Sequence[ProjectBucket Config Index Config Args] - A list of indexed fields and related configuration data. Structure is documented below.
- lifecycle_
state str - The bucket's lifecycle such as active or deleted. See LifecycleState.
- location str
- The location of the bucket.
- locked bool
- Whether the bucket is locked. The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
- name str
- The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"
- project str
- The parent resource that contains the logging bucket.
- retention_
days int - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
- bucket
Id String - The name of the logging bucket. Logging automatically creates two log buckets:
_Required
and_Default
. - cmek
Settings Property Map - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. Structure is documented below.
- description String
- Describes this bucket.
- enable
Analytics Boolean - Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled.
- index
Configs List<Property Map> - A list of indexed fields and related configuration data. Structure is documented below.
- lifecycle
State String - The bucket's lifecycle such as active or deleted. See LifecycleState.
- location String
- The location of the bucket.
- locked Boolean
- Whether the bucket is locked. The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
- name String
- The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"
- project String
- The parent resource that contains the logging bucket.
- retention
Days Number - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
Supporting Types
ProjectBucketConfigCmekSettings, ProjectBucketConfigCmekSettingsArgs
- Kms
Key stringName - The resource name for the configured Cloud KMS key.
KMS key name format:
'projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]'
To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked. See Enabling CMEK for Logging Buckets for more information. - Kms
Key stringVersion Name - The CryptoKeyVersion resource name for the configured Cloud KMS key.
KMS key name format:
'projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]'
For example: "projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1" This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version. - Name string
- The resource name of the CMEK settings.
- Service
Account stringId - The service account associated with a project for which CMEK will apply. Before enabling CMEK for a logging bucket, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account associated with the project for which CMEK will apply. Use v2.getCmekSettings to obtain the service account ID. See Enabling CMEK for Logging Buckets for more information.
- Kms
Key stringName - The resource name for the configured Cloud KMS key.
KMS key name format:
'projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]'
To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked. See Enabling CMEK for Logging Buckets for more information. - Kms
Key stringVersion Name - The CryptoKeyVersion resource name for the configured Cloud KMS key.
KMS key name format:
'projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]'
For example: "projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1" This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version. - Name string
- The resource name of the CMEK settings.
- Service
Account stringId - The service account associated with a project for which CMEK will apply. Before enabling CMEK for a logging bucket, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account associated with the project for which CMEK will apply. Use v2.getCmekSettings to obtain the service account ID. See Enabling CMEK for Logging Buckets for more information.
- kms
Key StringName - The resource name for the configured Cloud KMS key.
KMS key name format:
'projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]'
To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked. See Enabling CMEK for Logging Buckets for more information. - kms
Key StringVersion Name - The CryptoKeyVersion resource name for the configured Cloud KMS key.
KMS key name format:
'projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]'
For example: "projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1" This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version. - name String
- The resource name of the CMEK settings.
- service
Account StringId - The service account associated with a project for which CMEK will apply. Before enabling CMEK for a logging bucket, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account associated with the project for which CMEK will apply. Use v2.getCmekSettings to obtain the service account ID. See Enabling CMEK for Logging Buckets for more information.
- kms
Key stringName - The resource name for the configured Cloud KMS key.
KMS key name format:
'projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]'
To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked. See Enabling CMEK for Logging Buckets for more information. - kms
Key stringVersion Name - The CryptoKeyVersion resource name for the configured Cloud KMS key.
KMS key name format:
'projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]'
For example: "projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1" This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version. - name string
- The resource name of the CMEK settings.
- service
Account stringId - The service account associated with a project for which CMEK will apply. Before enabling CMEK for a logging bucket, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account associated with the project for which CMEK will apply. Use v2.getCmekSettings to obtain the service account ID. See Enabling CMEK for Logging Buckets for more information.
- kms_
key_ strname - The resource name for the configured Cloud KMS key.
KMS key name format:
'projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]'
To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked. See Enabling CMEK for Logging Buckets for more information. - kms_
key_ strversion_ name - The CryptoKeyVersion resource name for the configured Cloud KMS key.
KMS key name format:
'projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]'
For example: "projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1" This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version. - name str
- The resource name of the CMEK settings.
- service_
account_ strid - The service account associated with a project for which CMEK will apply. Before enabling CMEK for a logging bucket, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account associated with the project for which CMEK will apply. Use v2.getCmekSettings to obtain the service account ID. See Enabling CMEK for Logging Buckets for more information.
- kms
Key StringName - The resource name for the configured Cloud KMS key.
KMS key name format:
'projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]'
To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked. See Enabling CMEK for Logging Buckets for more information. - kms
Key StringVersion Name - The CryptoKeyVersion resource name for the configured Cloud KMS key.
KMS key name format:
'projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]'
For example: "projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1" This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version. - name String
- The resource name of the CMEK settings.
- service
Account StringId - The service account associated with a project for which CMEK will apply. Before enabling CMEK for a logging bucket, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account associated with the project for which CMEK will apply. Use v2.getCmekSettings to obtain the service account ID. See Enabling CMEK for Logging Buckets for more information.
ProjectBucketConfigIndexConfig, ProjectBucketConfigIndexConfigArgs
- Field
Path string - The LogEntry field path to index. Note that some paths are automatically indexed, and other paths are not eligible for indexing. See indexing documentation for details.
- Type string
- The type of data in this index. Allowed types include
INDEX_TYPE_UNSPECIFIED
,INDEX_TYPE_STRING
andINDEX_TYPE_INTEGER
.
- Field
Path string - The LogEntry field path to index. Note that some paths are automatically indexed, and other paths are not eligible for indexing. See indexing documentation for details.
- Type string
- The type of data in this index. Allowed types include
INDEX_TYPE_UNSPECIFIED
,INDEX_TYPE_STRING
andINDEX_TYPE_INTEGER
.
- field
Path String - The LogEntry field path to index. Note that some paths are automatically indexed, and other paths are not eligible for indexing. See indexing documentation for details.
- type String
- The type of data in this index. Allowed types include
INDEX_TYPE_UNSPECIFIED
,INDEX_TYPE_STRING
andINDEX_TYPE_INTEGER
.
- field
Path string - The LogEntry field path to index. Note that some paths are automatically indexed, and other paths are not eligible for indexing. See indexing documentation for details.
- type string
- The type of data in this index. Allowed types include
INDEX_TYPE_UNSPECIFIED
,INDEX_TYPE_STRING
andINDEX_TYPE_INTEGER
.
- field_
path str - The LogEntry field path to index. Note that some paths are automatically indexed, and other paths are not eligible for indexing. See indexing documentation for details.
- type str
- The type of data in this index. Allowed types include
INDEX_TYPE_UNSPECIFIED
,INDEX_TYPE_STRING
andINDEX_TYPE_INTEGER
.
- field
Path String - The LogEntry field path to index. Note that some paths are automatically indexed, and other paths are not eligible for indexing. See indexing documentation for details.
- type String
- The type of data in this index. Allowed types include
INDEX_TYPE_UNSPECIFIED
,INDEX_TYPE_STRING
andINDEX_TYPE_INTEGER
.
Import
This resource can be imported using the following format:
projects/{{project}}/locations/{{location}}/buckets/{{bucket_id}}
When using the pulumi import
command, this resource can be imported using one of the formats above. For example:
$ pulumi import gcp:logging/projectBucketConfig:ProjectBucketConfig default projects/{{project}}/locations/{{location}}/buckets/{{bucket_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.