Skip to content

Azure Redis Cache can't be imported #602

Description

@chaoscreater

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

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')"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions