-
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
provider/digitalocean: prevent new resources when using ID's of image… #13879
Conversation
ACCEPTANCE TESTS WITH TESTS ONLY (test_droplet.go)
ACCEPTANCE TESTS WITH ALL CHANGES (droplet_test.go + droplet.go)
I also ran the basic test:
|
There might be a problem when switching from a snapshot to a distro |
fixed. |
current status: ready for review & merge |
63832c9
to
d346883
Compare
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.
Just one minor thing in the test, otherwise this LGTM.
{ | ||
Config: testAccCheckDigitalOceanDropletConfig_withID(centosID, rInt), | ||
PlanOnly: true, | ||
}, |
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.
We actually refresh the state as part of every test step, so this is not necessary - would you mind removing the second step + Destroy: false
?
done |
@roidelapluie thanks for sending the other PR, would you mind modifying this PR/test too and resolving conflicts? Thanks |
…s with slugs When you specify the ID of an image that has a slug, terraform would store its slug to the state, hence it would always recreate the image. This commit fixes it by storing the image as an ID when it is specified by and ID by the user, ignoring the slug. Closes hashicorp#12751. Fixes hashicorp#12255. Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
done |
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.
👍 Great, thanks for the short response time, pulling in...
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. |
…s with slugs
When you specify the ID of an image that has a slug, terraform would
store its slug to the state, hence it would always recreate the image.
This commit fixes it by storing the image as an ID when it is specified
by and ID by the user, ignoring the slug.
Closes #12751.
Fixes #12255.
Signed-off-by: Julien Pivotto roidelapluie@inuits.eu