Skip to content

Commit 746b56b

Browse files
Terraform Team Automationravinitp
authored andcommitted
Added - Support for JMS Implement management resource for advancedFeatureConfiguration
1 parent a066e60 commit 746b56b

File tree

8 files changed

+1826
-536
lines changed

8 files changed

+1826
-536
lines changed

examples/jms/fleet_advanced_feature_configuration/main.tf

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ variable "fleet_id" {
1111
default = "example-fleet-id"
1212
}
1313

14+
variable "analytic_bucket_name" {
15+
default= "example-analytic-bucket-name"
16+
}
17+
18+
variable "analytic_namespace" {
19+
default= "example-analytic-namespace"
20+
}
21+
22+
variable "log_group_ocid" {
23+
default = "example-log-group-id"
24+
}
25+
26+
variable "inventory_log_ocid" {
27+
default = "example-inventory-log-id"
28+
}
1429
provider "oci" {
1530
tenancy_ocid = var.tenancy_ocid
1631
user_ocid = var.user_ocid
@@ -19,6 +34,68 @@ provider "oci" {
1934
region = var.region
2035
}
2136

37+
resource "oci_jms_fleet_advanced_feature_configuration" "example_fleet_advanced_feature_configuration" {
38+
#Required
39+
fleet_id = var.fleet_id
40+
41+
#Optional
42+
advanced_usage_tracking {
43+
is_enabled = "false"
44+
}
45+
analytic_bucket_name = var.analytic_bucket_name
46+
analytic_namespace = var.analytic_namespace
47+
crypto_event_analysis {
48+
is_enabled = "false"
49+
summarized_events_log {
50+
log_group_id = var.log_group_ocid
51+
log_id = var.inventory_log_ocid
52+
}
53+
}
54+
java_migration_analysis {
55+
is_enabled = "false"
56+
}
57+
jfr_recording {
58+
is_enabled = "false"
59+
}
60+
lcm {
61+
is_enabled = "false"
62+
post_installation_actions {
63+
add_logging_handler = "false"
64+
disabled_tls_versions = ["TLS_1_0"]
65+
global_logging_level = "ALL"
66+
minimum_key_size_settings {
67+
certpath {
68+
key_size = "2048"
69+
name = "RSA"
70+
}
71+
jar {
72+
key_size = "2048"
73+
name = "RSA"
74+
}
75+
tls {
76+
key_size = "2048"
77+
name = "RSA"
78+
}
79+
}
80+
proxies {
81+
ftp_proxy_host = "ftpProxyHost"
82+
ftp_proxy_port = "10"
83+
http_proxy_host = "httpProxyHost"
84+
http_proxy_port = "10"
85+
https_proxy_host = "httpsProxyHost"
86+
https_proxy_port = "10"
87+
socks_proxy_host = "socksProxyHost"
88+
socks_proxy_port = "10"
89+
use_system_proxies = "false"
90+
}
91+
should_replace_certificates_operating_system = "false"
92+
}
93+
}
94+
performance_tuning_analysis {
95+
is_enabled = "false"
96+
}
97+
}
98+
2299
data "oci_jms_fleet_advanced_feature_configuration" "test_fleet_advanced_feature_configuration" {
23100
#Required
24101
fleet_id = var.fleet_id

internal/integrationtest/jms_fleet_advanced_feature_configuration_test.go

Lines changed: 282 additions & 45 deletions
Large diffs are not rendered by default.

internal/service/jms/jms_export.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@ import (
77
)
88

99
func init() {
10+
exportJmsFleetAdvancedFeatureConfigurationHints.GetIdFn = getJmsFleetAdvancedFeatureConfigurationId
1011
tf_export.RegisterCompartmentGraphs("jms", jmsResourceGraph)
1112
}
1213

1314
// Custom overrides for generating composite IDs within the resource discovery framework
1415

16+
func getJmsFleetAdvancedFeatureConfigurationId(resource *tf_export.OCIResource) (string, error) {
17+
18+
fleetId := resource.Parent.Id
19+
return GetFleetAdvancedFeatureConfigurationCompositeId(fleetId), nil
20+
}
21+
1522
// Hints for discovering and exporting this resource to configuration and state files
1623
var exportJmsFleetHints = &tf_export.TerraformResourceHints{
1724
ResourceClass: "oci_jms_fleet",
@@ -26,8 +33,22 @@ var exportJmsFleetHints = &tf_export.TerraformResourceHints{
2633
},
2734
}
2835

36+
var exportJmsFleetAdvancedFeatureConfigurationHints = &tf_export.TerraformResourceHints{
37+
ResourceClass: "oci_jms_fleet_advanced_feature_configuration",
38+
DatasourceClass: "oci_jms_fleet_advanced_feature_configuration",
39+
ResourceAbbreviation: "fleet_advanced_feature_configuration",
40+
}
41+
2942
var jmsResourceGraph = tf_export.TerraformResourceGraph{
3043
"oci_identity_compartment": {
3144
{TerraformResourceHints: exportJmsFleetHints},
3245
},
46+
"oci_jms_fleet": {
47+
{
48+
TerraformResourceHints: exportJmsFleetAdvancedFeatureConfigurationHints,
49+
DatasourceQueryParams: map[string]string{
50+
"fleet_id": "id",
51+
},
52+
},
53+
},
3354
}

0 commit comments

Comments
 (0)