Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_application_insights has no application_type Node.JS #2179

Closed
StefanSchoof opened this issue Oct 29, 2018 · 6 comments · Fixed by #2407
Closed

azurerm_application_insights has no application_type Node.JS #2179

StefanSchoof opened this issue Oct 29, 2018 · 6 comments · Fixed by #2407

Comments

@StefanSchoof
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.11.9

  • provider.azurerm v1.17.0

Affected Resource(s)

  • azurerm_application_insights

Terraform Configuration Files

resource "azurerm_resource_group" "test" {
  name     = "tf-test"
  location = "West Europe"
}

resource "azurerm_application_insights" "node" {
  name                = "node"
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"
  application_type    = "Node.JS"
}

Debug Output

Panic Output

Expected Behavior

Creates a Application insights for Node.JS, like in Monitor your Node.js services and apps with Application Insights described.

Actual Behavior

terrafrom plan results into a:

Error: azurerm_application_insights.node: expected application_type to be one of [web other java MobileCenter phone store ios], got Node.JS

Steps to Reproduce

  1. terraform plan

Important Factoids

References

@tombuildsstuff
Copy link
Contributor

hi @StefanSchoof

Thanks for opening this issue :)

Taking a quick look into this, whilst it's not overly clear (unfortunately) I believe Node.JS in the Azure Portal is actually represented as Other in the Azure API/Terraform Resource - would you be able to take a look and see if this works for you?

Thanks!

@StefanSchoof
Copy link
Contributor Author

StefanSchoof commented Oct 29, 2018

Thanks for your reply.

I created an application insight over the portal and select Node. Then I imported the resource into terraform. When I set the application_type web, terraform tries to change the type from "Node.JS" -> "web".

I will try if a resource of this type works for me.

@StefanSchoof
Copy link
Contributor Author

I tried the "other" application type. It seems to work in my use case. I could not spot any difference between the "other" and the "Node.JS" type.

But I think azure has an "Node.JS" type. If I take a look into "Automation script" in the azure Portal for a Insights I created over the portal and selected Node.JS. I got

        {
            "comments": "Generalized from resource: '/subscriptions/xxxxx/resourceGroups/yyyy/providers/microsoft.insights/components/yyyyy-node'.",
            "type": "microsoft.insights/components",
            "kind": "Node.JS",
            "name": "[parameters('components_zzzz_node_name')]",
            "apiVersion": "2015-05-01",
            "location": "westeurope",
            "tags": {},
            "scale": null,
            "properties": {
                "Application_Type": "Node.JS",
                "Flow_Type": "Redfield",
                "Request_Source": "IbizaAIExtension",
                "HockeyAppId": null,
                "SamplingPercentage": null
            },
            "dependsOn": []
        },

and the other

{
            "comments": "Generalized from resource: '/subscriptions/xxxx/resourceGroups/yyyyy/providers/microsoft.insights/components/zzzz-node'.",
            "type": "microsoft.insights/components",
            "kind": "other",
            "name": "[parameters('components_yyyy_node_name')]",
            "apiVersion": "2015-05-01",
            "location": "westeurope",
            "tags": {},
            "scale": null,
            "properties": {
                "Application_Type": "other",
                "Flow_Type": null,
                "Request_Source": null,
                "HockeyAppId": null,
                "SamplingPercentage": null
            },
            "dependsOn": []
        },

@StefanSchoof
Copy link
Contributor Author

@tombuildsstuff are you expecting more response or does my answer slip through?

@katbyte
Copy link
Collaborator

katbyte commented Nov 29, 2018

Hi @StefanScherer,

From the documentation that field is used to customize UI. This value is a freeform string so it seems like the type doesn't have to much effect.

As the portal does allow node as an option (and doesn't seem to use other anymore) I have opened #2179 to add it 🙂

@katbyte katbyte added this to the 1.20.0 milestone Nov 29, 2018
@ghost
Copy link

ghost commented Mar 5, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants