Skip to content

Commit

Permalink
adding dependency in FER and updated terraform version for sdo github…
Browse files Browse the repository at this point in the history
… action
  • Loading branch information
himanshu219 committed Sep 17, 2024
1 parent 854cd9e commit ecacbee
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/sdo-tf-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:

- uses: hashicorp/setup-terraform@v3
name: Setup Terraform
with:
terraform_version: "0.12.20"

- name: Terraform fmt
id: fmt
Expand Down
15 changes: 15 additions & 0 deletions application-components/common_component.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ resource "sumologic_field" "environment" {
}


resource "sumologic_field" "pod_labels_environment" {
count = length(local.all_components_values) > 0 && local.has_any_kubernetes_deployments ? 1 : 0
data_type = "String"
field_name = "pod_labels_environment"
state = "Enabled"
}


resource "sumologic_field" "pod_labels_component" {
count = length(local.all_components_values) > 0 && local.has_any_kubernetes_deployments ? 1 : 0
data_type = "String"
field_name = "pod_labels_component"
state = "Enabled"
}

# ********************** Application Components App ********************** #
locals {
application_component_app_id = "22aa033e-5a36-4a20-b07d-810096e18050"
Expand Down
2 changes: 1 addition & 1 deletion application-components/db_component.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ resource "sumologic_field" "pod_labels_db_cluster_port" {
# ********************** Database component FERs ********************** #

resource "sumologic_field_extraction_rule" "SumoLogicFieldExtractionRulesForDatabase" {
depends_on = [sumologic_field.db_cluster, sumologic_field.db_system, sumologic_field.db_cluster_address, sumologic_field.db_cluster_port, sumologic_field.pod_labels_db_cluster, sumologic_field.pod_labels_db_system, sumologic_field.pod_labels_db_cluster_address, sumologic_field.pod_labels_db_cluster_port]
depends_on = [sumologic_field.db_cluster, sumologic_field.db_system, sumologic_field.db_cluster_address, sumologic_field.db_cluster_port, sumologic_field.pod_labels_db_cluster, sumologic_field.pod_labels_db_system, sumologic_field.pod_labels_db_cluster_address, sumologic_field.pod_labels_db_cluster_port,sumologic_field.component,sumologic_field.environment, sumologic_field.pod_labels_environment, sumologic_field.pod_labels_component]
count = length(local.all_components_values) > 0 && local.has_any_kubernetes_deployments ? 1 : 0
enabled = true
name = local.database_fer_name
Expand Down

0 comments on commit ecacbee

Please sign in to comment.