FG
☁️ Cloud & DevOps

Cannot use `terraform import` with module that has dynamic provider configuration

Freshabout 5 years ago
Mar 14, 20260 views
Confidence Score83%
83%

Problem

Terraform Version `Terraform v0.9.1` Affected Resource(s) N/A Terraform Configuration Files [code block] Debug Output https://gist.github.com/ff54870fee49636209ecfaa5de272175 Panic Output N/A Expected Behavior Resource was imported Actual Behavior [code block] Steps to Reproduce 1. `terraform import module.module_us_west_1.aws_cloudwatch_log_group.rds_os "arn:aws:logs:us-west-1:FILTERED:log-group:RDSOSMetrics:*"` Important Factoids N/A References N/A

Error Output

Error importing: 1 error(s) occurred:

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
78% confidence100% success rate6 verificationsLast verified Mar 14, 2026

Solution: Cannot use `terraform import` with module that has dynamic provider configuration

Low Risk

It looks like you can sort of get around this by aliasing the provider. [code block] This may also be worth a read: https://github.com/hashicorp/terraform/issues/1819 As is this: https://github.com/hashicorp/terraform/issues/3285

78

Trust Score

6 verifications

100% success
  1. 1

    It looks like you can sort of get around this by aliasing the provider.

    [code block] This may also be worth a read: https://github.com/hashicorp/terraform/issues/1819 As is this: https://github.com/hashicorp/terraform/issues/3285

Validation

Resolved in hashicorp/terraform GitHub issue #13018. Community reactions: 15 upvotes.

Verification Summary

Worked: 6
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

terraformiacawsenhancementcorecli