Skip to content
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

Apply tags to Elastic Search domain resources after creation. #1399

Conversation

charles-at-geospock
Copy link
Contributor

The Elastic Search Domain resource takes about 10 minutes to create.
During this time, many things may go wrong to break the behaviour of
the Terraform system - network drops, token expiry, system crashes,
accidentally closing the wrong terminal, etc... In such cases, the
resource will have been created but not be tagged. So, as well as
Terraform losing track of it, the tracking tags would not give an
indication of why it existed in the first place.

The current code creates the domain and then waits until it has
completed construction before setting the tags. It also seems to
use the partial completion interface, which seems redundant as
it immediately completes the operation.

In any case, moving the tag setting operations before the wait
means that the tags are present as early as possible, allowing
the resource to be identified. And that tiny amount of time is
absorbed into the long domain creation, making things marginally
faster.

The Elastic Search Domain resource takes about 10 minutes to create.
During this time, many things may go wrong to break the behaviour of
the Terraform system - network drops, token expiry, system crashes,
accidentally closing the wrong terminal, etc... In such cases, the
resource will have been created but not be tagged. So, as well as
Terraform losing track of it, the tracking tags would not give an
indication of why it existed in the first place.

The current code creates the domain and then waits until it has
completed construction before setting the tags. It also seems to
use the partial completion interface, which seems redundant as
it immediately completes the operation.

In any case, moving the tag setting operations before the wait
means that the tags are present as early as possible, allowing
the resource to be identified. And that tiny amount of time is
absorbed into the long domain creation, making things marginally
faster.
@radeksimko radeksimko added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 14, 2017
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

Related acceptance tests are passing and I don't think there's any way we can test the particular code change, so 🚢 ...

@radeksimko radeksimko merged commit 9eff87b into hashicorp:master Aug 23, 2017
nbaztec pushed a commit to nbaztec/terraform-provider-aws that referenced this pull request Sep 26, 2017
…csearch-domain-before-waiting

Apply tags to Elastic Search domain resources after creation.
@ghost
Copy link

ghost commented Apr 11, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants