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

ec_deployment: Add autoscaling support #296

Merged
merged 12 commits into from
Apr 15, 2021

Conversation

marclop
Copy link
Contributor

@marclop marclop commented Apr 14, 2021

Description

Adds support for autoscaling.

The PR has been split in multiple commits to make reviewing easier.

data "ec_stack" "latest" {
  version_regex = "latest"
  region        = "us-east-1"
}

resource "ec_deployment" "example_minimal" {
  region                 = "us-east-1"
  version                = data.ec_stack.latest.version
  deployment_template_id = "aws-io-optimized-v2"

  elasticsearch {
    autoscale = "true"

    topology {
      id   = "cold"
      size = "8g"
    }

    topology {
      id   = "hot_content"
      size = "8g"

      autoscaling {
        // Optionally change the policy max size.
        // max_size = "29g"
      }
    }

    topology {
      id   = "ml"
      size = "1g"

      autoscaling {
        // Optionally change the policy max size.
        // max_size = "29g"
        // Optionally change the policy min size.
        // min_size = "1g"
      }
    }

    topology {
      id   = "warm"
      size = "16g"
    }
  }

  kibana {}

  apm {}

  enterprise_search {}
}

Related Issues

Closes #258

How Has This Been Tested?

Manual, unit and acceptance tests.

Types of Changes

  • New feature (non-breaking change which adds functionality)

@marclop marclop added enhancement New feature or request Team:Delivery labels Apr 14, 2021
@marclop marclop requested review from alaudazzi, nrichers and a team as code owners April 14, 2021 10:54
@marclop marclop self-assigned this Apr 14, 2021
@marclop marclop requested a review from Kushmaro April 14, 2021 10:54
Signed-off-by: Marc Lopez <[email protected]>
@Kushmaro
Copy link
Collaborator

ah another question - @marclop , given "autoscaling = true"
will the autoscaling object be mandatory (from a users's perspective)?

@marclop
Copy link
Contributor Author

marclop commented Apr 14, 2021

@Kushmaro it's optional at the moment. Since the policy settings can come from the Deployment Template it doesn't make much sense to make it mandatory.

@Kushmaro
Copy link
Collaborator

Agree @marclop :)
I was just making sure that having autoscaling = "true" won't cause a weird user behaviour.

LGTM

Copy link
Contributor

@karencfv karencfv left a comment

Choose a reason for hiding this comment

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

Looks great! 👌

Thanks for adding datasource support as well!

@marclop marclop merged commit 173e412 into elastic:master Apr 15, 2021
@marclop marclop deleted the f/support-autoscaling branch April 15, 2021 02:23
@marclop marclop mentioned this pull request Apr 15, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ec_deployment: Support Autoscaling
3 participants