Azure / Azure/aztfexport

Azure Redis Cache can't be imported

Open
#602 1 comment 0 reactions 0 assignees View on GitHub
bug upstream-provider
Dominant language
Go
Stars
1.9k
Forks
221
Avg merge
15h 43m
Merged PRs (30d)
9

Description

I'm getting the following error on Redis Cache and this error is consistently found across all RGs that have this resource type.

`Error: generating Terraform configuration: converting from state to configurations: generating state for resource azurerm_redis_cache.res-2: tune template for azurerm_redis_cache: () tunning attributes: (redis_version) checking attribute value is default or zero: converting cty value 6 to Go: can't convert Go float64 to string`

![Image](https://github.com/user-attachments/assets/8ae109f5-2585-4bb6-886d-423d004973ae)

Currently, I have to use the following to exclude certain resource types from being imported. If I don't do this, the main.tf file doesn't get generated for the rest of the resources in the same RG as those problematic resource types.

```
aztfexport query `
-n `
-f `
-k `
--include-role-assignment `
--mask-sensitive `
--hcl-only `
--tfclient-plugin-path "$Plugin_Cache_Provider_Path\terraform-provider-azurerm_v$($LatestProviderVersion)_x5.exe" `
--provider-name azurerm `
--provider-version $LatestProviderVersion `
--log-level $LogLevel `
--parallelism 1 `
--log-path "$ExportPath\tfexportlogs.log" `
--output-dir "$ExportPath" `
--client-id "$env:ARM_CLIENT_ID" `
--client-secret "$env:ARM_CLIENT_SECRET" `
--tenant-id "$env:ARM_TENANT_ID" `
"resourceGroup =~ '$ResourceGroup' and tags !contains 'deployed_by_amba' and not(type =~ 'Microsoft.Cache/Redis') and not(type =~ 'Microsoft.OperationsManagement/solutions') and not(type =~ 'Microsoft.Logic/workflows/triggers') and not(type =~ 'Microsoft.Logic/workflows')"
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.