Skip to content
This repository was archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
#27: Beautification: change order of entity verification rule fields
Browse files Browse the repository at this point in the history
  • Loading branch information
gessnerfl committed Dec 17, 2019
1 parent abc3fc8 commit 3c5296f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ resource "instana_custom_event_spec_entity_verification_rule" "example" {
description = "description"
expiration_time = 60000
rule_severity = "warning"
rule_matching_entity_label = "entity-label"
rule_matching_entity_type = "process"
rule_matching_operator = "is"
rule_matching_entity_label = "entity-label"
rule_offline_duration = 60000
downstream_integration_ids = [ "integration-id-1", "integration-id-2" ]
downstream_broadcast_to_all_alerting_configs = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
)

const (
//EntityVerificationRuleFieldMatchingEntityLabel constant value for the schema field matching_entity_label
EntityVerificationRuleFieldMatchingEntityLabel = ruleFieldPrefix + "matching_entity_label"
//EntityVerificationRuleFieldMatchingEntityType constant value for the schema field matching_entity_type
EntityVerificationRuleFieldMatchingEntityType = ruleFieldPrefix + "matching_entity_type"
//EntityVerificationRuleFieldMatchingOperator constant value for the schema field matching_operator
EntityVerificationRuleFieldMatchingOperator = ruleFieldPrefix + "matching_operator"
//EntityVerificationRuleFieldMatchingEntityLabel constant value for the schema field matching_entity_label
EntityVerificationRuleFieldMatchingEntityLabel = ruleFieldPrefix + "matching_entity_label"
//EntityVerificationRuleFieldOfflineDuration constant value for the schema field offline_duration
EntityVerificationRuleFieldOfflineDuration = ruleFieldPrefix + "offline_duration"
)
Expand All @@ -27,11 +27,6 @@ var entityVerificationRuleSchemaFields = map[string]*schema.Schema{
Computed: true,
Description: "The computed entity type of a entity verification rule 'host'",
},
EntityVerificationRuleFieldMatchingEntityLabel: &schema.Schema{
Type: schema.TypeString,
Required: true,
Description: "The label of the matching entity",
},
EntityVerificationRuleFieldMatchingEntityType: &schema.Schema{
Type: schema.TypeString,
Required: true,
Expand All @@ -43,6 +38,11 @@ var entityVerificationRuleSchemaFields = map[string]*schema.Schema{
ValidateFunc: validation.StringInSlice(restapi.SupportedMatchingOperatorTypes.ToStringSlice(), false),
Description: "The operator which should be applied for matching the label for the given entity (e.g. IS, CONTAINS, STARTS_WITH, ENDS_WITH, NONE)",
},
EntityVerificationRuleFieldMatchingEntityLabel: &schema.Schema{
Type: schema.TypeString,
Required: true,
Description: "The label of the matching entity",
},
EntityVerificationRuleFieldOfflineDuration: &schema.Schema{
Type: schema.TypeInt,
Required: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ resource "instana_custom_event_spec_entity_verification_rule" "example" {
description = "description"
expiration_time = 60000
rule_severity = "warning"
rule_matching_entity_label = "matching-entity-label"
rule_matching_entity_type = "matching-entity-type"
rule_matching_operator = "is"
rule_matching_entity_label = "matching-entity-label"
rule_offline_duration = 60000
downstream_integration_ids = [ "integration-id-1", "integration-id-2" ]
downstream_broadcast_to_all_alerting_configs = true
Expand Down
2 changes: 1 addition & 1 deletion instana/restapi/custom-event-specficiations-api.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ type RuleSpecification struct {
ConditionValue *float64 `json:"conditionValue"`

//Entity Verification Rule
MatchingEntityLabel *string `json:"matchingEntityLabel"`
MatchingEntityType *string `json:"matchingEntityType"`
MatchingOperator *MatchingOperatorType `json:"matchingOperator"`
MatchingEntityLabel *string `json:"matchingEntityLabel"`
OfflineDuration *int `json:"offlineDuration"`
}

Expand Down
2 changes: 1 addition & 1 deletion test-sample.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ resource "instana_custom_event_spec_entity_verification_rule" "example" {
description = "description"
expiration_time = 60000
rule_severity = "warning"
rule_matching_entity_label = "entity-label"
rule_matching_entity_type = "process"
rule_matching_operator = "is"
rule_matching_entity_label = "entity-label"
rule_offline_duration = 60000
downstream_integration_ids = [ "integration-id-1", "integration-id-2" ]
downstream_broadcast_to_all_alerting_configs = true
Expand Down

0 comments on commit 3c5296f

Please sign in to comment.