Skip to content

Commit

Permalink
Release 0.2.1 (#12)
Browse files Browse the repository at this point in the history
* Release 0.1.5

* added retention_rules and storage_tier to buckets

* updated README, updated sc vision example, added versioning check with retention rules, added precondition for storage_tier

* added cursor options for sc streaming source; updated README and example

* Revert "Merge branch 'issue-545-sch-bucket-retention-rules' into 'main'"

This reverts merge request !12

* Release 0.1.6

* Release 0.1.7

* merge

* remove tf version restriction

* update terraform version in examples

* fix freeform tags error

* fix typo in service connectors readme

* chore: release notes and version bump

* doc: bucket_logs, flow_logs issue with compartment ids documented. Issue 557.

* feat: module tag updated to ocilz-terraform-module

* chore: release notes and SPECs updated

* fix: handling spaces in log names

* fix: time_sleep only when enabling oci_log_analytics_namespace

* fix: tenancy_ocid variable added

* chore: examples updated (variable and comments)

* doc: updates

* chore: example updated

* feat: example for log group injection added

* feat: log retention enforced to min of 90 days per CIS framework 8.10. In can be disabled setting enable_cis_checks to false

* chore: release notes and version bump

* fix: missing parenthesis added to SCH streaming policy

* fix: extra parenthesis removed

* chore: release notes and version increment

* updated target-stream example files with oci.secondary_region provider references

* fix: compartments logic added to compartment_id attribute in "oci_logging_unified_agent_configuration" "these" {
  for_each = var.logging_configuration.custom_log

* chore: release notes and version increment

---------

Co-authored-by: Erna Guerrero <erna.guerrero@oracle.com>
Co-authored-by: Rory Nguyen <rory.nguyen@oracle.com>
  • Loading branch information
3 people authored Jan 8, 2025
1 parent 0cc6df3 commit d935329
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# December 18, 2024 Release Notes - 0.2.1

## Updates
1. [Logging module](./logging/)
- Bug fix: *compartment_id* attribute added to *custom_logs* attribute and respective logic added to *oci_logging_unified_agent_configuration* resource for taking a literal OCID or a reference to an OCID.

# December 09, 2024 Release Notes - 0.2.0

## Updates
Expand Down
2 changes: 1 addition & 1 deletion logging/SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ No modules.
| <a name="input_compartments_dependency"></a> [compartments\_dependency](#input\_compartments\_dependency) | A map of objects containing the externally managed compartments this module may depend on. All map objects must have the same type and must contain at least an 'id' attribute (representing the compartment OCID) of string type. | <pre>map(object({<br> id = string<br> }))</pre> | `null` | no |
| <a name="input_enable_output"></a> [enable\_output](#input\_enable\_output) | Whether Terraform should enable module output. | `bool` | `true` | no |
| <a name="input_log_groups_dependency"></a> [log\_groups\_dependency](#input\_log\_groups\_dependency) | A map of objects containing the externally managed log\_groups this module may depend on. All map objects must have the same type and must contain at least an 'id' attribute (representing the log group OCID) of string type. | <pre>map(object({<br> id = string<br> }))</pre> | `null` | no |
| <a name="input_logging_configuration"></a> [logging\_configuration](#input\_logging\_configuration) | Logging configuration settings, defining all aspects to manage logging in OCI. Please see the comments within each attribute for details. | <pre>object({<br> enable_cis_checks = optional(bool,true), # Whether to enforce CIS benchmark and framework recommendations. Default is true.<br> default_compartment_id = string,<br> default_defined_tags = optional(map(string)),<br> default_freeform_tags = optional(map(string)),<br> onboard_logging_analytics = optional(bool),<br> log_groups = optional(map(object({<br> type = optional(string)<br> compartment_id = optional(string)<br> name = string<br> description = optional(string)<br> freeform_tags = optional(map(string))<br> defined_tags = optional(map(string))<br> })),{})<br> service_logs = optional(map(object({<br> name = string<br> log_group_id = string<br> service = string<br> category = string<br> resource_id = string<br> is_enabled = optional(bool)<br> retention_duration = optional(number,90)<br> defined_tags = optional(map(string))<br> freeform_tags = optional(map(string))<br> })),{})<br> flow_logs = optional(map(object({<br> name_prefix = optional(string)<br> log_group_id = string<br> target_resource_type = string<br> target_compartment_ids = list(string)<br> is_enabled = optional(bool)<br> retention_duration = optional(number,90)<br> defined_tags = optional(map(string))<br> freeform_tags = optional(map(string))<br> })),{})<br> bucket_logs = optional(map(object({<br> name_prefix = optional(string)<br> log_group_id = string<br> target_compartment_ids = list(string)<br> category = string<br> is_enabled = optional(bool)<br> retention_duration = optional(number,90)<br> defined_tags = optional(map(string))<br> freeform_tags = optional(map(string))<br> })),{})<br> custom_logs = optional(map(object({<br> name = string<br> log_group_id = string<br> dynamic_groups = list(string)<br> parser_type = optional(string)<br> path = list(string)<br> is_enabled = optional(bool)<br> retention_duration = optional(number,90)<br> defined_tags = optional(map(string))<br> freeform_tags = optional(map(string))<br> })),{})<br> })</pre> | n/a | yes |
| <a name="input_logging_configuration"></a> [logging\_configuration](#input\_logging\_configuration) | Logging configuration settings, defining all aspects to manage logging in OCI. Please see the comments within each attribute for details. | <pre>object({<br> enable_cis_checks = optional(bool,true), # Whether to enforce CIS benchmark and framework recommendations. Default is true.<br> default_compartment_id = string,<br> default_defined_tags = optional(map(string)),<br> default_freeform_tags = optional(map(string)),<br> onboard_logging_analytics = optional(bool),<br> log_groups = optional(map(object({<br> type = optional(string)<br> compartment_id = optional(string)<br> name = string<br> description = optional(string)<br> freeform_tags = optional(map(string))<br> defined_tags = optional(map(string))<br> })),{})<br> service_logs = optional(map(object({<br> name = string<br> log_group_id = string<br> service = string<br> category = string<br> resource_id = string<br> is_enabled = optional(bool)<br> retention_duration = optional(number,90)<br> defined_tags = optional(map(string))<br> freeform_tags = optional(map(string))<br> })),{})<br> flow_logs = optional(map(object({<br> name_prefix = optional(string)<br> log_group_id = string<br> target_resource_type = string<br> target_compartment_ids = list(string)<br> is_enabled = optional(bool)<br> retention_duration = optional(number,90)<br> defined_tags = optional(map(string))<br> freeform_tags = optional(map(string))<br> })),{})<br> bucket_logs = optional(map(object({<br> name_prefix = optional(string)<br> log_group_id = string<br> target_compartment_ids = list(string)<br> category = string<br> is_enabled = optional(bool)<br> retention_duration = optional(number,90)<br> defined_tags = optional(map(string))<br> freeform_tags = optional(map(string))<br> })),{})<br> custom_logs = optional(map(object({<br> name = string<br> compartment_id = optional(string)<br> log_group_id = string<br> dynamic_groups = list(string)<br> parser_type = optional(string)<br> path = list(string)<br> is_enabled = optional(bool)<br> retention_duration = optional(number,90)<br> defined_tags = optional(map(string))<br> freeform_tags = optional(map(string))<br> })),{})<br> })</pre> | n/a | yes |
| <a name="input_module_name"></a> [module\_name](#input\_module\_name) | The module name. | `string` | `"logging"` | no |
| <a name="input_tenancy_ocid"></a> [tenancy\_ocid](#input\_tenancy\_ocid) | The tenancy OCID | `string` | `null` | no |

Expand Down
2 changes: 1 addition & 1 deletion logging/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ resource "oci_logging_log" "these_custom" {

resource "oci_logging_unified_agent_configuration" "these" {
for_each = var.logging_configuration.custom_logs != null ? var.logging_configuration.custom_logs : {}
compartment_id = each.value.compartment_id != null ? each.value.compartment_id : var.logging_configuration.default_compartment_id
compartment_id = each.value.compartment_id != null ? (length(regexall("^ocid1.*$", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartments_dependency[each.value.compartment_id].id) : (length(regexall("^ocid1.*$", var.logging_configuration.default_compartment_id)) > 0 ? var.logging_configuration.default_compartment_id : var.compartments_dependency[var.logging_configuration.default_compartment_id].id)
is_enabled = each.value.is_enabled
description = format("%s%s", "Agent configuration for ", each.value.name)
display_name = format("%s%s", "Agent_", each.value.name)
Expand Down
1 change: 1 addition & 0 deletions logging/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ variable "logging_configuration" {
})),{})
custom_logs = optional(map(object({
name = string
compartment_id = optional(string)
log_group_id = string
dynamic_groups = list(string)
parser_type = optional(string)
Expand Down
2 changes: 1 addition & 1 deletion release.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.2.1

0 comments on commit d935329

Please sign in to comment.