-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add Add-on attachment name #241
base: master
Are you sure you want to change the base?
Conversation
This was named based on the heroku cli --as parameter on addon:create |
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 @brian-mcnamara!
Could you also update https://github.com/terraform-providers/terraform-provider-heroku/blob/master/website/docs/r/addon.html.markdown#argument-reference and https://github.com/terraform-providers/terraform-provider-heroku/blob/master/CHANGELOG.md#222-unreleased?
The updates look great, thanks @brian-mcnamara! There's one test failing (from the previous version):
It looks like we probably need to include Once that's passing this should be all set! 👍 |
Since I can't do an inline comment, you also need to set the attachment name in the |
This PR is a duplicate of the one I was working on #227. The implementation between the two is mostly the same. I listed a few questions I had when I was working on it so I'd like to know if you have tested/researched the following questions:
I am circling back to #227 since my team now needs it so if the comments I added to this PR require additional modifications, I would like to finish off my PR and merge it in. FYI @bernerdschaefer |
Note: the addon resource does not return the attachment name, so it can't be read back.
The attachment name set on creation cannot be updated via the addon APIs. I think @brian-mcnamara's changes here are the correct way to model the interaction -- ForceNew, set the attribute during create, and don't set it during read. That said... it would be confusing and weird if you did change the attachment name via an attachment resource, but then couldn't change or remove the |
Thanks for filling in, you nailed it. The issue about a recreate happening for a attachment_name change may be able to be fixed. Let me play around with the heroku API tomorrow and see if I can't change it without destroying the created add-on. My current thought is it would require a large refactor to the add-on state (which may not work for forwards compatibility). Ill post back. Thanks for all the support on this one everyone! |
Testing some things: Given an add-on id, you can query the heroku api to list the add-on attachment that were also created. You can not delete the only attachment associated to an add-on but can create a new one, followed by deleting the old one. If we want to make sure that users can change the attachment_name without destroying and recreating the add-on we would need to:
This may be possible, but my initial concerns are:
Thoughts? |
@bernerdschaefer Yeah it's not possible but you could do a roundabout way via https://devcenter.heroku.com/articles/platform-api-reference#add-on-attachment-list or better yet, https://devcenter.heroku.com/articles/platform-api-reference#add-on-attachment-list-by-add-on. That's how I implemented the |
Oh geez, @davidji99 I didn't notice your PR until now 😮, do you have time to work on completing your PR? Happy to help work on your branch (since it looks like you have a lot of things I re-did) |
Yeah, let me circle back to my PR. |
What is missing here to move this forward? |
I'll be the guy who raises this from the dead to ask: any timeline on getting this merged and released? 😇 |
I've read through all these interlinked issues & PRs, and do not see how this can be merged, because:
Create could work, but we just don't have enough information to correctly manage the lifecycle of the default Add-on attachment as part of the Could the solution be to use |
Workaround 🧰When an add-on attachment name is required for your use-case, create a new Then, create |
No description provided.