Skip to content

Commit

Permalink
ENG-13977: Add deprecation message in existing ELK Terraform (#540)
Browse files Browse the repository at this point in the history
* deprecation message

* update example to splunk
  • Loading branch information
gabfelp authored May 31, 2024
1 parent baf65ec commit 3262b93
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
1 change: 1 addition & 0 deletions cyral/internal/integration/logging/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ func getIntegrationLogsSchema() map[string]*schema.Schema {
Type: schema.TypeSet,
ConflictsWith: []string{CloudWatchKey, DatadogKey, SplunkKey, SumoLogicKey, FluentbitKey},
MaxItems: 1,
Deprecated: "Use `Fluentbit` (custom) integration instead. This will be removed in the next major version of the provider.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"es_url": {
Expand Down
20 changes: 8 additions & 12 deletions docs/resources/integration_logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,13 @@ resource "cyral_integration_logging" "s3" {
}
}
# Configures a raw Elk integration with no sidecar associated.
resource "cyral_integration_logging" "elk_integration" {
name = "my-elk-integration"
elk {
es_url = "http://es.com"
kibana_url = "http://kibana.com"
# `es_credentials` can omitted for unprotected instances.
es_credentials {
username = "another-user"
password = "123"
}
# Configures a raw Splunk integration with no sidecar associated.
resource "cyral_integration_logging" "splunk_integration" {
name = "my-splunk-integration"
splunk {
hostname = "http://splunk.com"
hec_port = "8088"
access_token = "XXXXXXXXXXX"
}
}
```
Expand All @@ -109,7 +105,7 @@ resource "cyral_integration_logging" "elk_integration" {

- `cloudwatch` (Block Set, Max: 1) Represents the configuration data required for the `AWS` CloudWatch log management system. (see [below for nested schema](#nestedblock--cloudwatch))
- `datadog` (Block Set, Max: 1) Represents the configuration data required for the Datadog's log management system. (see [below for nested schema](#nestedblock--datadog))
- `elk` (Block Set, Max: 1) Represents the configuration data required for the ELK stack log management system. (see [below for nested schema](#nestedblock--elk))
- `elk` (Block Set, Max: 1, Deprecated) Represents the configuration data required for the ELK stack log management system. (see [below for nested schema](#nestedblock--elk))
- `fluent_bit` (Block Set, Max: 1) Represents a custom Fluent Bit configuration which will be utilized by the sidecar's log shipper. (see [below for nested schema](#nestedblock--fluent_bit))
- `receive_audit_logs` (Boolean) Whether or not Cyral audit logs should be forwarded to this logging integration. Declaration not supported in conjunction with `fluent_bit` block.
- `splunk` (Block Set, Max: 1) Represents the configuration data required for the Splunk log management system. (see [below for nested schema](#nestedblock--splunk))
Expand Down
18 changes: 7 additions & 11 deletions examples/resources/cyral_integration_logging/fluent-bit.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@ resource "cyral_integration_logging" "s3" {
}
}

# Configures a raw Elk integration with no sidecar associated.
resource "cyral_integration_logging" "elk_integration" {
name = "my-elk-integration"
elk {
es_url = "http://es.com"
kibana_url = "http://kibana.com"
# `es_credentials` can omitted for unprotected instances.
es_credentials {
username = "another-user"
password = "123"
}
# Configures a raw Splunk integration with no sidecar associated.
resource "cyral_integration_logging" "splunk_integration" {
name = "my-splunk-integration"
splunk {
hostname = "http://splunk.com"
hec_port = "8088"
access_token = "XXXXXXXXXXX"
}
}

0 comments on commit 3262b93

Please sign in to comment.