As noted in #174 (comment), there is an open bug in API when switching a rule from a referenced question to an inline one. The tests should be updated after it is fixed to prevent regressions.
Terraform Version
n/a
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
resource "jupiterone_question" "test" {
title = "test-asaba"
description = "test-referenced-rule"
query {
name = "query0"
query = "Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true"
version = "v1"
}
}
resource "jupiterone_rule" "test" {
name = "test-asaba"
description = "test"
polling_interval = "ONE_DAY"
#question_id = jupiterone_question.test.id
question {
queries {
name = "query0"
query = "Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true"
version = "v1"
}
}
tags = ["exampletag"]
outputs = [
"queries.query0.total",
"alertLevel"
]
operations = [
{
when = jsonencode({
"type" : "FILTER",
"specVersion" : 1,
"condition" : [
"AND",
[
"queries.query0.total",
"<",
1000
]
]
}),
actions = [
jsonencode({
"targetValue" : "INFO",
"type" : "SET_PROPERTY",
"targetProperty" : "alertLevel"
}),
jsonencode({
"type" : "CREATE_ALERT"
}),
]
}
]
}
Expected Behavior
The rule is updated without error.
Actual Behavior
What actually happened?
"input: Error updating rule instance"
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply as above.
- Uncomment
question_id and remove or comment the query block.
- Attempt a terraform apply.
Important Factoids
This issue is mostly to keep track that the tests will need to be updated when the API bug is fixed.
References
As noted in #174 (comment), there is an open bug in API when switching a
rulefrom a referenced question to an inline one. The tests should be updated after it is fixed to prevent regressions.Terraform Version
n/a
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Expected Behavior
The rule is updated without error.
Actual Behavior
What actually happened?
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform applyas above.question_idand remove or comment thequeryblock.Important Factoids
This issue is mostly to keep track that the tests will need to be updated when the API bug is fixed.
References
scope_filterplanning #174 (comment)