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

New Resource: azurerm_log_analytics_storage_insights #9014

Merged
merged 20 commits into from
Nov 10, 2020

Conversation

WodansSon
Copy link
Collaborator

No description provided.

@WodansSon WodansSon changed the title [WIP]New Resource: azurerm_log_analytics_storage_insight_config New Resource: azurerm_log_analytics_storage_insight_config Oct 27, 2020
@WodansSon WodansSon added this to the v2.34.0 milestone Oct 27, 2020
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Hey @WodansSon - Insight config seems like the wrong name for this. I think it should be Storage Insights? as per documentation: https://docs.microsoft.com/en-us/rest/api/loganalytics/connectedsources/storage%20insights/listbyworkspace

azurerm/internal/services/loganalytics/client/client.go Outdated Show resolved Hide resolved
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

could we validate this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure what the rules are for this field 🙁

azurerm/internal/services/loganalytics/registration.go Outdated Show resolved Hide resolved
@WodansSon WodansSon closed this Nov 5, 2020
@WodansSon WodansSon reopened this Nov 5, 2020
@WodansSon WodansSon changed the title New Resource: azurerm_log_analytics_storage_insight_config New Resource: azurerm_log_analytics_storage_insights Nov 5, 2020
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @jackofallops @WodansSon

Thanks for pushing those changes - I've taken a look through and left a few comments inline but this otherwise LGTM 👍

Thanks!

"storage_account_id": {
Type: schema.TypeString,
Required: true,
ValidateFunc: storageValidate.StorageAccountID,
Copy link
Contributor

Choose a reason for hiding this comment

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

is this not ForceNew?

Copy link
Member

Choose a reason for hiding this comment

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

The API supports update in place for the storage account value.

@jackofallops jackofallops modified the milestones: v2.35.0, v2.36.0 Nov 5, 2020
@WodansSon
Copy link
Collaborator Author

@tombuildsstuff @jackofallops
I had to add a ToLower() to the resource group name and the name segments of the workspace_id since the lower-cased resource ID being returned from the API was causing all of the test cases to fail.

workspace_id: "/subscriptions/{subscription}/resourcegroups/acctestRG-la-201105140236973191/providers/microsoft.operationalinsights/workspaces/acctestlaw-201105140236973191" => 
              "/subscriptions/{subscription}/resourcegroups/acctestrg-la-201105140236973191/providers/microsoft.operationalinsights/workspaces/acctestlaw-201105140236973191" (forces new resource)

NOTE: Notice how Terraform correctly preserves the users casing(e.g. acctestRG), however the API does not(e.g. acctestrg)

Input Value Reurned Value
acctestRG-la-201105140236973191 acctestrg-la-201105140236973191

If anyone has a suggestion for a better way to fix this I am more than open to it 🙂

@ghost ghost added size/XXL and removed size/XL labels Nov 9, 2020
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jackofallops
Copy link
Member

Tests passing (1 unrelated failure, will be resolved by 9228)
image

@jackofallops jackofallops merged commit 00858ea into master Nov 10, 2020
@jackofallops jackofallops deleted the nr_logAnalytics_storageInsightConfigs branch November 10, 2020 17:23
jackofallops added a commit that referenced this pull request Nov 10, 2020
@ghost
Copy link

ghost commented Nov 12, 2020

This has been released in version 2.36.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.36.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Dec 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 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Dec 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.

4 participants