03 Jan 2025 09:31 AM
I am trying to configure the Cisco network device configuration through the Terraform script. I downloaded the Extension from Hub, and init, plan commands are successfully executed and after executing apply command, I am getting an error of No write access for scope class tenant. In API token I given the all the scopes, till it is giving the same error.
Please fine the Terraform code below:
Note: I am having full platform access.
#terraform
Solved! Go to Solution.
07 Jan 2025 10:50 AM - edited 07 Jan 2025 10:51 AM
Hello @Manoharsomi
The syntax for how to configure these settings via Terraform is not exactly the same as the JSON code presented in the WebUI suggests. What makes matters worse here is that the error message thrown back from the REST API leads you down the (wrong) rabbit hole of permissions.
You should be able to apply the monitoring configuration using this code:
resource "dynatrace_hub_extension_config" "test" {
name = "com.dynatrace.extension.snmp-generic-cisco-device"
active_gate_group = "default"
value = jsonencode(
{
"description" : "Cisco device configuration",
"version" : "2.1.4",
"enabled" : true,
"description" : "test",
"snmp" : {
"devices" : [
{
"ip" : "0.0.0.0",
"port" : 161,
"authentication" : {
"type" : "SNMPv3",
"userName" : "user",
"securityLevel" : "AUTH_PRIV",
"authPassword" : "password",
"authProtocol" : "SHA",
"privPassword" : "password",
"privProtocol" : "AES256C"
}
}
]
},
"featureSets" : [
"BGP",
"Health",
"High availability",
"Interfaces",
"Interfaces 32-bit",
"Interfaces 64-bit",
"Memory pools",
"Power supply",
"Sensors",
"Traffic"
]
}
)
}
07 Jan 2025 11:56 AM
Thank you so much @reinhard_pilz . provided solution is working perfectly👏👏