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
resource"datadog_sensitive_data_scanner_rule""myrule" {
lifecycle {
// Use this meta-argument to avoid disabling the group when modifying the // `included_keyword_configuration` fieldcreate_before_destroy=true
}
name="My new rule"description="Another description"group_id=datadog_sensitive_data_scanner_group.mygroup.idexcluded_namespaces=["username"]
is_enabled=truepattern="myregex"tags=["sensitive_data:true"]
text_replacement {
number_of_chars=0replacement_string=""type="hash"
}
included_keyword_configuration {
keywords=["cc", "credit card"]
character_count=30
}
}
Relevant debug or panic output
╷
│ Error: The provider returned a resource missing an identifier during ImportResourceState. This is generally a bug in the resource implementation for import. Resource import code should not call d.SetId("") or create an empty ResourceData. If the resource is missing, instead return an error. Please report this to the provider developers.
│
│
╵
ixolt
changed the title
Import doesn't work for datadog_sensitive_data_scanner_*
Import doesn't work for datadog_sensitive_data_scanner_*, datadog_restriction_policy
Apr 18, 2024
It seems like you're passing an empty id into the import command - terraform import datadog_sensitive_data_scanner_rule.new_list "", you need to pass in an ID so terraform knows which resource to import. I see that this command was from the docs, I will update the docs to make this clearer.
Datadog Terraform Provider Version
v3.38.0
Terraform Version
v1.8.0
What resources or data sources are affected?
datadog_sensitive_data_scanner_group
datadog_sensitive_data_scanner_rule
datadog_restriction_policy
Terraform Configuration Files
Relevant debug or panic output
╷
│ Error: The provider returned a resource missing an identifier during ImportResourceState. This is generally a bug in the resource implementation for import. Resource import code should not call d.SetId("") or create an empty ResourceData. If the resource is missing, instead return an error. Please report this to the provider developers.
│
│
╵
Expected Behavior
imported resource
Actual Behavior
error
Steps to Reproduce
terraform import datadog_sensitive_data_scanner_rule.new_list ""
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: