Terraform-provider-azurerm: Please add the ability to change the resource mode and apply a log analytics workspace ID to azurerm_application_insights

Created on 9 Jul 2020  路  9Comments  路  Source: terraform-providers/terraform-provider-azurerm

_This issue was originally opened by @klainn as hashicorp/terraform#25533. It was migrated here as a result of the provider split. The original body of the issue is below._


Current Terraform Version

Terraform v0.12.25
+ provider.azurerm v2.17.0

Use-cases


I am attempting to bind a new application insights resource to a pre-existing log analytics workspace for log consolidation and query.

Attempted Solutions


I attempted to look through the Terraform documentation for how to change Resource mode from classic to workspace-based (which is in tech preview) but there appears to currently be no such option.

Proposal


Extend the azurerm_application_insights resource to allow for a resource_mode directive which would allow for a no options classic mode (today) and a workspace-based option which would take in the current subscription and the id of the log analytics workspace.

References

enhancement preview servicapplication-insights

Most helpful comment

Any updates ?

All 9 comments

From what I can tell this isn't available even for creating new log workspaces? Am I missing something?

It's not available in terraform, but you can select workspace based resource mode in the Azure Portal. It is still in Preview phase though.

Dear Terraform team, @mybayern1974,
I would be willing to create a pull request for this feature.
Please let me know if:

  • you currently develop the feature yourself, so a pull request wouldn't make sense
  • you would not welcome a pull request for this feature (for whatever reasons)

Thanks! :)

Dear Terraform team,
Workspace-enabled Application Insights is out of preview on 09/22/2020. Could you please let me know whether an argument is added to create Workspace-enabled Application Insight through Terraform.

Thanks,
Sai

Today I found the time to start implementing this feature.

Unfortunately it turns out that there's no straightforward path to implementing this currently. The reason is that the Azure SDK for Go does not support recent API versions yet, the API version which would have to be required is "2020-02-02-preview".
I made a feature request for it: appinsights: support API version "2020-02-02-preview" #13012.

Workspace based application insights is now GA in all regions. Is the TF support available yet for this?

kindly read up one comment 馃槙

Thanks... missed reading the link shared

Any updates ?

Was this page helpful?
0 / 5 - 0 ratings