From 35dbd8503d37eba512bbef720cdf6899608cb61b Mon Sep 17 00:00:00 2001 From: Aniket Kumar Date: Fri, 19 Apr 2024 09:29:45 +0530 Subject: [PATCH 1/2] Prepare release documentation --- docs/data-sources/audit_log_event_ids.md | 36 ++++++++ docs/data-sources/audit_log_export.md | 42 +++++++++ docs/data-sources/audit_log_settings.md | 36 ++++++++ docs/data-sources/clusters.md | 2 +- docs/guides/1.2.0-upgrade-guide.md | 108 +++++++++++++++++++++++ docs/index.md | 12 +++ docs/resources/audit_log_export.md | 32 +++++++ docs/resources/audit_log_settings.md | 36 ++++++++ go.mod | 17 ++-- go.sum | 20 +++++ 10 files changed, 333 insertions(+), 8 deletions(-) create mode 100644 docs/data-sources/audit_log_event_ids.md create mode 100644 docs/data-sources/audit_log_export.md create mode 100644 docs/data-sources/audit_log_settings.md create mode 100644 docs/guides/1.2.0-upgrade-guide.md create mode 100644 docs/resources/audit_log_export.md create mode 100644 docs/resources/audit_log_settings.md diff --git a/docs/data-sources/audit_log_event_ids.md b/docs/data-sources/audit_log_event_ids.md new file mode 100644 index 00000000..d6edc8e6 --- /dev/null +++ b/docs/data-sources/audit_log_event_ids.md @@ -0,0 +1,36 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "couchbase-capella_audit_log_event_ids Data Source - terraform-provider-couchbase-capella" +subcategory: "" +description: |- + +--- + +# couchbase-capella_audit_log_event_ids (Data Source) + + + + + + +## Schema + +### Required + +- `cluster_id` (String) +- `organization_id` (String) +- `project_id` (String) + +### Read-Only + +- `data` (Attributes Set) (see [below for nested schema](#nestedatt--data)) + + +### Nested Schema for `data` + +Read-Only: + +- `description` (String) +- `id` (Number) +- `module` (String) +- `name` (String) diff --git a/docs/data-sources/audit_log_export.md b/docs/data-sources/audit_log_export.md new file mode 100644 index 00000000..92d10bc6 --- /dev/null +++ b/docs/data-sources/audit_log_export.md @@ -0,0 +1,42 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "couchbase-capella_audit_log_export Data Source - terraform-provider-couchbase-capella" +subcategory: "" +description: |- + +--- + +# couchbase-capella_audit_log_export (Data Source) + + + + + + +## Schema + +### Required + +- `cluster_id` (String) +- `organization_id` (String) +- `project_id` (String) + +### Read-Only + +- `data` (Attributes Set) (see [below for nested schema](#nestedatt--data)) + + +### Nested Schema for `data` + +Read-Only: + +- `audit_log_download_url` (String) +- `cluster_id` (String) +- `created_at` (String) +- `end` (String) +- `expiration` (String) +- `id` (String) +- `organization_id` (String) +- `project_id` (String) +- `start` (String) +- `status` (String) diff --git a/docs/data-sources/audit_log_settings.md b/docs/data-sources/audit_log_settings.md new file mode 100644 index 00000000..aa383d56 --- /dev/null +++ b/docs/data-sources/audit_log_settings.md @@ -0,0 +1,36 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "couchbase-capella_audit_log_settings Data Source - terraform-provider-couchbase-capella" +subcategory: "" +description: |- + +--- + +# couchbase-capella_audit_log_settings (Data Source) + + + + + + +## Schema + +### Required + +- `cluster_id` (String) +- `organization_id` (String) +- `project_id` (String) + +### Read-Only + +- `audit_enabled` (Boolean) +- `disabled_users` (Attributes Set) (see [below for nested schema](#nestedatt--disabled_users)) +- `enabled_event_ids` (Set of Number) + + +### Nested Schema for `disabled_users` + +Read-Only: + +- `domain` (String) +- `name` (String) diff --git a/docs/data-sources/clusters.md b/docs/data-sources/clusters.md index 434c5875..8fba0e97 100644 --- a/docs/data-sources/clusters.md +++ b/docs/data-sources/clusters.md @@ -99,7 +99,7 @@ Read-Only: - `disk` (Attributes) (see [below for nested schema](#nestedatt--data--service_groups--node--disk)) -### Nested Schema for `data.service_groups.node.disk` +### Nested Schema for `data.service_groups.node.compute` Read-Only: diff --git a/docs/guides/1.2.0-upgrade-guide.md b/docs/guides/1.2.0-upgrade-guide.md new file mode 100644 index 00000000..52e8431c --- /dev/null +++ b/docs/guides/1.2.0-upgrade-guide.md @@ -0,0 +1,108 @@ +--- +layout: "couchbase-capella" +page_title: "Couchbase Capella Provider 1.2.0: Upgrade and Information Guide" +sidebar_current: "docs-couchbase-capella-guides-120-upgrade-guide" +description: |- +Couchbase Capella Provider 1.2.0: Upgrade and Information Guide +--- + +# Couchbase Capella Provider 1.2.0: Upgrade and Information Guide + +Here is a list of what's new in 1.2.0 + +## New Features + +* Create audit log export job with [`couchbase-capella_audit_log_export`](https://registry.terraform.io/providers/couchbasecloud/couchbase-capella/latest/docs/resources/audit_log_export) +* Create and manage audit log settings with [`couchbase-capella_audit_log_settings`](https://registry.terraform.io/providers/couchbasecloud/couchbase-capella/latest/docs/resources/audit_log_settings) +* Retrieve audit log event ids for a cluster with data-source [`couchbase-capella_audit_log_event_ids`](https://registry.terraform.io/providers/couchbasecloud/couchbase-capella/latest/docs/data-sources/audit_log_event_ids) + +## Changes + +There are no deprecations as part of this release. + +## Creating Capella Audit Log Export Job + +To create a new audit log export job, use the `audit_log_export` resource as follows: + +``` +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 +} +``` + +Utilize the `audit_log_export` data source to fetch the existing list of audit log export jobs. + +``` +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 +} +``` + +For more information, see the [examples to manage audit log export job](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/master/examples/audit_log_export) + +## Managing Audit Log Settings in Capella + +To create a new audit log settings, use the `audit_log_settings` resource as follows: + +``` +resource "couchbase-capella_audit_log_settings" "new_auditlogsettings" { + organization_id = var.organization_id + project_id = var.project_id + cluster_id = var.cluster_id + audit_enabled = var.auditlogsettings.audit_enabled + enabled_event_ids = var.auditlogsettings.enabled_event_ids + disabled_users = var.auditlogsettings.disabled_users +} +``` + +Utilize the `audit_log_settings` data source to fetch the existing list of audit log settings. + +``` +output "existing_auditlogsettings" { + value = data.couchbase-capella_audit_log_settings.existing_auditlogsettings +} + +data "couchbase-capella_audit_log_settings" "existing_auditlogsettings" { + organization_id = var.organization_id + project_id = var.project_id + cluster_id = var.cluster_id +} +``` + +## Retrieve Audit Log EventIds for a Cluster + +Utilize the audit_log_event_ids data source to fetch the existing list of audit log event IDs for a cluster. + +``` +output "existing_auditlogeventids" { + value = data.couchbase-capella_audit_log_event_ids.existing_auditlogeventids +} + +data "couchbase-capella_audit_log_event_ids" "existing_auditlogeventids" { + organization_id = var.organization_id + project_id = var.project_id + cluster_id = var.cluster_id +} +``` + +### Helpful Links + +- [Getting Started with the Terraform Provider](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/master/examples/getting_started) +- [Capella V4 Management APIs](https://docs.couchbase.com/cloud/management-api-reference/index.html) +- [Specific Examples in the examples folder](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/master/examples) + + + + + + diff --git a/docs/index.md b/docs/index.md index 2fa5719a..a1063f59 100644 --- a/docs/index.md +++ b/docs/index.md @@ -258,3 +258,15 @@ To get started, see the [Provider Example Configs](https://github.com/couchbasec Manage Storage Auto-expansion for Azure Clusters. +* [Create Audit Log Export Job in Capella](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/main/examples/audit_log_export) + + Create Audit Log Export Jobs. + +* [Manage Audit Log Settings in Capella](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/main/examples/audit_log_settings) + + Manage Audit Log Settings. + +* [List Audit Logs EventIds in Capella](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/main/examples/audit_logs_event_ids) + + List Audit Logs EventIds. + diff --git a/docs/resources/audit_log_export.md b/docs/resources/audit_log_export.md new file mode 100644 index 00000000..97ff1eeb --- /dev/null +++ b/docs/resources/audit_log_export.md @@ -0,0 +1,32 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "couchbase-capella_audit_log_export Resource - terraform-provider-couchbase-capella" +subcategory: "" +description: |- + +--- + +# couchbase-capella_audit_log_export (Resource) + + + + + + +## Schema + +### Required + +- `audit_log_download_url` (String) +- `cluster_id` (String) +- `created_at` (String) +- `end` (String) +- `expiration` (String) +- `organization_id` (String) +- `project_id` (String) +- `start` (String) +- `status` (String) + +### Read-Only + +- `id` (String) The ID of this resource. diff --git a/docs/resources/audit_log_settings.md b/docs/resources/audit_log_settings.md new file mode 100644 index 00000000..7663c71a --- /dev/null +++ b/docs/resources/audit_log_settings.md @@ -0,0 +1,36 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "couchbase-capella_audit_log_settings Resource - terraform-provider-couchbase-capella" +subcategory: "" +description: |- + +--- + +# couchbase-capella_audit_log_settings (Resource) + + + + + + +## Schema + +### Required + +- `cluster_id` (String) +- `organization_id` (String) +- `project_id` (String) + +### Optional + +- `audit_enabled` (Boolean) +- `disabled_users` (Attributes Set) (see [below for nested schema](#nestedatt--disabled_users)) +- `enabled_event_ids` (Set of Number) + + +### Nested Schema for `disabled_users` + +Required: + +- `domain` (String) +- `name` (String) diff --git a/go.mod b/go.mod index a4f8841e..a316a2d7 100644 --- a/go.mod +++ b/go.mod @@ -15,15 +15,17 @@ require ( ) require ( + github.com/BurntSushi/toml v1.2.1 // indirect github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect - github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect + github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect github.com/agext/levenshtein v1.2.2 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.16.0 // indirect @@ -39,12 +41,12 @@ require ( github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hc-install v0.6.3 // indirect + github.com/hashicorp/hc-install v0.6.4 // indirect github.com/hashicorp/hcl/v2 v2.20.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.20.0 // indirect github.com/hashicorp/terraform-json v0.21.0 // indirect - github.com/hashicorp/terraform-plugin-docs v0.18.0 // indirect + github.com/hashicorp/terraform-plugin-docs v0.19.0 // indirect github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 // indirect github.com/hashicorp/terraform-registry-address v0.2.3 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect @@ -71,13 +73,14 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - github.com/yuin/goldmark v1.6.0 // indirect + github.com/yuin/goldmark v1.7.0 // indirect github.com/yuin/goldmark-meta v1.1.0 // indirect - github.com/zclconf/go-cty v1.14.3 // indirect + github.com/zclconf/go-cty v1.14.4 // indirect + go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect - golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.16.0 // indirect diff --git a/go.sum b/go.sum index 3aadddad..85446ba2 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/Kunde21/markdownfmt/v3 v3.1.0 h1:KiZu9LKs+wFFBQKhrZJrFZwtLnCCWJahL+S+E/3VnM0= github.com/Kunde21/markdownfmt/v3 v3.1.0/go.mod h1:tPXN1RTyOzJwhfHoon9wUr4HGYmWgVxSQN6VBJDkrVc= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -12,6 +14,8 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/ProtonMail/go-crypto v1.1.0-alpha.0 h1:nHGfwXmFvJrSR9xu8qL7BkO4DqTHXE9N5vPhgY2I+j0= github.com/ProtonMail/go-crypto v1.1.0-alpha.0/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= +github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg= +github.com/ProtonMail/go-crypto v1.1.0-alpha.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= @@ -21,6 +25,8 @@ github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= +github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= @@ -86,6 +92,8 @@ github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mO github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/hc-install v0.6.3 h1:yE/r1yJvWbtrJ0STwScgEnCanb0U9v7zp0Gbkmcoxqs= github.com/hashicorp/hc-install v0.6.3/go.mod h1:KamGdbodYzlufbWh4r9NRo8y6GLHWZP2GBtdnms1Ln0= +github.com/hashicorp/hc-install v0.6.4 h1:QLqlM56/+SIIGvGcfFiwMY3z5WGXT066suo/v9Km8e0= +github.com/hashicorp/hc-install v0.6.4/go.mod h1:05LWLy8TD842OtgcfBbOT0WMoInBMUSHjmDx10zuBIA= github.com/hashicorp/hcl/v2 v2.20.0 h1:l++cRs/5jQOiKVvqXZm/P1ZEfVXJmvLS9WSVxkaeTb4= github.com/hashicorp/hcl/v2 v2.20.0/go.mod h1:WmcD/Ym72MDOOx5F62Ly+leloeu6H7m0pG7VBiU6pQk= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= @@ -96,6 +104,8 @@ github.com/hashicorp/terraform-json v0.21.0 h1:9NQxbLNqPbEMze+S6+YluEdXgJmhQykRy github.com/hashicorp/terraform-json v0.21.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk= github.com/hashicorp/terraform-plugin-docs v0.18.0 h1:2bINhzXc+yDeAcafurshCrIjtdu1XHn9zZ3ISuEhgpk= github.com/hashicorp/terraform-plugin-docs v0.18.0/go.mod h1:iIUfaJpdUmpi+rI42Kgq+63jAjI8aZVTyxp3Bvk9Hg8= +github.com/hashicorp/terraform-plugin-docs v0.19.0 h1:ufXLte5Kx20LazYmGN2UZG2bN4aF0PmlDyuS1iKWSXo= +github.com/hashicorp/terraform-plugin-docs v0.19.0/go.mod h1:NPfKCSfzTtq+YCFHr2qTAMknWUxR8C4KgTbGkHULSV8= github.com/hashicorp/terraform-plugin-framework v1.6.1 h1:hw2XrmUu8d8jVL52ekxim2IqDc+2Kpekn21xZANARLU= github.com/hashicorp/terraform-plugin-framework v1.6.1/go.mod h1:aJI+n/hBPhz1J+77GdgNfk5svW12y7fmtxe/5L5IuwI= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= @@ -201,10 +211,16 @@ github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.6.0 h1:boZcn2GTjpsynOsC0iJHnBWa4Bi0qzfJjthwauItG68= github.com/yuin/goldmark v1.6.0/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/goldmark v1.7.0 h1:EfOIvIMZIzHdB/R/zVrikYLPPwJlfMcNczJFMs1m6sA= +github.com/yuin/goldmark v1.7.0/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc= github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0= github.com/zclconf/go-cty v1.14.3 h1:1JXy1XroaGrzZuG6X9dt7HL6s9AwbY+l4UNL8o5B6ho= github.com/zclconf/go-cty v1.14.3/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.14.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8= +github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +go.abhg.dev/goldmark/frontmatter v0.2.0 h1:P8kPG0YkL12+aYk2yU3xHv4tcXzeVnN+gU0tJ5JnxRw= +go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px76YjkOzhB4YlU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= @@ -215,6 +231,8 @@ golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGb golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -222,6 +240,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From 612b12465bff94868d7c262c289118744fba80d2 Mon Sep 17 00:00:00 2001 From: Aniket Kumar Date: Wed, 24 Apr 2024 21:49:51 +0530 Subject: [PATCH 2/2] addressed review comments --- docs/guides/1.2.0-upgrade-guide.md | 74 +++++++++++++++--------------- docs/index.md | 12 ++--- 2 files changed, 42 insertions(+), 44 deletions(-) diff --git a/docs/guides/1.2.0-upgrade-guide.md b/docs/guides/1.2.0-upgrade-guide.md index 52e8431c..edece1c6 100644 --- a/docs/guides/1.2.0-upgrade-guide.md +++ b/docs/guides/1.2.0-upgrade-guide.md @@ -12,76 +12,78 @@ Here is a list of what's new in 1.2.0 ## New Features -* Create audit log export job with [`couchbase-capella_audit_log_export`](https://registry.terraform.io/providers/couchbasecloud/couchbase-capella/latest/docs/resources/audit_log_export) -* Create and manage audit log settings with [`couchbase-capella_audit_log_settings`](https://registry.terraform.io/providers/couchbasecloud/couchbase-capella/latest/docs/resources/audit_log_settings) -* Retrieve audit log event ids for a cluster with data-source [`couchbase-capella_audit_log_event_ids`](https://registry.terraform.io/providers/couchbasecloud/couchbase-capella/latest/docs/data-sources/audit_log_event_ids) +* Enable audit logging for clusters and manage audit log settings with [`couchbase-capella_audit_log_settings`](https://registry.terraform.io/providers/couchbasecloud/couchbase-capella/latest/docs/resources/audit_log_settings) +* Export capella audit logs with [`couchbase-capella_audit_log_export`](https://registry.terraform.io/providers/couchbasecloud/couchbase-capella/latest/docs/resources/audit_log_export) +* Retrieve audit log events for a cluster with data-source [`couchbase-capella_audit_log_event_ids`](https://registry.terraform.io/providers/couchbasecloud/couchbase-capella/latest/docs/data-sources/audit_log_event_ids) ## Changes There are no deprecations as part of this release. -## Creating Capella Audit Log Export Job +## Enable audit logging for clusters and manage audit log settings -To create a new audit log export job, use the `audit_log_export` resource as follows: +To create a new audit log settings, use the `audit_log_settings` resource as follows: ``` -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 +resource "couchbase-capella_audit_log_settings" "new_auditlogsettings" { + organization_id = var.organization_id + project_id = var.project_id + cluster_id = var.cluster_id + audit_enabled = var.auditlogsettings.audit_enabled + enabled_event_ids = var.auditlogsettings.enabled_event_ids + disabled_users = var.auditlogsettings.disabled_users } ``` -Utilize the `audit_log_export` data source to fetch the existing list of audit log export jobs. +Utilize the `audit_log_settings` data source to fetch the existing list of audit log settings. ``` -output "existing_auditlogexport" { - value = data.couchbase-capella_audit_log_export.existing_auditlogexport +output "existing_auditlogsettings" { + value = data.couchbase-capella_audit_log_settings.existing_auditlogsettings } -data "couchbase-capella_audit_log_export" "existing_auditlogexport" { +data "couchbase-capella_audit_log_settings" "existing_auditlogsettings" { organization_id = var.organization_id project_id = var.project_id cluster_id = var.cluster_id } ``` +For more information, see the [managing audit log settings examples](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/master/examples/audit_log_settings) -For more information, see the [examples to manage audit log export job](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/master/examples/audit_log_export) -## Managing Audit Log Settings in Capella +## Export Capella Audit logs -To create a new audit log settings, use the `audit_log_settings` resource as follows: +To export audit logs, use the `audit_log_export` resource as follows: ``` -resource "couchbase-capella_audit_log_settings" "new_auditlogsettings" { - organization_id = var.organization_id - project_id = var.project_id - cluster_id = var.cluster_id - audit_enabled = var.auditlogsettings.audit_enabled - enabled_event_ids = var.auditlogsettings.enabled_event_ids - disabled_users = var.auditlogsettings.disabled_users +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 } ``` -Utilize the `audit_log_settings` data source to fetch the existing list of audit log settings. +Utilize the `audit_log_export` data source to fetch the existing list of audit log export jobs. ``` -output "existing_auditlogsettings" { - value = data.couchbase-capella_audit_log_settings.existing_auditlogsettings +output "existing_auditlogexport" { + value = data.couchbase-capella_audit_log_export.existing_auditlogexport } -data "couchbase-capella_audit_log_settings" "existing_auditlogsettings" { +data "couchbase-capella_audit_log_export" "existing_auditlogexport" { organization_id = var.organization_id project_id = var.project_id cluster_id = var.cluster_id } ``` -## Retrieve Audit Log EventIds for a Cluster +For more information, see the [managing audit log exports examples](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/master/examples/audit_log_export) + +## Retrieve audit log events for a cluster -Utilize the audit_log_event_ids data source to fetch the existing list of audit log event IDs for a cluster. +Utilize the `audit_log_event_ids` data source to fetch the existing list of audit log event IDs for a cluster. ``` output "existing_auditlogeventids" { @@ -94,15 +96,11 @@ data "couchbase-capella_audit_log_event_ids" "existing_auditlogeventids" { cluster_id = var.cluster_id } ``` +For more information, see the [retrieving audit log events examples](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/master/examples/audit_logs_event_ids) + ### Helpful Links - [Getting Started with the Terraform Provider](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/master/examples/getting_started) - [Capella V4 Management APIs](https://docs.couchbase.com/cloud/management-api-reference/index.html) -- [Specific Examples in the examples folder](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/master/examples) - - - - - - +- [Specific Examples in the examples folder](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/master/examples) \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index a1063f59..6a09da29 100644 --- a/docs/index.md +++ b/docs/index.md @@ -258,15 +258,15 @@ To get started, see the [Provider Example Configs](https://github.com/couchbasec Manage Storage Auto-expansion for Azure Clusters. -* [Create Audit Log Export Job in Capella](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/main/examples/audit_log_export) - - Create Audit Log Export Jobs. - * [Manage Audit Log Settings in Capella](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/main/examples/audit_log_settings) Manage Audit Log Settings. -* [List Audit Logs EventIds in Capella](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/main/examples/audit_logs_event_ids) +* [Export Capella Audit Logs](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/main/examples/audit_log_export) + + Export Audit Logs. + +* [Retrieve Audit Log Events for a Cluster](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/main/examples/audit_logs_event_ids) - List Audit Logs EventIds. + Retrieve Audit Logs Events.