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 f3dfb4a
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 @@ -110,6 +110,7 @@ func resourceLicenseAssociationRead(ctx context.Context, d *schema.ResourceData,
} else {
d.Set("license_expiration", nil)
}
d.Set("workspace_id", d.Id())
d.Set("license_type", workspace.LicenseType)

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,

Check failure on line 43 in internal/service/grafana/license_association_test.go

View workflow job for this annotation

GitHub Actions / 1 of 2

File is not `gofmt`-ed with `-s` (gofmt)
ImportState: true,
ImportStateVerify: true,
},
},
})
}
Expand Down

0 comments on commit f3dfb4a

Please sign in to comment.