-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Fix issue with with Opsworks and empty Custom Cook Book sources #6078
Conversation
I've confirmed this persists with HEAD: I've created a simple gist to demonstrate the fix against: https://gist.github.com/u2mejc/c1613ed663daa9bd3eb8749e8a658cfd |
Replied to #6077, I'd like for us to considering not making this |
@catsby said:
Moving development discussion here so we don't get too split brained. I'm guessing you saw the example to reproduce the issue above. ☝️
I'm not sure I understand, by
Is that not what's expected? |
@catsby I'm happy to be able to help, getting Terraform to fully support OpsWorks is aligned with my current sprint. But I'm not super familiar with the code base. Can you please give a little more context around your ask, I'll be happy to work on the code for you then. 👍 |
@apparentlymart I was wondering if you could look at this PR? I know you're probably most intimate with it. Use case is for creating OpsWorks stacks without custom repos, namely for recipes that are all available in the supermarket. I think this change is pretty straightforward, can you think of a use case this wouldn't work? |
@u2mejc I'm not sure exactly what @catsby was getting at here, but I think what he's suggesting is that instead of changing the schema we would check for and ignore an empty cookbooks source. So maybe in if v != nil && *.v.Type != "" {
// ... This would mean that if the Opsworks API returns a the cookbooks source as a bunch of empty strings then we just keep the values we already had. Hopefully @catsby can confirm whether that was what he was driving at. I'm super rusty on this code so I don't have any better theories than his, but I would agree that setting it as |
Thank you Martin! I don't believe that AWS should ever respond with computed values for custom cookbooks? But if @catsby believes it would be better to ignore Terraform creating empty strings, I'm happy to adjust the PR. Clint, let me know if you have time to look at this and comment or if you'd like Paul / Martin to approve it. |
Hi friends! I'm terribly sorry to have left you hanging here. I popped in, said a thing, and then left, leaving you not unable to understand my glaring typo 😄
What I meant was not changing the What I'm seeing here is that if you do not specify a custom cookbook, that the So, what @apparentlymart said, in that we should verify it's not nil and also contains something meaningful. I would want to triple check that this is true though (the empty value) I hope that clears things up! I apologize again for the *edit: I don't think I ever apologize for science ;) |
Thank you Clint!!! I'll rework the PR and shoot it back up. |
756c361
to
7b31c33
Compare
@catsby Per your request, I've adjusted this PR to simply check for nil and empty string, instead of disabling the computed value. Please let me know if there is anything else you'd like me to add. 👍 |
Excellent, thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This resolves #6077