Skip to content

Commit

Permalink
terraform: use sensitive files
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Jan 8, 2025
1 parent 4d8d13c commit a165cba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions testing/infra/terraform/modules/ec_deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ used to configure the module, please refer to the [EC Provider docs](https://reg
|------|------|
| [ec_deployment.dedicated_observability_deployment](https://registry.terraform.io/providers/elastic/ec/0.5.1/docs/resources/deployment) | resource |
| [ec_deployment.deployment](https://registry.terraform.io/providers/elastic/ec/0.5.1/docs/resources/deployment) | resource |
| [local_file.custom_apm_integration_pkg](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
| [local_file.drop_pipeline](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
| [local_file.enable_features](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
| [local_file.secret_token](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
| [local_file.shard_settings](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
| [local_sensitive_file.custom_apm_integration_pkg](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource |
| [local_sensitive_file.drop_pipeline](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource |
| [local_sensitive_file.enable_features](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource |
| [local_sensitive_file.secret_token](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource |
| [local_sensitive_file.shard_settings](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource |
| [null_resource.custom_apm_integration_pkg](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
| [null_resource.drop_pipeline](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
| [null_resource.enable_features](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
Expand Down
10 changes: 5 additions & 5 deletions testing/infra/terraform/modules/ec_deployment/deployment.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ resource "ec_deployment" "dedicated_observability_deployment" {
kibana {}
}

resource "local_file" "enable_features" {
resource "local_sensitive_file" "enable_features" {
content = templatefile("${path.module}/scripts/enable_features.tftpl", {
kibana_url = ec_deployment.deployment.kibana.0.https_endpoint,
elastic_password = ec_deployment.deployment.elasticsearch_password,
Expand All @@ -125,7 +125,7 @@ resource "local_file" "enable_features" {
filename = "${path.module}/scripts/enable_features.sh"
}

resource "local_file" "secret_token" {
resource "local_sensitive_file" "secret_token" {
count = var.integrations_server ? 1 : 0
content = templatefile("${path.module}/scripts/secret_token.tftpl", {
kibana_url = ec_deployment.deployment.kibana.0.https_endpoint,
Expand All @@ -134,7 +134,7 @@ resource "local_file" "secret_token" {
filename = "${path.module}/scripts/secret_token.sh"
}

resource "local_file" "shard_settings" {
resource "local_sensitive_file" "shard_settings" {
count = var.apm_index_shards > 0 ? 1 : 0
content = templatefile("${path.module}/scripts/index_shards.tftpl", {
elasticsearch_url = ec_deployment.deployment.elasticsearch.0.https_endpoint,
Expand All @@ -145,7 +145,7 @@ resource "local_file" "shard_settings" {
filename = "${path.module}/scripts/index_shards.sh"
}

resource "local_file" "custom_apm_integration_pkg" {
resource "local_sensitive_file" "custom_apm_integration_pkg" {
count = var.custom_apm_integration_pkg_path != "" ? 1 : 0
content = templatefile("${path.module}/scripts/custom-apm-integration-pkg.tftpl", {
kibana_url = ec_deployment.deployment.kibana.0.https_endpoint,
Expand Down Expand Up @@ -229,7 +229,7 @@ resource "null_resource" "drop_pipeline" {
}
}

resource "local_file" "drop_pipeline" {
resource "local_sensitive_file" "drop_pipeline" {
count = var.drop_pipeline ? 1 : 0
content = templatefile("${path.module}/scripts/drop_pipeline.tftpl", {
elasticsearch_url = ec_deployment.deployment.elasticsearch.0.https_endpoint,
Expand Down

0 comments on commit a165cba

Please sign in to comment.