Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose provider and type for estimated resources #42

Closed
patrislav opened this issue May 10, 2021 · 0 comments · Fixed by #43
Closed

Expose provider and type for estimated resources #42

patrislav opened this issue May 10, 2021 · 0 comments · Fixed by #43
Assignees
Labels
enhancement New feature or request

Comments

@patrislav
Copy link
Contributor

The cost.Resource and cost.ResourceDiff structs are missing any information about which provider they belong to and which type they are. Currently, the only way to extract this is from the address, however, this is being complicated by the fact that module resource addresses are different from root module ones and also by the effort that library consumers would require.

These two fields would be much better provided by us on the aforementioned types.

@patrislav patrislav added the enhancement New feature or request label May 10, 2021
@patrislav patrislav self-assigned this May 10, 2021
patrislav pushed a commit that referenced this issue May 10, 2021
patrislav pushed a commit that referenced this issue May 13, 2021
* query: add `Type` and `Provider` to the `Resource` struct

* terraform: store resource's Type and Provider in the query.Resource

* cost: attach Provider and Type values to Resource and ResourceDiff

* aws: implement Name for Provider as the interface has changed

* mock: update the TerraformProvider mock

* CHANGELOG.md: add an entry about #42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant