Skip to content

Commit

Permalink
audit log API (#158)
Browse files Browse the repository at this point in the history
Co-authored-by: Talina Shrotriya <[email protected]>
  • Loading branch information
l0n3star and Talina06 authored Apr 10, 2024
1 parent ba75fe8 commit 18e50b0
Show file tree
Hide file tree
Showing 37 changed files with 4,583 additions and 3 deletions.
671 changes: 671 additions & 0 deletions examples/audit_log_export/README.md

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions examples/audit_log_export/create_audit_log_exports.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
output "new_auditlogexport" {
value = couchbase-capella_audit_log_export.new_auditlogexport
}

resource "couchbase-capella_audit_log_export" "new_auditlogexport" {
organization_id = var.organization_id
project_id = var.project_id
cluster_id = var.cluster_id
start = var.audit_log_export.start
end = var.audit_log_export.end
}
9 changes: 9 additions & 0 deletions examples/audit_log_export/list_audit_log_exports.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
output "existing_auditlogexport" {
value = data.couchbase-capella_audit_log_export.existing_auditlogexport
}

data "couchbase-capella_audit_log_export" "existing_auditlogexport" {
organization_id = var.organization_id
project_id = var.project_id
cluster_id = var.cluster_id
}
11 changes: 11 additions & 0 deletions examples/audit_log_export/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
terraform {
required_providers {
couchbase-capella = {
source = "couchbasecloud/couchbase-capella"
}
}
}

provider "couchbase-capella" {
authentication_token = var.auth_token
}
9 changes: 9 additions & 0 deletions examples/audit_log_export/terraform.template.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
auth_token = "<v4-api-key-secret>"
organization_id = "<organization_id>"
project_id = "<project_id>"
cluster_id = "<cluster_id>"

audit_log_export = {
start = "2024-03-13T02:44:15+00:00"
end = "2024-03-13T06:44:15+00:00"
}
26 changes: 26 additions & 0 deletions examples/audit_log_export/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
variable "organization_id" {
description = "Capella Organization ID"
}

variable "project_id" {
description = "Capella Project ID"
}

variable "cluster_id" {
description = "Capella Cluster ID"
}

variable "auth_token" {
description = "Authentication API Key"
sensitive = true
}

variable "audit_log_export" {
description = "create audit log export job"

type = object({
start = string
end = string
})
}

Loading

0 comments on commit 18e50b0

Please sign in to comment.