-
Notifications
You must be signed in to change notification settings - Fork 84
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
ec_deployment : Tags for deployment datasource #244
ec_deployment : Tags for deployment datasource #244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @neiljbrookes for opening up the PR! 🎉 🙇♀️
The code looks great! Apart from the docs comment, we should add this feature to the acceptance tests.
To modify the deployment datasource acc test you need to do two things:
- Add a tag to the test .tf file here
- Verify that the tag on the datasource is the same as the one in the resource here
The resource tags test can help as a guideline.
You can take a look at the resource tags test. It will be similar.
To run this test locally you would need to run make testacc TEST_NAME=TestAccDatasourceDeployment_basic
.
Warning While this test is passing on master it's going through a "getting it fixed" state , this PR is the second part of getting it fixed. So you might want to wait for it to get merged so you can pull the changes otherwise you might also get some annoying merge conflicts 😄
Co-authored-by: Karen Cárcamo <karencfv@users.noreply.github.com>
cee211d
to
f1c9905
Compare
Rebased from master to get #242. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the doc change on ec_deployment.md.
@karencfv I've made an attempt at some acceptance tests !
Its quite simple, like me 😆. Tested OK for me
The |
Thanks a bunch for addressing my comments @neiljbrookes 🙇♀️ I tried running the In the interest of moving your PR along I think the |
Thanks @karencfv . To clarify, I get successful tests on
and faillure on
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this feature @neiljbrookes 🎉 Everything looks great now
I have confirmed that the errors on the test are unrelated to this PR. We've had some ongoing issues with this suite particularly :(
Thanks for all your help @karencfv. |
Description
This PR surafces any metadata tags associated with a deployment datasource.
schema.go
to include "tags" in the ec_deployment schemadatasrouce.go
(modelToState) to operate on any "tags" present in the model.flatteners_tags.go
(flattenTags) a function to flatten the model tags into a flat map.flatteners_tags_test.go
A unit test.datasource_test.go
. Adddition of tag flattening to the test.ec_deployment.md
. Includes "tags" as an attribute reference in the docs.Related Issues
Closes : #182
Motivation and Context
How Has This Been Tested?
Unit and manual tests.
I have used this defintion to test.
Types of Changes
Readiness Checklist