Skip to content

Commit

Permalink
fix: Add missing workspace_id from importing aws_grafana_license_asso…
Browse files Browse the repository at this point in the history
…ciation
  • Loading branch information
acwwat committed Jan 13, 2024
1 parent 85b0843 commit aa799b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/35290.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_grafana_license_association: Fix missing `workspace_id` attribute after import
```
1 change: 1 addition & 0 deletions internal/service/grafana/license_association.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func resourceLicenseAssociationRead(ctx context.Context, d *schema.ResourceData,
d.Set("license_expiration", nil)
}
d.Set("license_type", workspace.LicenseType)
d.Set("workspace_id", d.Id())

return diags
}
Expand Down
5 changes: 5 additions & 0 deletions internal/service/grafana/license_association_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ func testAccLicenseAssociation_freeTrial(t *testing.T) {
resource.TestCheckResourceAttrPair(resourceName, "workspace_id", workspaceResourceName, "id"),
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}
Expand Down

0 comments on commit aa799b2

Please sign in to comment.