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_log_analytics_workspace - support for the immediate_data_purge_on_30_days_enabled property #24015

Conversation

ziyeqf
Copy link
Contributor

@ziyeqf ziyeqf commented Nov 24, 2023

test

 tftest loganalytics TestAccLogAnalyticsWorkspace                 
=== RUN   TestAccLogAnalyticsWorkspace_basic
=== PAUSE TestAccLogAnalyticsWorkspace_basic
=== RUN   TestAccLogAnalyticsWorkspace_requiresImport
=== PAUSE TestAccLogAnalyticsWorkspace_requiresImport
=== RUN   TestAccLogAnalyticsWorkspace_complete
=== PAUSE TestAccLogAnalyticsWorkspace_complete
=== RUN   TestAccLogAnalyticsWorkspace_freeTier
    log_analytics_workspace_resource_test.go:96: `TestAccLogAnalyticsWorkspace_freeTier` due to subscription pricing tier configuration (e.g. Pricing tier doesn't match the subscription's billing model.)
--- SKIP: TestAccLogAnalyticsWorkspace_freeTier (0.00s)
=== RUN   TestAccLogAnalyticsWorkspace_withDefaultSku
=== PAUSE TestAccLogAnalyticsWorkspace_withDefaultSku
=== RUN   TestAccLogAnalyticsWorkspace_withVolumeCap
=== PAUSE TestAccLogAnalyticsWorkspace_withVolumeCap
=== RUN   TestAccLogAnalyticsWorkspace_removeVolumeCap
=== PAUSE TestAccLogAnalyticsWorkspace_removeVolumeCap
=== RUN   TestAccLogAnalyticsWorkspace_withInternetIngestionEnabled
=== PAUSE TestAccLogAnalyticsWorkspace_withInternetIngestionEnabled
=== RUN   TestAccLogAnalyticsWorkspace_withInternetQueryEnabled
=== PAUSE TestAccLogAnalyticsWorkspace_withInternetQueryEnabled
=== RUN   TestAccLogAnalyticsWorkspace_withCapacityReservation
=== PAUSE TestAccLogAnalyticsWorkspace_withCapacityReservation
=== RUN   TestAccLogAnalyticsWorkspace_negativeOne
=== PAUSE TestAccLogAnalyticsWorkspace_negativeOne
=== RUN   TestAccLogAnalyticsWorkspace_cmkForQueryForced
=== PAUSE TestAccLogAnalyticsWorkspace_cmkForQueryForced
=== RUN   TestAccLogAnalyticsWorkspace_ToggleAllowOnlyResourcePermission
=== PAUSE TestAccLogAnalyticsWorkspace_ToggleAllowOnlyResourcePermission
=== RUN   TestAccLogAnalyticsWorkspace_ToggleDisableLocalAuth
=== PAUSE TestAccLogAnalyticsWorkspace_ToggleDisableLocalAuth
=== RUN   TestAccLogAnalyticsWorkspace_ToggleImmediatelyPurgeDataOn30Days
=== PAUSE TestAccLogAnalyticsWorkspace_ToggleImmediatelyPurgeDataOn30Days
=== RUN   TestAccLogAnalyticsWorkspace_updateSku
=== PAUSE TestAccLogAnalyticsWorkspace_updateSku
=== RUN   TestAccLogAnalyticsWorkspace_withDefaultDataCollectionRule
=== PAUSE TestAccLogAnalyticsWorkspace_withDefaultDataCollectionRule
=== RUN   TestAccLogAnalyticsWorkspace_withSystemAssignedIdentity
=== PAUSE TestAccLogAnalyticsWorkspace_withSystemAssignedIdentity
=== RUN   TestAccLogAnalyticsWorkspace_withUserAssignedIdentity
=== PAUSE TestAccLogAnalyticsWorkspace_withUserAssignedIdentity
=== RUN   TestAccLogAnalyticsWorkspace_toggleIdentity
=== PAUSE TestAccLogAnalyticsWorkspace_toggleIdentity
=== CONT  TestAccLogAnalyticsWorkspace_basic
=== CONT  TestAccLogAnalyticsWorkspace_cmkForQueryForced
=== CONT  TestAccLogAnalyticsWorkspace_withDefaultDataCollectionRule
=== CONT  TestAccLogAnalyticsWorkspace_removeVolumeCap
=== CONT  TestAccLogAnalyticsWorkspace_withUserAssignedIdentity
=== CONT  TestAccLogAnalyticsWorkspace_negativeOne
=== CONT  TestAccLogAnalyticsWorkspace_withDefaultSku
=== CONT  TestAccLogAnalyticsWorkspace_toggleIdentity
--- PASS: TestAccLogAnalyticsWorkspace_basic (182.87s)
=== CONT  TestAccLogAnalyticsWorkspace_withInternetQueryEnabled
--- PASS: TestAccLogAnalyticsWorkspace_withDefaultSku (194.57s)
=== CONT  TestAccLogAnalyticsWorkspace_withCapacityReservation
--- PASS: TestAccLogAnalyticsWorkspace_negativeOne (197.15s)
=== CONT  TestAccLogAnalyticsWorkspace_withSystemAssignedIdentity
--- PASS: TestAccLogAnalyticsWorkspace_withUserAssignedIdentity (224.19s)
=== CONT  TestAccLogAnalyticsWorkspace_ToggleImmediatelyPurgeDataOn30Days
--- PASS: TestAccLogAnalyticsWorkspace_cmkForQueryForced (262.99s)
=== CONT  TestAccLogAnalyticsWorkspace_withVolumeCap
--- PASS: TestAccLogAnalyticsWorkspace_removeVolumeCap (262.99s)
=== CONT  TestAccLogAnalyticsWorkspace_updateSku
--- PASS: TestAccLogAnalyticsWorkspace_withDefaultDataCollectionRule (298.40s)
=== CONT  TestAccLogAnalyticsWorkspace_ToggleDisableLocalAuth
--- PASS: TestAccLogAnalyticsWorkspace_toggleIdentity (356.94s)
=== CONT  TestAccLogAnalyticsWorkspace_withInternetIngestionEnabled
--- PASS: TestAccLogAnalyticsWorkspace_withSystemAssignedIdentity (188.90s)
=== CONT  TestAccLogAnalyticsWorkspace_requiresImport
--- PASS: TestAccLogAnalyticsWorkspace_withInternetQueryEnabled (251.24s)
=== CONT  TestAccLogAnalyticsWorkspace_ToggleAllowOnlyResourcePermission
--- PASS: TestAccLogAnalyticsWorkspace_withCapacityReservation (242.74s)
=== CONT  TestAccLogAnalyticsWorkspace_complete
--- PASS: TestAccLogAnalyticsWorkspace_withVolumeCap (190.64s)
--- PASS: TestAccLogAnalyticsWorkspace_ToggleImmediatelyPurgeDataOn30Days (275.79s)
--- PASS: TestAccLogAnalyticsWorkspace_updateSku (250.02s)
--- PASS: TestAccLogAnalyticsWorkspace_ToggleDisableLocalAuth (257.85s)
--- PASS: TestAccLogAnalyticsWorkspace_requiresImport (189.14s)
--- PASS: TestAccLogAnalyticsWorkspace_withInternetIngestionEnabled (244.26s)
--- PASS: TestAccLogAnalyticsWorkspace_complete (181.05s)
--- PASS: TestAccLogAnalyticsWorkspace_ToggleAllowOnlyResourcePermission (279.44s)
PASS
ok  	github.com/hashicorp/terraform-provider-azurerm/internal/services/loganalytics	713.637s

