Skip to content

Commit

Permalink
Adding support for the JMS OCA plugin (#104)
Browse files Browse the repository at this point in the history
* adding JMS OCA plugin

* fix typo

* documenting a new variable
  • Loading branch information
denismakogon authored Nov 29, 2022
1 parent aedd7e9 commit b19dbe0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
3 changes: 2 additions & 1 deletion docs/terraformoptions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
"monitoring": "ENABLED",
"osms": "ENABLED",
"run_command": "ENABLED",
"vulnerability_scanning": "ENABLED"
"vulnerability_scanning": "ENABLED",
"java_management_service": "DISABLED"
}
----

Expand Down
8 changes: 6 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ locals {
// prepare data with default values for flex shapes. Used to populate shape_config block with default values
// Iterate through data.oci_core_shapes.current_ad.shapes (this exclude duplicate data in multi-ad regions) and create a map { name = { memory_in_gbs = "xx"; ocpus = "xx" } }
for i in data.oci_core_shapes.current_ad.shapes : i.name => {
"memory_in_gbs" = i.memory_in_gbs
"ocpus" = i.ocpus
memory_in_gbs = i.memory_in_gbs
ocpus = i.ocpus
}
}
shape_is_flex = length(regexall("^*.Flex", var.shape)) > 0 # evaluates to boolean true when var.shape contains .Flex
Expand Down Expand Up @@ -120,6 +120,10 @@ resource "oci_core_instance" "instance" {
desired_state = var.cloud_agent_plugins.vulnerability_scanning
name = "Vulnerability Scanning"
}
plugins_config {
desired_state = var.cloud_agent_plugins.java_management_service
name = "Oracle Java Management Service"
}
}

create_vnic_details {
Expand Down
19 changes: 10 additions & 9 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,16 @@ variable "cloud_agent_plugins" {
description = "Whether each Oracle Cloud Agent plugins should be ENABLED or DISABLED."
type = map(string)
default = {
autonomous_linux = "ENABLED"
bastion = "ENABLED"
block_volume_mgmt = "DISABLED"
custom_logs = "ENABLED"
management = "DISABLED"
monitoring = "ENABLED"
osms = "ENABLED"
run_command = "ENABLED"
vulnerability_scanning = "ENABLED"
autonomous_linux = "ENABLED"
bastion = "ENABLED"
block_volume_mgmt = "DISABLED"
custom_logs = "ENABLED"
management = "DISABLED"
monitoring = "ENABLED"
osms = "ENABLED"
run_command = "ENABLED"
vulnerability_scanning = "ENABLED"
java_management_service = "DISABLED"
}
#* need to craft a validation condition at some point
}
Expand Down

0 comments on commit b19dbe0

Please sign in to comment.