|
| 1 | +// Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. |
| 2 | +// Licensed under the Mozilla Public License v2.0 |
| 3 | + |
| 4 | +variable "compartment_id" {} |
| 5 | + |
| 6 | +variable "unified_agent_configuration_defined_tags_value" { |
| 7 | + default = "value" |
| 8 | +} |
| 9 | + |
| 10 | +variable "unified_agent_configuration_description" { |
| 11 | + default = "description2" |
| 12 | +} |
| 13 | + |
| 14 | +variable "unified_agent_configuration_display_name" { |
| 15 | + default = "displayName2" |
| 16 | +} |
| 17 | + |
| 18 | +variable "unified_agent_configuration_freeform_tags" { |
| 19 | + default = { "Department" = "Finance" } |
| 20 | +} |
| 21 | + |
| 22 | +variable "unified_agent_configuration_group_association_group_list" { |
| 23 | + default = [""] |
| 24 | +} |
| 25 | + |
| 26 | +variable "unified_agent_configuration_is_compartment_id_in_subtree" { |
| 27 | + default = false |
| 28 | +} |
| 29 | + |
| 30 | +variable "unified_agent_configuration_is_enabled" { |
| 31 | + default = true |
| 32 | +} |
| 33 | + |
| 34 | +variable "unified_agent_configuration_service_configuration_configuration_type" { |
| 35 | + default = "LOGGING" |
| 36 | +} |
| 37 | + |
| 38 | +variable "unified_agent_configuration_service_configuration_sources_channels" { |
| 39 | + default = ["Security"] |
| 40 | +} |
| 41 | + |
| 42 | +variable "unified_agent_configuration_service_configuration_sources_name" { |
| 43 | + default = "name" |
| 44 | +} |
| 45 | + |
| 46 | +variable "unified_agent_configuration_service_configuration_sources_parser_delimiter" { |
| 47 | + default = "delimiter" |
| 48 | +} |
| 49 | + |
| 50 | +variable "unified_agent_configuration_service_configuration_sources_parser_expression" { |
| 51 | + default = "expression" |
| 52 | +} |
| 53 | + |
| 54 | +variable "unified_agent_configuration_service_configuration_sources_parser_field_time_key" { |
| 55 | + default = "fieldTimeKey" |
| 56 | +} |
| 57 | + |
| 58 | +variable "unified_agent_configuration_service_configuration_sources_parser_format" { |
| 59 | + default = [] |
| 60 | +} |
| 61 | + |
| 62 | +variable "unified_agent_configuration_service_configuration_sources_parser_format_firstline" { |
| 63 | + default = "formatFirstline" |
| 64 | +} |
| 65 | + |
| 66 | +variable "unified_agent_configuration_service_configuration_sources_parser_grok_failure_key" { |
| 67 | + default = "grokFailureKey" |
| 68 | +} |
| 69 | + |
| 70 | +variable "unified_agent_configuration_service_configuration_sources_parser_grok_name_key" { |
| 71 | + default = "grokNameKey" |
| 72 | +} |
| 73 | + |
| 74 | +variable "unified_agent_configuration_service_configuration_sources_parser_is_estimate_current_event" { |
| 75 | + default = false |
| 76 | +} |
| 77 | + |
| 78 | +variable "unified_agent_configuration_service_configuration_sources_parser_is_keep_time_key" { |
| 79 | + default = false |
| 80 | +} |
| 81 | + |
| 82 | +variable "unified_agent_configuration_service_configuration_sources_parser_is_null_empty_string" { |
| 83 | + default = false |
| 84 | +} |
| 85 | + |
| 86 | +variable "unified_agent_configuration_service_configuration_sources_parser_is_support_colonless_ident" { |
| 87 | + default = false |
| 88 | +} |
| 89 | + |
| 90 | +variable "unified_agent_configuration_service_configuration_sources_parser_is_with_priority" { |
| 91 | + default = false |
| 92 | +} |
| 93 | + |
| 94 | +variable "unified_agent_configuration_service_configuration_sources_parser_keys" { |
| 95 | + default = [] |
| 96 | +} |
| 97 | + |
| 98 | +variable "unified_agent_configuration_service_configuration_sources_parser_message_format" { |
| 99 | + default = "RFC3164" |
| 100 | +} |
| 101 | + |
| 102 | +variable "unified_agent_configuration_service_configuration_sources_parser_message_key" { |
| 103 | + default = "messageKey" |
| 104 | +} |
| 105 | + |
| 106 | +variable "unified_agent_configuration_service_configuration_sources_parser_multi_line_start_regexp" { |
| 107 | + default = "multiLineStartRegexp" |
| 108 | +} |
| 109 | + |
| 110 | +variable "unified_agent_configuration_service_configuration_sources_parser_null_value_pattern" { |
| 111 | + default = "nullValuePattern" |
| 112 | +} |
| 113 | + |
| 114 | +variable "unified_agent_configuration_service_configuration_sources_parser_parser_type" { |
| 115 | + default = "AUDITD" |
| 116 | +} |
| 117 | + |
| 118 | +variable "unified_agent_configuration_service_configuration_sources_parser_patterns_field_time_format" { |
| 119 | + default = "fieldTimeFormat" |
| 120 | +} |
| 121 | + |
| 122 | +variable "unified_agent_configuration_service_configuration_sources_parser_patterns_field_time_key" { |
| 123 | + default = "fieldTimeKey" |
| 124 | +} |
| 125 | + |
| 126 | +variable "unified_agent_configuration_service_configuration_sources_parser_patterns_field_time_zone" { |
| 127 | + default = "fieldTimeZone" |
| 128 | +} |
| 129 | + |
| 130 | +variable "unified_agent_configuration_service_configuration_sources_parser_patterns_name" { |
| 131 | + default = "name" |
| 132 | +} |
| 133 | + |
| 134 | +variable "unified_agent_configuration_service_configuration_sources_parser_patterns_pattern" { |
| 135 | + default = "pattern" |
| 136 | +} |
| 137 | + |
| 138 | +variable "unified_agent_configuration_service_configuration_sources_parser_rfc5424time_format" { |
| 139 | + default = "rfc5424TimeFormat" |
| 140 | +} |
| 141 | + |
| 142 | +variable "unified_agent_configuration_service_configuration_sources_parser_syslog_parser_type" { |
| 143 | + default = "STRING" |
| 144 | +} |
| 145 | + |
| 146 | +variable "unified_agent_configuration_service_configuration_sources_parser_time_format" { |
| 147 | + default = "timeFormat" |
| 148 | +} |
| 149 | + |
| 150 | +variable "unified_agent_configuration_service_configuration_sources_parser_time_type" { |
| 151 | + default = "FLOAT" |
| 152 | +} |
| 153 | + |
| 154 | +variable "unified_agent_configuration_service_configuration_sources_parser_timeout_in_milliseconds" { |
| 155 | + default = 10 |
| 156 | +} |
| 157 | + |
| 158 | +variable "unified_agent_configuration_service_configuration_sources_parser_types" { |
| 159 | + default = "types" |
| 160 | +} |
| 161 | + |
| 162 | +variable "unified_agent_configuration_service_configuration_sources_paths" { |
| 163 | + default = [] |
| 164 | +} |
| 165 | + |
| 166 | +variable "unified_agent_configuration_service_configuration_sources_source_type" { |
| 167 | + default = "WINDOWS_EVENT_LOG" |
| 168 | +} |
| 169 | + |
| 170 | +variable "unified_agent_configuration_state" { |
| 171 | + default = "AVAILABLE" |
| 172 | +} |
| 173 | + |
| 174 | +resource "oci_logging_unified_agent_configuration" "test_unified_agent_configuration" { |
| 175 | + #Required |
| 176 | + compartment_id = var.compartment_id |
| 177 | + is_enabled = var.unified_agent_configuration_is_enabled |
| 178 | + service_configuration { |
| 179 | + #Required |
| 180 | + configuration_type = var.unified_agent_configuration_service_configuration_configuration_type |
| 181 | + |
| 182 | + #Optional |
| 183 | + destination { |
| 184 | + #Required |
| 185 | + log_object_id = "${oci_logging_log.test_log.id}" |
| 186 | + } |
| 187 | + sources { |
| 188 | + #Required |
| 189 | + source_type = var.unified_agent_configuration_service_configuration_sources_source_type |
| 190 | + |
| 191 | + #Optional |
| 192 | + channels = var.unified_agent_configuration_service_configuration_sources_channels |
| 193 | + name = var.unified_agent_configuration_service_configuration_sources_name |
| 194 | + } |
| 195 | + } |
| 196 | + |
| 197 | + #Optional |
| 198 | + defined_tags = { |
| 199 | + "${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}" = var.log_group_defined_tags_value |
| 200 | + } |
| 201 | + description = var.unified_agent_configuration_description |
| 202 | + display_name = var.unified_agent_configuration_display_name |
| 203 | + freeform_tags = var.unified_agent_configuration_freeform_tags |
| 204 | + group_association { |
| 205 | + |
| 206 | + #Optional |
| 207 | + group_list = ["${oci_logging_log_group.test_log_group.id}"] |
| 208 | + } |
| 209 | +} |
| 210 | + |
| 211 | +data "oci_logging_unified_agent_configurations" "test_unified_agent_configurations" { |
| 212 | + #Required |
| 213 | + compartment_id = var.compartment_id |
| 214 | + |
| 215 | + #Optional |
| 216 | + display_name = var.unified_agent_configuration_display_name |
| 217 | + group_id = "${oci_logging_log_group.test_log_group.id}" |
| 218 | + is_compartment_id_in_subtree = var.unified_agent_configuration_is_compartment_id_in_subtree |
| 219 | + log_id = "${oci_logging_log.test_log.id}" |
| 220 | + state = var.unified_agent_configuration_state |
| 221 | +} |
| 222 | + |
0 commit comments