@ziyeqf ziyeqf changed the title azurerm_log_analytics_workspace: support immediate_purge_data_on_30_days_enabled azurerm_log_analytics_workspace - support for the immediate_purge_data_on_30_days_enabled property Nov 24, 2023
Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks for this @ziyeqf. This looks fine but can we rename the property slightly for grammatical correctness?

@@ -154,6 +154,11 @@ func resourceLogAnalyticsWorkspace() *pluginsdk.Resource {
ValidateFunc: datacollectionrules.ValidateDataCollectionRuleID,
},

"immediate_purge_data_on_30_days_enabled": {
Copy link
Member

Choose a reason for hiding this comment

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

Can we rename this to be grammatically correct

Suggested change
"immediate_purge_data_on_30_days_enabled": {
"immediate_data_purge_on_30_days_enabled": {

@ziyeqf ziyeqf changed the title azurerm_log_analytics_workspace - support for the immediate_purge_data_on_30_days_enabled property azurerm_log_analytics_workspace - support for the immediate_data_purge_on_30_days_enabled property Dec 11, 2023
Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks @ziyeqf LGTM 👍

@stephybun stephybun merged commit 7bb6a87 into hashicorp:main Dec 11, 2023
24 checks passed
@github-actions github-actions bot added this to the v3.85.0 milestone Dec 11, 2023
@ziyeqf ziyeqf deleted the tengzh/vanguard/operationalinsights/workspace_purge_data branch December 12, 2023 02:28
dduportal pushed a commit to jenkins-infra/azure that referenced this pull request Dec 15, 2023
<Actions>
<action
id="f410411e63aff4bb73a81c2aec1d373cf8a903e63b30dee2006b0030d8a94cc8">
        <h3>Bump Terraform `azurerm` provider version</h3>
<details
id="1d9343c012f5434ac9fe8a98135bae3667b399259be16d9b14302ea3bd424a24">
            <summary>Update Terraform lock file</summary>
<p>&#34;hashicorp/azurerm&#34; updated from &#34;3.84.0&#34; to
&#34;3.85.0&#34; in file &#34;.terraform.lock.hcl&#34;</p>
            <details>
                <summary>3.85.0</summary>
<pre>Changelog retrieved
from:&#xA;&#x9;https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v3.85.0&#xA;FEATURES:&#xA;&#xA;*
New Data Source: `azurerm_locations`
([#23324](https://github.com/hashicorp/terraform-provider-azurerm/issues/23324))&#xA;*
New Resource: `azurerm_iotcentral_organization`
([#23132](https://github.com/hashicorp/terraform-provider-azurerm/issues/23132))&#xA;&#xA;ENHANCEMENTS:&#xA;&#xA;*
provider: support for authenticating using Azure Kubernetes Service
Workload Identity
([#23965](https://github.com/hashicorp/terraform-provider-azurerm/issues/23965))&#xA;*
dependencies: updating to `v0.65.0` of
`github.com/hashicorp/go-azure-helpers`
([#24222](https://github.com/hashicorp/terraform-provider-azurerm/issues/24222))&#xA;*
dependencies: updating to `v0.20231214.1220802` of
`github.com/hashicorp/go-azure-sdk`
([#24246](https://github.com/hashicorp/terraform-provider-azurerm/issues/24246))&#xA;*
dependencies: updating to version `v0.20231214.1160726` of
`github.com/hashicorp/go-azure-sdk`
([#24241](https://github.com/hashicorp/terraform-provider-azurerm/issues/24241))&#xA;*
dependencies: update `security/automation` to use
`hashicorp/go-azure-sdk`
([#24156](https://github.com/hashicorp/terraform-provider-azurerm/issues/24156))&#xA;*
`dataprotection`: updating to API Version `2023-05-01`
([#24143](https://github.com/hashicorp/terraform-provider-azurerm/issues/24143))&#xA;*
`kusto`: removing the remnants of the old Resource ID Parsers now this
uses `hashicorp/go-azure-sdk`
([#24238](https://github.com/hashicorp/terraform-provider-azurerm/issues/24238))&#xA;*
Data Source: `azurerm_cognitive_account` - export the `identity` block
([#24214](https://github.com/hashicorp/terraform-provider-azurerm/issues/24214))&#xA;*
Data Source: `azurerm_monitor_workspace` - add support for the
`default_data_collection_endpoint_id` and
`default_data_collection_rule_id` properties
([#24153](https://github.com/hashicorp/terraform-provider-azurerm/issues/24153))&#xA;*
Data Source: `azurerm_shared_image_gallery` - add support for the
`image_names` property
([#24176](https://github.com/hashicorp/terraform-provider-azurerm/issues/24176))&#xA;*
`azurerm_dns_txt_record` - allow up to `4096` characters for the
property `record.value`
([#24169](https://github.com/hashicorp/terraform-provider-azurerm/issues/24169))&#xA;*
`azurerm_container_app` - support for the `workload_profile_name`
property
([#24219](https://github.com/hashicorp/terraform-provider-azurerm/issues/24219))&#xA;*
`azurerm_container_app` - suppot for the `init_container` block
([#23955](https://github.com/hashicorp/terraform-provider-azurerm/issues/23955))&#xA;*
`azurerm_hpc_cache_blob_nfs_target` - support for the
`verification_timer_in_seconds` and `write_back_timer_in_seconds`
properties
([#24207](https://github.com/hashicorp/terraform-provider-azurerm/issues/24207))&#xA;*
`azurerm_hpc_cache_nfs_target` - support for the
`verification_timer_in_seconds` and `write_back_timer_in_seconds`
properties
([#24208](https://github.com/hashicorp/terraform-provider-azurerm/issues/24208))&#xA;*
`azurerm_linux_web_app` - make `client_secret_setting_name` optional and
conflict with `client_secret_certificate_thumbprint`
([#21834](https://github.com/hashicorp/terraform-provider-azurerm/issues/21834))&#xA;*
`azurerm_linux_web_app_slot` - make `client_secret_setting_name`
optional and conflict with `client_secret_certificate_thumbprint`
([#21834](https://github.com/hashicorp/terraform-provider-azurerm/issues/21834))&#xA;*
`azurerm_linux_web_app` - fix a bug in `app_settings` where settings
could be lost
([#24221](https://github.com/hashicorp/terraform-provider-azurerm/issues/24221))&#xA;*
`azurerm_linux_web_app_slot` - fix a bug in `app_settings` where
settings could be lost
([#24221](https://github.com/hashicorp/terraform-provider-azurerm/issues/24221))&#xA;*
`azurerm_log_analytics_workspace` - add support for the
`immediate_data_purge_on_30_days_enabled` property
([#24015](https://github.com/hashicorp/terraform-provider-azurerm/issues/24015))&#xA;*
`azurerm_mssql_server` - support for other identity types for the key
vault key
([#24236](https://github.com/hashicorp/terraform-provider-azurerm/issues/24236))&#xA;*
`azurerm_machine_learning_datastore_blobstorage` - resource now skips
validation when being created
([#24078](https://github.com/hashicorp/terraform-provider-azurerm/issues/24078))&#xA;*
`azurerm_machine_learning_datastore_datalake_gen2` - resource now skips
validation when being created
([#24078](https://github.com/hashicorp/terraform-provider-azurerm/issues/24078))&#xA;*
`azurerm_machine_learning_datastore_fileshare` - resource now skips
validation when being created
([#24078](https://github.com/hashicorp/terraform-provider-azurerm/issues/24078))&#xA;*
`azurerm_monitor_workspace` - support for the
`default_data_collection_endpoint_id` and
`default_data_collection_rule_id` properties
([#24153](https://github.com/hashicorp/terraform-provider-azurerm/issues/24153))&#xA;*
`azurerm_redis_cache` - support for the
`storage_account_subscription_id` property
([#24101](https://github.com/hashicorp/terraform-provider-azurerm/issues/24101))&#xA;*
`azurerm_storage_blob` - support for the `source_content` type `Page`
([#24177](https://github.com/hashicorp/terraform-provider-azurerm/issues/24177))&#xA;*
`azurerm_web_application_firewall_policy` - support new values to the
`rule_group_name` property
([#24194](https://github.com/hashicorp/terraform-provider-azurerm/issues/24194))&#xA;*
`azurerm_windows_web_app` - make the `client_secret_setting_name`
property optional and conflicts with the
`client_secret_certificate_thumbprint` property
([#21834](https://github.com/hashicorp/terraform-provider-azurerm/issues/21834))&#xA;*
`azurerm_windows_web_app_slot` - make the `client_secret_setting_name`
property optional and conflicts with the
`client_secret_certificate_thumbprint` property
([#21834](https://github.com/hashicorp/terraform-provider-azurerm/issues/21834))&#xA;*
`azurerm_windows_web_app` - fix a bug in `app_settings` where settings
could be lost
([#24221](https://github.com/hashicorp/terraform-provider-azurerm/issues/24221))&#xA;*
`azurerm_windows_web_app_slot` - fix a bug in `app_settings` where
settings could be lost
([#24221](https://github.com/hashicorp/terraform-provider-azurerm/issues/24221))&#xA;*
`azurerm_cognitive_account` - add `ContentSafety` to the `kind` property
validation
([#24205](https://github.com/hashicorp/terraform-provider-azurerm/issues/24205))&#xA;&#xA;BUG
FIXES:&#xA;&#xA;* provider: fix an authentication issue with Azure
Storage when running in Azure China cloud
([#24246](https://github.com/hashicorp/terraform-provider-azurerm/issues/24246))&#xA;*
Data Source: `azurerm_role_definition` - fix bug where
`role_definition_id` and `scope` were being incorrectly set
([#24211](https://github.com/hashicorp/terraform-provider-azurerm/issues/24211))&#xA;*
`azurerm_batch_account` - fix bug where `UserAssigned, SystemAssigned`
could be passed to the resource even though it isn&#39;t supported
([#24204](https://github.com/hashicorp/terraform-provider-azurerm/issues/24204))&#xA;*
`azurerm_batch_pool` - fix bug where `settings_json` and
`protected_settings` were not being unmarshaled
([#24075](https://github.com/hashicorp/terraform-provider-azurerm/issues/24075))&#xA;*
`azurerm_bot_service_azure_bot` - fix bug where
`public_network_access_enabled` was being set as the value for `LuisKey`
([#24164](https://github.com/hashicorp/terraform-provider-azurerm/issues/24164))&#xA;*
`azurerm_cognitive_account_customer_managed_key` - `identity_client_id`
is no longer passed to the api when it is empty
([#24231](https://github.com/hashicorp/terraform-provider-azurerm/issues/24231))&#xA;*
`azurerm_linux_web_app_slot` - error when `service_plan_id` is identical
to the parent `service_plan_id`
([#23403](https://github.com/hashicorp/terraform-provider-azurerm/issues/23403))&#xA;*
`azurerm_management_group_template_deployment` - fixing a bug where
`template_spec_version_id` couldn&#39;t be updated
([#24072](https://github.com/hashicorp/terraform-provider-azurerm/issues/24072))&#xA;*
`azurerm_pim_active_role_assignment` - fix an importing issue by
filtering available role assignments based on the provided `scope`
([#24077](https://github.com/hashicorp/terraform-provider-azurerm/issues/24077))&#xA;*
`azurerm_pim_eligible_role_assignment` - fix an importing issue by
filtering available role assignments based on the provided `scope`
([#24077](https://github.com/hashicorp/terraform-provider-azurerm/issues/24077))&#xA;*
`azurerm_resource_group_template_deployment` - fixing a bug where
`template_spec_version_id` couldn&#39;t be updated
([#24072](https://github.com/hashicorp/terraform-provider-azurerm/issues/24072))&#xA;*
`azurerm_security_center_setting` - fix the casing for the
`setting_name` `Sentinel`
([#24210](https://github.com/hashicorp/terraform-provider-azurerm/issues/24210))&#xA;*
`azurerm_storage_account` - Fix crash when checking for
`routingInputs.PublishInternetEndpoints` and
`routingInputs.PublishMicrosoftEndpoints`
([#24228](https://github.com/hashicorp/terraform-provider-azurerm/issues/24228))&#xA;*
`azurerm_storage_share_file` - prevent panic when the file specified by
`source` is empty
([#24179](https://github.com/hashicorp/terraform-provider-azurerm/issues/24179))&#xA;*
`azurerm_subscription_template_deployment` - fixing a bug where
`template_spec_version_id` couldn&#39;t be updated
([#24072](https://github.com/hashicorp/terraform-provider-azurerm/issues/24072))&#xA;*
`azurerm_tenant_template_deployment` - fixing a bug where
`template_spec_version_id` couldn&#39;t be updated
([#24072](https://github.com/hashicorp/terraform-provider-azurerm/issues/24072))&#xA;*
`azurerm_virtual_machine` - prevent a panic by nil checking the first
element of `additional_capabilities`
([#24159](https://github.com/hashicorp/terraform-provider-azurerm/issues/24159))&#xA;*
`azurerm_windows_web_app_slot` - error when `service_plan_id` is
identical to the parent `service_plan_id`
([#23403](https://github.com/hashicorp/terraform-provider-azurerm/issues/23403))&#xA;&#xA;&#xA;</pre>
            </details>
        </details>
<a
href="https://infra.ci.jenkins.io/job/terraform-jobs/job/azure/job/main/942/">Jenkins
pipeline link</a>
    </action>
</Actions>

---

<table>
  <tr>
    <td width="77">
<img src="https://www.updatecli.io/images/updatecli.png" alt="Updatecli
logo" width="50" height="50">
    </td>
    <td>
      <p>
Created automatically by <a
href="https://www.updatecli.io/">Updatecli</a>
      </p>
      <details><summary>Options:</summary>
        <br />
<p>Most of Updatecli configuration is done via <a
href="https://www.updatecli.io/docs/prologue/quick-start/">its
manifest(s)</a>.</p>
        <ul>
<li>If you close this pull request, Updatecli will automatically reopen
it, the next time it runs.</li>
<li>If you close this pull request and delete the base branch, Updatecli
will automatically recreate it, erasing all previous commits made.</li>
        </ul>
        <p>
Feel free to report any issues at <a
href="https://github.com/updatecli/updatecli/issues">github.com/updatecli/updatecli</a>.<br
/>
If you find this tool useful, do not hesitate to star <a
href="https://github.com/updatecli/updatecli/stargazers">our GitHub
repository</a> as a sign of appreciation, and/or to tell us directly on
our <a
href="https://matrix.to/#/#Updatecli_community:gitter.im">chat</a>!
        </p>
      </details>
    </td>
  </tr>
</table>

Co-authored-by: Jenkins Infra Bot (updatecli) <60776566+jenkins-infra-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants