Skip to content

Commit

Permalink
Fix failing import acceptance test
Browse files Browse the repository at this point in the history
While implementing #111, we noticed that the import acceptance test for
the `tfexec` package failed.
#111 (comment)

After investigation, I found that the time provider was significantly
rewritten in v0.9.0 to migrate to the new `terraform-plugin-framework`.
hashicorp/terraform-provider-time#112

As a result, the implementation of import for the `time_static` resource
now implicitly sets the `triggers` attribute to an empty map `{}`
instead of `null`.

I’m not sure if this change was intentional or not, though; we can
simply accept this change because there is no essential difference as
long as the import success with no change.
  • Loading branch information
minamijoyo committed Nov 25, 2022
1 parent 36bbdae commit be84cff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tfexec/terraform_import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ func TestTerraformCLIImport(t *testing.T) {
func TestAccTerraformCLIImport(t *testing.T) {
SkipUnlessAcceptanceTestEnabled(t)

source := `resource "time_static" "foo" {}`
source := `
resource "time_static" "foo" {
triggers = {}
}
`
e := SetupTestAcc(t, source)
terraformCLI := NewTerraformCLI(e)

Expand Down

0 comments on commit be84cff

Please sign in to comment.