-
Notifications
You must be signed in to change notification settings - Fork 79
Conversation
80393f1
to
99dfacf
Compare
This comment has been minimized.
This comment has been minimized.
A new release of rabbit-hole has just landed, 2.2.0. I will get this PR fixed-up shortly. |
This comment has been minimized.
This comment has been minimized.
@niclic Many thanks for your work no this ! I'll take a look as soon as I can. (It may take a while though, it's not a tiny one 😅 and I never used this plugin yet) |
Okay, thanks. I'm actually just running through some tests using the actual provider as a final sanity check. Let me get back with the results of those. As for the module dependency updates that come with the upgrade to the latest version of rabbit-hole, perhaps they should come as a separate PR first? |
I pulled out the dependency changes into #57. |
I'll take a look at this PR this week (probably on Friday or during the week-end). Thanks again for all your work on this provider 👍 |
Great, thanks. Once #57 is merged, I will finish this. Just want to add a complete example to the docs, including defining a policy for federation. Then it will be done from my end. |
-- attribute is computed (i.e. read only)
-- this is temporary.
- move to util.go and refactor code to use this.
-- first draft -- update with discussion of default values
14cafad
to
f03f04d
Compare
Okay, this should be complete from my end. Required quite an involved rebase, to remove all the vendor and mod changes that happened before #57. Unable to remove 68664e9, and had to add 05d845a to compensate for it. Also, as expected, some commits appear out of order because of the history rewrite. If this PR gets squashed, then these issues will go away. |
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.
Very nice work 👍 Thanks a lot!
I never used this plugin so I trust you and the tests to assert it works :)
I'll squash in one commit indeed.
I'll let you know here when it's released.
Why do we need this PR?
Notes
Most of this new code is the same as the other resources - there are many similarities and I mostly just copied what was already done to be consistent.
Some noteworthy changes.
Extracted a common
parseResourceId
function toutil.go
.The intention it to later refactor other resources to use this function instead of copying it around.
Added
-count=1
tomake testacc
to avoid caching tests.I think this is a worthwhile change to make.
I importedgithub.com/hashicorp/terraform-plugin-sdk/helper/acctest
to create random resource names for test resources. This added quite a few additional vendor dependencies. This is a good practice, but only really needed for running parallel test suites. I think it might be a good idea to do that. However, I can remove the random names from the tests if you prefer this changeset to be smaller.I'm not usually a fan of encoding another APIs default values downstream, but in this case, I did include the documented default values for some attributes.
When adding federation support to the rabbithole API, I also added a runtime parameter API, and that is what federation uses internally. After this PR has been approved and merged, I will add support for runtime parameters to this terraform provider, since it can be useful to work with parameters directly in some cases.