Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v2.4.0 (unreleased)

ENHANCEMENTS:
- `azapi` resources/data sources: Update embedded schema to the latest version.


## v2.3.0

ENHANCEMENTS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
"character": 2
}
},
"newText": "retry {\n\tinterval_seconds = $1\n\tmax_interval_seconds = $2\n\tmultiplier = $3\n\trandomization_factor = $4\n}"
"newText": "retry = {\n\terror_message_regex = [$0]\n}"
},
"command": {
"title": "Suggest",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "azapi_resource" "diagnostics" {
type = "microsoft.insights/diagnosticSettings@2017-05-01-preview"
type = "microsoft.insights/diagnosticSettings@2021-05-01-preview"
name = "somename"
parent_id = azapi_resource.automationAccount.id
body = jsonencode({
Expand Down
117 changes: 116 additions & 1 deletion internal/langserver/handlers/tfschema/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ func init() {
Modifier: "Optional",
Type: "block",
Description: "Configuration block for custom retry policy.",
CompletionNewText: "retry {\n\tinterval_seconds = $1\n\tmax_interval_seconds = $2\n\tmultiplier = $3\n\trandomization_factor = $4\n}",
CompletionNewText: "retry = {\n\terror_message_regex = [$0]\n}",
NestedProperties: []Property{
{
Name: "error_message_regex",
Modifier: "Required",
Type: "list<string>",
Description: "A list of regular expressions to match against error messages. If any of the regular expressions match, the request will be retried.",
CompletionNewText: "error_message_regex = [$0]",
},

{
Name: "interval_seconds",
Modifier: "Optional",
Expand Down Expand Up @@ -606,6 +614,14 @@ func init() {
GenericCandidatesFunc: bodyCandidates,
},

{
Name: "locks",
Modifier: "Optional",
Type: "list<string>",
Description: "A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.",
CompletionNewText: `locks = [$0]`,
},

{
Name: "response_export_values",
Modifier: "Optional",
Expand All @@ -614,6 +630,14 @@ func init() {
CompletionNewText: `response_export_values = [$0]`,
},

{
Name: "sensitive_response_export_values",
Modifier: "Optional",
Type: "list<string> or map<string, string>",
Description: "The attribute can accept either a list or a map of path that needs to be exported from response body as sensitive.",
CompletionNewText: `sensitive_response_export_values = [$0]`,
},

retryProperty,

{
Expand Down Expand Up @@ -689,6 +713,14 @@ func init() {
CompletionNewText: `response_export_values = [$0]`,
},

{
Name: "sensitive_response_export_values",
Modifier: "Optional",
Type: "list<string> or map<string, string>",
Description: "The attribute can accept either a list or a map of path that needs to be exported from response body as sensitive.",
CompletionNewText: `sensitive_response_export_values = [$0]`,
},

retryProperty,

{
Expand Down Expand Up @@ -792,5 +824,88 @@ func init() {
},
},
},
Resource{
Name: "ephemeral.azapi_resource_action",
Properties: []Property{
{
Name: "type",
Modifier: "Required",
Type: "string <resource-type>@<api-version>",
Description: "Azure Resource Manager type.",
CompletionNewText: `type = "$0"`,
ValueCandidatesFunc: typeCandidates,
},

{
Name: "resource_id",
Modifier: "Required",
Type: "string",
Description: "The ID of an existing azure source.",
CompletionNewText: `resource_id = $0`,
},

{
Name: "action",
Modifier: "Optional",
Type: "string",
Description: "Specifies the name of the azure resource action.",
CompletionNewText: `action = "$0"`,
GenericCandidatesFunc: actionCandidates,
},

{
Name: "method",
Modifier: "Optional",
Type: "string",
Description: "Specifies the Http method of the azure resource action. Defaults to `POST`",
CompletionNewText: `method = $0`,
ValueCandidatesFunc: dataSourceHttpMethodCandidates,
},

{
Name: "body",
Modifier: "Optional",
Type: "dynamic",
Description: "An HCL object that contains the request body.",
CompletionNewText: `body = $0`,
ValueCandidatesFunc: FixedValueCandidatesFunc([]lsp.CompletionItem{dynamicPlaceholderCandidate()}),
GenericCandidatesFunc: bodyCandidates,
},

{
Name: "locks",
Modifier: "Optional",
Type: "list<string>",
Description: "A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.",
CompletionNewText: `locks = [$0]`,
},

{
Name: "response_export_values",
Modifier: "Optional",
Type: "list<string> or map<string, string>",
Description: "The attribute can accept either a list or a map of path that needs to be exported from response body.",
CompletionNewText: `response_export_values = [$0]`,
},

retryProperty,

{
Name: "headers",
Modifier: "Optional",
Type: "map<string, string>",
Description: "A mapping of headers which should be sent with the request.",
CompletionNewText: `headers = $0`,
},

{
Name: "query_parameters",
Modifier: "Optional",
Type: "map<string, list<string>>",
Description: "A mapping of query parameters which should be sent with the request.",
CompletionNewText: `query_parameters = $0`,
},
},
},
)
}
Loading