File tree Expand file tree Collapse file tree 3 files changed +19
-11
lines changed
dev-tools/cloud/terraform Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ set -euo pipefail
44
55source .buildkite/scripts/common.sh
66
7- EC_KEY_SECRET_PATH=" kv/ci-shared/platform-ingest/platform-ingest-ec-prod"
87CI_DRA_ROLE_PATH=" kv/ci-shared/release/dra-role"
98JOB_GCS_BUCKET=" fleet-server-ci-internal"
109GITHUB_REPO_TOKEN=$VAULT_GITHUB_TOKEN
@@ -44,15 +43,6 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == "fleet-server-package-mbp" ]]; then
4443 check_if_file_exist_in_repo " infra" " ${_branch} " # TODO should be changed to "main" for rollback...
4544fi
4645
47- # TODO: use a builkite plugin to handle this
48- if [[ " $BUILDKITE_PIPELINE_SLUG " == " fleet-server" ]]; then
49- if [[ " $BUILDKITE_STEP_KEY " == " cloud-e2e-test" || " $BUILDKITE_STEP_KEY " == " cloud-e2e-fips-test" ]]; then
50- export EC_API_KEY_SECRET=$( retry 5 vault kv get -field apiKey " ${EC_KEY_SECRET_PATH} " )
51- # Environment variables required by the Elastic Cloud service deployer
52- export EC_API_KEY=${EC_API_KEY_SECRET}
53- fi
54- fi
55-
5646# TODO: use a builkite plugin to handle this
5747if [[ " $BUILDKITE_PIPELINE_SLUG " == " fleet-server-package-mbp" ]]; then
5848 if [[ " $BUILDKITE_STEP_KEY " == " dra-snapshot" || " $BUILDKITE_STEP_KEY " == " dra-staging" ]]; then
Original file line number Diff line number Diff line change @@ -208,6 +208,10 @@ steps:
208208 provider : " gcp"
209209 plugins :
210210 - *docker_elastic_login_plugin
211+ - elastic/vault-secrets#v0.1.0:
212+ path : " kv/ci-shared/platform-ingest/platform-ingest-ec-prod"
213+ field : " apiKey"
214+ env_var : " EC_API_KEY"
211215 depends_on :
212216 - step : " unit-test"
213217 allow_failure : false
@@ -231,11 +235,18 @@ steps:
231235 PLATFORMS : " linux/amd64"
232236 TF_VAR_pull_request : " ${BUILDKITE_PULL_REQUEST}"
233237 FIPS : " true"
238+ EC_ENDPOINT : " https://api.staging.elastic-gov.com"
239+ TF_VAR_ess_region : " us-gov-east-1"
240+ TF_VAR_deployment_template_id : " aws-general-purpose"
234241 command : " .buildkite/scripts/cloud_e2e_test.sh"
235242 agents :
236243 provider : " gcp"
237244 plugins :
238245 - *docker_elastic_login_plugin
246+ - elastic/vault-secrets#v0.1.0:
247+ path : " kv/ci-shared/platform-ingest/platform-ingest-ec-staging-gov"
248+ field : " apiKey"
249+ env_var : " EC_API_KEY"
239250 depends_on :
240251 - step : " unit-test"
241252 allow_failure : false
Original file line number Diff line number Diff line change @@ -34,6 +34,12 @@ variable "ess_region" {
3434 description = " The ESS region to use"
3535}
3636
37+ variable "deployment_template_id" {
38+ type = string
39+ default = " gcp-general-purpose"
40+ description = " The ess deployment template to use"
41+ }
42+
3743locals {
3844 // strip hash found in ELASTICSEARCH_VERSION in integration/.env to get stack_version
3945 dra_match = regex (" ELASTICSEARCH_VERSION=([0-9]+\\ .[0-9]+\\ .[0-9]+)(?:-[[:alpha:]]+-)?-?(SNAPSHOT)?" , file (" ${ path . module } /../../integration/.env" ))
@@ -49,8 +55,9 @@ data "ec_stack" "latest" {
4955resource "ec_deployment" "deployment" {
5056 name = format (" fleet server PR-%s-%s" , var. pull_request , var. git_commit )
5157 region = var. ess_region
58+ deployment_template_id = var. deployment_template_id
5259 version = data. ec_stack . latest . version
53- deployment_template_id = " gcp-general-purpose "
60+
5461
5562 tags = {
5663 " source_repo" = " elastic/fleet-server"
You can’t perform that action at this time.
0 commit comments