Skip to content

Commit f95d113

Browse files
committed
Fix failing checks
1 parent ea7be37 commit f95d113

2 files changed

Lines changed: 34 additions & 34 deletions

File tree

internal/services/loganalytics/log_analytics_workspace_table_resource.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func (r LogAnalyticsWorkspaceTableResource) Arguments() map[string]*pluginsdk.Sc
158158
},
159159

160160
"categories": {
161-
Type: pluginsdk.TypeList,
161+
Type: pluginsdk.TypeSet,
162162
Optional: true,
163163
Elem: &pluginsdk.Schema{
164164
Type: pluginsdk.TypeString,
@@ -174,7 +174,7 @@ func (r LogAnalyticsWorkspaceTableResource) Arguments() map[string]*pluginsdk.Sc
174174
},
175175

176176
"labels": {
177-
Type: pluginsdk.TypeList,
177+
Type: pluginsdk.TypeSet,
178178
Optional: true,
179179
Elem: &pluginsdk.Schema{
180180
Type: pluginsdk.TypeString,
@@ -198,7 +198,7 @@ func (r LogAnalyticsWorkspaceTableResource) Arguments() map[string]*pluginsdk.Sc
198198
func (r LogAnalyticsWorkspaceTableResource) Attributes() map[string]*pluginsdk.Schema {
199199
return map[string]*pluginsdk.Schema{
200200
"solutions": {
201-
Type: pluginsdk.TypeList,
201+
Type: pluginsdk.TypeSet,
202202
Computed: true,
203203
Elem: &pluginsdk.Schema{
204204
Type: pluginsdk.TypeString,
@@ -475,7 +475,7 @@ func (r LogAnalyticsWorkspaceTableResource) Delete() sdk.ResourceFunc {
475475
return fmt.Errorf("while parsing resource ID: %+v", err)
476476
}
477477

478-
if metadata.ResourceData.Get("type") == string(tables.TableTypeEnumMicrosoft) {
478+
if model.Type == string(tables.TableTypeEnumMicrosoft) {
479479
// We can't delete Microsoft tables, so we'll just set the retention to workspace default
480480
updateInput := tables.Table{
481481
Properties: &tables.TableProperties{

website/docs/r/log_analytics_workspace_table.html.markdown

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ resource "azurerm_log_analytics_workspace" "example" {
3131
resource "azurerm_log_analytics_workspace_table" "example" {
3232
workspace_id = azurerm_log_analytics_workspace.example.id
3333
name = "AppMetrics"
34-
type = "Microsoft
34+
type = "Microsoft"
3535
sub_type = "DataCollectionRuleBased"
3636
retention_in_days = 60
3737
total_retention_in_days = 180
@@ -73,33 +73,33 @@ resource "azurerm_log_analytics_workspace_table" "example" {
7373

7474
The following arguments are supported:
7575

76-
* `name` - (Required) Specifies the name of the table in a Log Analytics Workspace. Must end in `_CL` for custom tables.
76+
- `name` - (Required) Specifies the name of the table in a Log Analytics Workspace. Must end in `_CL` for custom tables.
7777

78-
* `workspace_id` - (Required) The object ID of the Log Analytics Workspace that will contain the table.
78+
- `workspace_id` - (Required) The object ID of the Log Analytics Workspace that will contain the table.
7979

80-
* `type` - (Required) The type of table. Must be either of `Microsoft` for inbuilt tables, or `CustomLog` for custom tables.
80+
- `type` - (Required) The type of table. Must be either of `Microsoft` for inbuilt tables, or `CustomLog` for custom tables.
8181

82-
* `sub_type` - (Required) The sub type of table. Must be one of `Any`, `Classic`, or `DataCollectionRuleBased`.
82+
- `sub_type` - (Required) The sub type of table. Must be one of `Any`, `Classic`, or `DataCollectionRuleBased`.
8383

84-
* `display_name` - (Optional) The display name of the table in a Log Analytics Workspace.
84+
- `display_name` - (Optional) The display name of the table in a Log Analytics Workspace.
8585

86-
* `description` - (Optional) The description of the table in a Log Analytics Workspace.
86+
- `description` - (Optional) The description of the table in a Log Analytics Workspace.
8787

88-
* `categories` - (Optional) The categories applied to the table.
88+
- `categories` - (Optional) The categories applied to the table.
8989

90-
* `column` - (Optional) One or more `column` blocks detailed below.
90+
- `column` - (Optional) One or more `column` blocks detailed below.
9191

9292
-> **Note:** The order of the columns will match the display order in Log Analytics.
9393

94-
* `labels` - (Optional) The labels applied to the table.
94+
- `labels` - (Optional) The labels applied to the table.
9595

96-
* `plan` - (Optional) Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
96+
- `plan` - (Optional) Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
9797

9898
-> **Note:** The `name` of tables currently supported by the `Basic` plan can be found [here](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-configure?tabs=portal-1#supported-tables).
9999

100-
* `retention_in_days` - (Optional) The table's retention in days. Possible values are either `8` (Basic Tier only) or range between `4` and `730`.
100+
- `retention_in_days` - (Optional) The table's retention in days. Possible values are either `8` (Basic Tier only) or range between `4` and `730`.
101101

102-
* `total_retention_in_days` - (Optional) The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
102+
- `total_retention_in_days` - (Optional) The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
103103

104104
-> **Note:** `retention_in_days` and `total_retention_in_days` will revert back to the value of azurerm_log_analytics_workspace retention_in_days when a Microsoft or Classic azurerm_log_analytics_workspace_table is deleted.
105105

@@ -109,41 +109,41 @@ The following arguments are supported:
109109

110110
A `column` block supports the following:
111111

112-
* `name` - (Required) The name of the column.
112+
- `name` - (Required) The name of the column.
113113

114-
* `type` - (Required) The type of data stored in the column. Must be one of `boolean`, `dateTime`, `dynamic`, `guid"`, `int`, `long`, `real` , or `string`.
114+
- `type` - (Required) The type of data stored in the column. Must be one of `boolean`, `dateTime`, `dynamic`, `guid"`, `int`, `long`, `real` , or `string`.
115115

116-
* `display_name` - (Optional) The display name of the column.
116+
- `display_name` - (Optional) The display name of the column.
117117

118-
* `description` - (Optional) A description of the column.
118+
- `description` - (Optional) A description of the column.
119119

120-
* `display_by_default` - (Optional) Is the column displayed by default. Defaults to `true`.
120+
- `display_by_default` - (Optional) Is the column displayed by default. Defaults to `true`.
121121

122-
* `type_hint` - (Optional) A hint as to what kind of data is stored in a `string` column. Must be one of `armpath`, `guid`, `ip`, or `uri`.
122+
- `type_hint` - (Optional) A hint as to what kind of data is stored in a `string` column. Must be one of `armpath`, `guid`, `ip`, or `uri`.
123123

124-
* `hidden` - (Optional) Is the column hidden? Defaults to `false`.
124+
- `hidden` - (Optional) Is the column hidden? Defaults to `false`.
125125

126126
## Attributes Reference
127127

128128
The following attributes are exported:
129129

130-
* `id` - The Log Analytics Workspace Table ID.
130+
- `id` - The Log Analytics Workspace Table ID.
131131

132-
* `workspace_id` - The Workspace (or Customer) ID for the Log Analytics Workspace.
132+
- `workspace_id` - The Workspace (or Customer) ID for the Log Analytics Workspace.
133133

134-
* `retention_in_days` - The table's data retention in days.
134+
- `retention_in_days` - The table's data retention in days.
135135

136-
* `solutions` - The list of solutions associated with this table.
136+
- `solutions` - The list of solutions associated with this table.
137137

138-
* `standard_column` - The details of the standard columns in this table.
138+
- `standard_column` - The details of the standard columns in this table.
139139

140-
* `total_retention_in_days` - The table's total data retention in days.
140+
- `total_retention_in_days` - The table's total data retention in days.
141141

142142
## Timeouts
143143

144144
The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions:
145145

146-
* `create` - (Defaults to 5 minutes) Used when creating the Log Analytics Workspace.
147-
* `update` - (Defaults to 5 minutes) Used when updating the Log Analytics Workspace.
148-
* `read` - (Defaults to 5 minutes) Used when retrieving the Log Analytics Workspace.
149-
* `delete` - (Defaults to 30 minutes) Used when deleting the Log Analytics Workspace.
146+
- `create` - (Defaults to 5 minutes) Used when creating the Log Analytics Workspace.
147+
- `update` - (Defaults to 5 minutes) Used when updating the Log Analytics Workspace.
148+
- `read` - (Defaults to 5 minutes) Used when retrieving the Log Analytics Workspace.
149+
- `delete` - (Defaults to 30 minutes) Used when deleting the Log Analytics Workspace.

0 commit comments

Comments
 (0)