lacework.AlertChannelGcpPubSub
Explore with Pulumi AI
You can configure Lacework to forward events to Google Cloud Pub/Sub asynchronous messaging service using the Lacework Google Cloud Pub/Sub alert channel.
To find more information see the Lacework support documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as lacework from "@pulumi/lacework";
const example = new lacework.AlertChannelGcpPubSub("example", {
credentials: {
clientEmail: "email@abc-project-name.iam.gserviceaccount.com",
clientId: "123456789012345678900",
privateKey: `-----BEGIN PRIVATE KEY-----
... -----END PRIVATE KEY-----
`,
privateKeyId: "1234abcd1234abcd1234abcd1234abcd1234abcd",
},
projectId: "lacework-191923",
topicId: "lacework-alerts",
});
import pulumi
import pulumi_lacework as lacework
example = lacework.AlertChannelGcpPubSub("example",
credentials={
"client_email": "email@abc-project-name.iam.gserviceaccount.com",
"client_id": "123456789012345678900",
"private_key": """-----BEGIN PRIVATE KEY-----
... -----END PRIVATE KEY-----
""",
"private_key_id": "1234abcd1234abcd1234abcd1234abcd1234abcd",
},
project_id="lacework-191923",
topic_id="lacework-alerts")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/lacework/v2/lacework"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lacework.NewAlertChannelGcpPubSub(ctx, "example", &lacework.AlertChannelGcpPubSubArgs{
Credentials: &lacework.AlertChannelGcpPubSubCredentialsArgs{
ClientEmail: pulumi.String("email@abc-project-name.iam.gserviceaccount.com"),
ClientId: pulumi.String("123456789012345678900"),
PrivateKey: pulumi.String("-----BEGIN PRIVATE KEY-----\n ... -----END PRIVATE KEY-----\n\n"),
PrivateKeyId: pulumi.String("1234abcd1234abcd1234abcd1234abcd1234abcd"),
},
ProjectId: pulumi.String("lacework-191923"),
TopicId: pulumi.String("lacework-alerts"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Lacework = Pulumi.Lacework;
return await Deployment.RunAsync(() =>
{
var example = new Lacework.AlertChannelGcpPubSub("example", new()
{
Credentials = new Lacework.Inputs.AlertChannelGcpPubSubCredentialsArgs
{
ClientEmail = "email@abc-project-name.iam.gserviceaccount.com",
ClientId = "123456789012345678900",
PrivateKey = @"-----BEGIN PRIVATE KEY-----
... -----END PRIVATE KEY-----
",
PrivateKeyId = "1234abcd1234abcd1234abcd1234abcd1234abcd",
},
ProjectId = "lacework-191923",
TopicId = "lacework-alerts",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.lacework.AlertChannelGcpPubSub;
import com.pulumi.lacework.AlertChannelGcpPubSubArgs;
import com.pulumi.lacework.inputs.AlertChannelGcpPubSubCredentialsArgs;
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 = new AlertChannelGcpPubSub("example", AlertChannelGcpPubSubArgs.builder()
.credentials(AlertChannelGcpPubSubCredentialsArgs.builder()
.clientEmail("email@abc-project-name.iam.gserviceaccount.com")
.clientId("123456789012345678900")
.privateKey("""
-----BEGIN PRIVATE KEY-----
... -----END PRIVATE KEY-----
""")
.privateKeyId("1234abcd1234abcd1234abcd1234abcd1234abcd")
.build())
.projectId("lacework-191923")
.topicId("lacework-alerts")
.build());
}
}
resources:
example:
type: lacework:AlertChannelGcpPubSub
properties:
credentials:
clientEmail: email@abc-project-name.iam.gserviceaccount.com
clientId: '123456789012345678900'
privateKey: |+
-----BEGIN PRIVATE KEY-----
... -----END PRIVATE KEY-----
privateKeyId: 1234abcd1234abcd1234abcd1234abcd1234abcd
projectId: lacework-191923
topicId: lacework-alerts
Create AlertChannelGcpPubSub Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AlertChannelGcpPubSub(name: string, args: AlertChannelGcpPubSubArgs, opts?: CustomResourceOptions);
@overload
def AlertChannelGcpPubSub(resource_name: str,
args: AlertChannelGcpPubSubArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AlertChannelGcpPubSub(resource_name: str,
opts: Optional[ResourceOptions] = None,
credentials: Optional[AlertChannelGcpPubSubCredentialsArgs] = None,
project_id: Optional[str] = None,
topic_id: Optional[str] = None,
alert_channel_gcp_pub_sub_id: Optional[str] = None,
enabled: Optional[bool] = None,
issue_grouping: Optional[str] = None,
name: Optional[str] = None,
test_integration: Optional[bool] = None)
func NewAlertChannelGcpPubSub(ctx *Context, name string, args AlertChannelGcpPubSubArgs, opts ...ResourceOption) (*AlertChannelGcpPubSub, error)
public AlertChannelGcpPubSub(string name, AlertChannelGcpPubSubArgs args, CustomResourceOptions? opts = null)
public AlertChannelGcpPubSub(String name, AlertChannelGcpPubSubArgs args)
public AlertChannelGcpPubSub(String name, AlertChannelGcpPubSubArgs args, CustomResourceOptions options)
type: lacework:AlertChannelGcpPubSub
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 AlertChannelGcpPubSubArgs
- 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 AlertChannelGcpPubSubArgs
- 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 AlertChannelGcpPubSubArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertChannelGcpPubSubArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlertChannelGcpPubSubArgs
- 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 alertChannelGcpPubSubResource = new Lacework.AlertChannelGcpPubSub("alertChannelGcpPubSubResource", new()
{
Credentials = new Lacework.Inputs.AlertChannelGcpPubSubCredentialsArgs
{
ClientEmail = "string",
ClientId = "string",
PrivateKey = "string",
PrivateKeyId = "string",
},
ProjectId = "string",
TopicId = "string",
AlertChannelGcpPubSubId = "string",
Enabled = false,
IssueGrouping = "string",
Name = "string",
TestIntegration = false,
});
example, err := lacework.NewAlertChannelGcpPubSub(ctx, "alertChannelGcpPubSubResource", &lacework.AlertChannelGcpPubSubArgs{
Credentials: &lacework.AlertChannelGcpPubSubCredentialsArgs{
ClientEmail: pulumi.String("string"),
ClientId: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
PrivateKeyId: pulumi.String("string"),
},
ProjectId: pulumi.String("string"),
TopicId: pulumi.String("string"),
AlertChannelGcpPubSubId: pulumi.String("string"),
Enabled: pulumi.Bool(false),
IssueGrouping: pulumi.String("string"),
Name: pulumi.String("string"),
TestIntegration: pulumi.Bool(false),
})
var alertChannelGcpPubSubResource = new AlertChannelGcpPubSub("alertChannelGcpPubSubResource", AlertChannelGcpPubSubArgs.builder()
.credentials(AlertChannelGcpPubSubCredentialsArgs.builder()
.clientEmail("string")
.clientId("string")
.privateKey("string")
.privateKeyId("string")
.build())
.projectId("string")
.topicId("string")
.alertChannelGcpPubSubId("string")
.enabled(false)
.issueGrouping("string")
.name("string")
.testIntegration(false)
.build());
alert_channel_gcp_pub_sub_resource = lacework.AlertChannelGcpPubSub("alertChannelGcpPubSubResource",
credentials={
"client_email": "string",
"client_id": "string",
"private_key": "string",
"private_key_id": "string",
},
project_id="string",
topic_id="string",
alert_channel_gcp_pub_sub_id="string",
enabled=False,
issue_grouping="string",
name="string",
test_integration=False)
const alertChannelGcpPubSubResource = new lacework.AlertChannelGcpPubSub("alertChannelGcpPubSubResource", {
credentials: {
clientEmail: "string",
clientId: "string",
privateKey: "string",
privateKeyId: "string",
},
projectId: "string",
topicId: "string",
alertChannelGcpPubSubId: "string",
enabled: false,
issueGrouping: "string",
name: "string",
testIntegration: false,
});
type: lacework:AlertChannelGcpPubSub
properties:
alertChannelGcpPubSubId: string
credentials:
clientEmail: string
clientId: string
privateKey: string
privateKeyId: string
enabled: false
issueGrouping: string
name: string
projectId: string
testIntegration: false
topicId: string
AlertChannelGcpPubSub Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AlertChannelGcpPubSub resource accepts the following input properties:
- Credentials
Alert
Channel Gcp Pub Sub Credentials - The credentials needed by the integration. See Credentials below for details.
- Project
Id string - The name of the Google Cloud Project.
- Topic
Id string - The ID of the Google Cloud Pub/Sub topic.
- Alert
Channel stringGcp Pub Sub Id - Enabled bool
- The state of the external integration. Defaults to
true
. - Issue
Grouping string - Defines how Lacework compliance events get grouped. Must be one of
Events
orResources
. Defaults toEvents
. - Name string
- The Alert Channel integration name.
- Test
Integration bool - Whether to test the integration of an alert channel upon creation and modification
- Credentials
Alert
Channel Gcp Pub Sub Credentials Args - The credentials needed by the integration. See Credentials below for details.
- Project
Id string - The name of the Google Cloud Project.
- Topic
Id string - The ID of the Google Cloud Pub/Sub topic.
- Alert
Channel stringGcp Pub Sub Id - Enabled bool
- The state of the external integration. Defaults to
true
. - Issue
Grouping string - Defines how Lacework compliance events get grouped. Must be one of
Events
orResources
. Defaults toEvents
. - Name string
- The Alert Channel integration name.
- Test
Integration bool - Whether to test the integration of an alert channel upon creation and modification
- credentials
Alert
Channel Gcp Pub Sub Credentials - The credentials needed by the integration. See Credentials below for details.
- project
Id String - The name of the Google Cloud Project.
- topic
Id String - The ID of the Google Cloud Pub/Sub topic.
- alert
Channel StringGcp Pub Sub Id - enabled Boolean
- The state of the external integration. Defaults to
true
. - issue
Grouping String - Defines how Lacework compliance events get grouped. Must be one of
Events
orResources
. Defaults toEvents
. - name String
- The Alert Channel integration name.
- test
Integration Boolean - Whether to test the integration of an alert channel upon creation and modification
- credentials
Alert
Channel Gcp Pub Sub Credentials - The credentials needed by the integration. See Credentials below for details.
- project
Id string - The name of the Google Cloud Project.
- topic
Id string - The ID of the Google Cloud Pub/Sub topic.
- alert
Channel stringGcp Pub Sub Id - enabled boolean
- The state of the external integration. Defaults to
true
. - issue
Grouping string - Defines how Lacework compliance events get grouped. Must be one of
Events
orResources
. Defaults toEvents
. - name string
- The Alert Channel integration name.
- test
Integration boolean - Whether to test the integration of an alert channel upon creation and modification
- credentials
Alert
Channel Gcp Pub Sub Credentials Args - The credentials needed by the integration. See Credentials below for details.
- project_
id str - The name of the Google Cloud Project.
- topic_
id str - The ID of the Google Cloud Pub/Sub topic.
- alert_
channel_ strgcp_ pub_ sub_ id - enabled bool
- The state of the external integration. Defaults to
true
. - issue_
grouping str - Defines how Lacework compliance events get grouped. Must be one of
Events
orResources
. Defaults toEvents
. - name str
- The Alert Channel integration name.
- test_
integration bool - Whether to test the integration of an alert channel upon creation and modification
- credentials Property Map
- The credentials needed by the integration. See Credentials below for details.
- project
Id String - The name of the Google Cloud Project.
- topic
Id String - The ID of the Google Cloud Pub/Sub topic.
- alert
Channel StringGcp Pub Sub Id - enabled Boolean
- The state of the external integration. Defaults to
true
. - issue
Grouping String - Defines how Lacework compliance events get grouped. Must be one of
Events
orResources
. Defaults toEvents
. - name String
- The Alert Channel integration name.
- test
Integration Boolean - Whether to test the integration of an alert channel upon creation and modification
Outputs
All input properties are implicitly available as output properties. Additionally, the AlertChannelGcpPubSub resource produces the following output properties:
- Created
Or stringUpdated By - Created
Or stringUpdated Time - Id string
- The provider-assigned unique ID for this managed resource.
- Intg
Guid string - Org
Level bool - Type
Name string
- Created
Or stringUpdated By - Created
Or stringUpdated Time - Id string
- The provider-assigned unique ID for this managed resource.
- Intg
Guid string - Org
Level bool - Type
Name string
- created
Or StringUpdated By - created
Or StringUpdated Time - id String
- The provider-assigned unique ID for this managed resource.
- intg
Guid String - org
Level Boolean - type
Name String
- created
Or stringUpdated By - created
Or stringUpdated Time - id string
- The provider-assigned unique ID for this managed resource.
- intg
Guid string - org
Level boolean - type
Name string
- created_
or_ strupdated_ by - created_
or_ strupdated_ time - id str
- The provider-assigned unique ID for this managed resource.
- intg_
guid str - org_
level bool - type_
name str
- created
Or StringUpdated By - created
Or StringUpdated Time - id String
- The provider-assigned unique ID for this managed resource.
- intg
Guid String - org
Level Boolean - type
Name String
Look up Existing AlertChannelGcpPubSub Resource
Get an existing AlertChannelGcpPubSub 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?: AlertChannelGcpPubSubState, opts?: CustomResourceOptions): AlertChannelGcpPubSub
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alert_channel_gcp_pub_sub_id: Optional[str] = None,
created_or_updated_by: Optional[str] = None,
created_or_updated_time: Optional[str] = None,
credentials: Optional[AlertChannelGcpPubSubCredentialsArgs] = None,
enabled: Optional[bool] = None,
intg_guid: Optional[str] = None,
issue_grouping: Optional[str] = None,
name: Optional[str] = None,
org_level: Optional[bool] = None,
project_id: Optional[str] = None,
test_integration: Optional[bool] = None,
topic_id: Optional[str] = None,
type_name: Optional[str] = None) -> AlertChannelGcpPubSub
func GetAlertChannelGcpPubSub(ctx *Context, name string, id IDInput, state *AlertChannelGcpPubSubState, opts ...ResourceOption) (*AlertChannelGcpPubSub, error)
public static AlertChannelGcpPubSub Get(string name, Input<string> id, AlertChannelGcpPubSubState? state, CustomResourceOptions? opts = null)
public static AlertChannelGcpPubSub get(String name, Output<String> id, AlertChannelGcpPubSubState state, CustomResourceOptions options)
resources: _: type: lacework:AlertChannelGcpPubSub get: id: ${id}
- 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.
- Alert
Channel stringGcp Pub Sub Id - Created
Or stringUpdated By - Created
Or stringUpdated Time - Credentials
Alert
Channel Gcp Pub Sub Credentials - The credentials needed by the integration. See Credentials below for details.
- Enabled bool
- The state of the external integration. Defaults to
true
. - Intg
Guid string - Issue
Grouping string - Defines how Lacework compliance events get grouped. Must be one of
Events
orResources
. Defaults toEvents
. - Name string
- The Alert Channel integration name.
- Org
Level bool - Project
Id string - The name of the Google Cloud Project.
- Test
Integration bool - Whether to test the integration of an alert channel upon creation and modification
- Topic
Id string - The ID of the Google Cloud Pub/Sub topic.
- Type
Name string
- Alert
Channel stringGcp Pub Sub Id - Created
Or stringUpdated By - Created
Or stringUpdated Time - Credentials
Alert
Channel Gcp Pub Sub Credentials Args - The credentials needed by the integration. See Credentials below for details.
- Enabled bool
- The state of the external integration. Defaults to
true
. - Intg
Guid string - Issue
Grouping string - Defines how Lacework compliance events get grouped. Must be one of
Events
orResources
. Defaults toEvents
. - Name string
- The Alert Channel integration name.
- Org
Level bool - Project
Id string - The name of the Google Cloud Project.
- Test
Integration bool - Whether to test the integration of an alert channel upon creation and modification
- Topic
Id string - The ID of the Google Cloud Pub/Sub topic.
- Type
Name string
- alert
Channel StringGcp Pub Sub Id - created
Or StringUpdated By - created
Or StringUpdated Time - credentials
Alert
Channel Gcp Pub Sub Credentials - The credentials needed by the integration. See Credentials below for details.
- enabled Boolean
- The state of the external integration. Defaults to
true
. - intg
Guid String - issue
Grouping String - Defines how Lacework compliance events get grouped. Must be one of
Events
orResources
. Defaults toEvents
. - name String
- The Alert Channel integration name.
- org
Level Boolean - project
Id String - The name of the Google Cloud Project.
- test
Integration Boolean - Whether to test the integration of an alert channel upon creation and modification
- topic
Id String - The ID of the Google Cloud Pub/Sub topic.
- type
Name String
- alert
Channel stringGcp Pub Sub Id - created
Or stringUpdated By - created
Or stringUpdated Time - credentials
Alert
Channel Gcp Pub Sub Credentials - The credentials needed by the integration. See Credentials below for details.
- enabled boolean
- The state of the external integration. Defaults to
true
. - intg
Guid string - issue
Grouping string - Defines how Lacework compliance events get grouped. Must be one of
Events
orResources
. Defaults toEvents
. - name string
- The Alert Channel integration name.
- org
Level boolean - project
Id string - The name of the Google Cloud Project.
- test
Integration boolean - Whether to test the integration of an alert channel upon creation and modification
- topic
Id string - The ID of the Google Cloud Pub/Sub topic.
- type
Name string
- alert_
channel_ strgcp_ pub_ sub_ id - created_
or_ strupdated_ by - created_
or_ strupdated_ time - credentials
Alert
Channel Gcp Pub Sub Credentials Args - The credentials needed by the integration. See Credentials below for details.
- enabled bool
- The state of the external integration. Defaults to
true
. - intg_
guid str - issue_
grouping str - Defines how Lacework compliance events get grouped. Must be one of
Events
orResources
. Defaults toEvents
. - name str
- The Alert Channel integration name.
- org_
level bool - project_
id str - The name of the Google Cloud Project.
- test_
integration bool - Whether to test the integration of an alert channel upon creation and modification
- topic_
id str - The ID of the Google Cloud Pub/Sub topic.
- type_
name str
- alert
Channel StringGcp Pub Sub Id - created
Or StringUpdated By - created
Or StringUpdated Time - credentials Property Map
- The credentials needed by the integration. See Credentials below for details.
- enabled Boolean
- The state of the external integration. Defaults to
true
. - intg
Guid String - issue
Grouping String - Defines how Lacework compliance events get grouped. Must be one of
Events
orResources
. Defaults toEvents
. - name String
- The Alert Channel integration name.
- org
Level Boolean - project
Id String - The name of the Google Cloud Project.
- test
Integration Boolean - Whether to test the integration of an alert channel upon creation and modification
- topic
Id String - The ID of the Google Cloud Pub/Sub topic.
- type
Name String
Supporting Types
AlertChannelGcpPubSubCredentials, AlertChannelGcpPubSubCredentialsArgs
- Client
Email string - The service account client email.
- Client
Id string - The service account client ID.
- Private
Key string - The service account private key.
- Private
Key stringId - The service account private key ID.
- Client
Email string - The service account client email.
- Client
Id string - The service account client ID.
- Private
Key string - The service account private key.
- Private
Key stringId - The service account private key ID.
- client
Email String - The service account client email.
- client
Id String - The service account client ID.
- private
Key String - The service account private key.
- private
Key StringId - The service account private key ID.
- client
Email string - The service account client email.
- client
Id string - The service account client ID.
- private
Key string - The service account private key.
- private
Key stringId - The service account private key ID.
- client_
email str - The service account client email.
- client_
id str - The service account client ID.
- private_
key str - The service account private key.
- private_
key_ strid - The service account private key ID.
- client
Email String - The service account client email.
- client
Id String - The service account client ID.
- private
Key String - The service account private key.
- private
Key StringId - The service account private key ID.
Import
A Lacework GCP Pub Sub Alert Channel integration can be imported using a INT_GUID
, e.g.
$ pulumi import lacework:index/alertChannelGcpPubSub:AlertChannelGcpPubSub data_export EXAMPLE_1234BAE1E42182964D23973F44CFEA3C4AB63B99E9A1EC5
-> Note: To retrieve the INT_GUID
from existing integrations in your account, use the
Lacework CLI command lacework alert-channel list
. To install this tool follow
this documentation.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- lacework lacework/terraform-provider-lacework
- License
- Notes
- This Pulumi package is based on the
lacework
Terraform Provider.