You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import {
to = sumologic_data_forwarding_rule.test_rule
id = "[rule id]"
}
resource "sumologic_data_forwarding_rule" "test_rule" {
index_id = partition.id
destination_id = destination.id
enabled = true
payload_schema = "builtInFields"
format = "csv"
}
I am unable to import my existing configuration. I am able to pull down the ID from the API of this rule.
>>> r = requests.get(f'{base_url}/logsDataForwarding/rules', auth=auth)
>>> for x in r.json()['data']:
... if x['bucket']['destinationName'] == 'MY-DESTINATION-NAME':
... print(x['id'])
...
[rule id]
Debug Output
│ Error: Cannot import non-existent remote object
│
│ While attempting to import an existing object to "sumologic_data_forwarding_rule.test_rule", the
│ provider detected that no object exists with the given id. Only pre-existing objects can be
│ imported; check that the id is correct and that it is associated with the provider's configured
│ region or endpoint, or use "terraform apply" to create a new remote object for this resource.
Expected Behavior
I should be able to import data forwarding rules into terraform
Actual Behavior
Plan fails as its unable to find the id
Steps to Reproduce
Create a data forwarding rule.
Attempt to import it into terraform
It looks like you aren't supporting id's for rules?
This issue was identified in a PR which was not merged here
It looks like it was "resovled" in this review comment #688 (comment) & #688 (comment) but I don't believe this is correct. based on being unable to import a rule.
Terraform Version
Affected Resource(s)
sumologic_data_forwarding_rule
Terraform Configuration Files
I am unable to import my existing configuration. I am able to pull down the ID from the API of this rule.
Debug Output
Expected Behavior
I should be able to import data forwarding rules into terraform
Actual Behavior
Plan fails as its unable to find the id
Steps to Reproduce
It looks like you aren't supporting id's for rules?
terraform-provider-sumologic/sumologic/resource_sumologic_data_forwarding_rule.go
Lines 156 to 164 in 7e8b376
The text was updated successfully, but these errors were encountered: