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 - retention_in_days defaults to 90 #6851

Merged
merged 1 commit into from May 11, 2020

Conversation

hbuckle
Copy link
Contributor

@hbuckle hbuckle commented May 11, 2020

The current resource is not idempotent, it seems Azure now sets this to 90 by default

resource "azurerm_application_insights" "test" {
  name                = "test"
  location            = "uksouth"
  resource_group_name = "test"
  application_type    = "web"
}
> terraform apply

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # azurerm_application_insights.test will be created
  + resource "azurerm_application_insights" "test" {
      + app_id                                = (known after apply)
      + application_type                      = "web"
      + daily_data_cap_in_gb                  = (known after apply)
      + daily_data_cap_notifications_disabled = (known after apply)
      + id                                    = (known after apply)
      + instrumentation_key                   = (sensitive value)
      + location                              = "uksouth"
      + name                                  = "test"
      + resource_group_name                   = "test"
      + sampling_percentage                   = 100
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

azurerm_application_insights.test: Creating...
azurerm_application_insights.test: Still creating... [10s elapsed]
azurerm_application_insights.test: Still creating... [20s elapsed]
azurerm_application_insights.test: Creation complete after 28s [id=/subscriptions/xxx/resourceGroups/test/providers/microsoft.insights/components/test]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

> terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

azurerm_application_insights.test: Refreshing state... [id=/subscriptions/xxx/resourceGroups/test/providers/microsoft.insights/components/test]

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_application_insights.test will be updated in-place
  ~ resource "azurerm_application_insights" "test" {
        app_id                                = "b0dac594-ed19-42c2-8a68-647b27345921"
        application_type                      = "web"
        daily_data_cap_in_gb                  = 100
        daily_data_cap_notifications_disabled = false
        id                                    = "/subscriptions/xxx/resourceGroups/test/providers/microsoft.insights/components/test"
        instrumentation_key                   = (sensitive value)
        location                              = "uksouth"
        name                                  = "test"
        resource_group_name                   = "test"
      - retention_in_days                     = 90 -> null
        sampling_percentage                   = 100
        tags                                  = {}
    }

Plan: 0 to add, 1 to change, 0 to destroy.

@mbfrahry mbfrahry changed the title [azurerm_application_insights] - Default retention_in_days to 90 azurerm_application_insights - retention_in_days defaults to 90 May 11, 2020
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mbfrahry mbfrahry added this to the v2.10.0 milestone May 11, 2020
@mbfrahry mbfrahry merged commit c1faa66 into hashicorp:master May 11, 2020
mbfrahry added a commit that referenced this pull request May 11, 2020
jrauschenbusch pushed a commit to jrauschenbusch/terraform-provider-azurerm that referenced this pull request May 13, 2020
jrauschenbusch pushed a commit to jrauschenbusch/terraform-provider-azurerm that referenced this pull request May 13, 2020
@ghost
Copy link

ghost commented May 15, 2020

This has been released in version 2.10.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.10.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jun 11, 2020

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Jun 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants