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 config to stateless resources #49

Merged
merged 7 commits into from
Aug 25, 2020

Conversation

marclop
Copy link
Contributor

@marclop marclop commented Aug 20, 2020

Description

Adds a config block to all the stateless resources with the settable
settings being the same across the resources:

  • user_settings_yaml
  • user_settings_overrides_yaml
  • user_settings_json
  • user_settings_overrides_json

Except for:

  • apm: secret_token and debug_enabled.
  • appsearch: secret_session_key
  • enterprise_search: secret_session_key

All the fields above except apm.debug_enabledmight be removed in the
near future pending an internal discussion.

The pull request has been split in different commits to ease the review
process, the commit names should be enough for the reviewers.

Related Issues

Resolves #22
Resolves #42
Resolves #6

How Has This Been Tested?

$ make testacc
-> Formatting Go files...
-> Formatting Terraform documentation blocks...
-> Done.
-> Running terraform acceptance tests...
=== RUN   TestAccDeployment_appsearch
=== PAUSE TestAccDeployment_appsearch
=== RUN   TestAccDeployment_basic
=== PAUSE TestAccDeployment_basic
=== RUN   TestAccDeployment_enterpriseSearch
=== PAUSE TestAccDeployment_enterpriseSearch
=== CONT  TestAccDeployment_appsearch
=== CONT  TestAccDeployment_enterpriseSearch
=== CONT  TestAccDeployment_basic
--- PASS: TestAccDeployment_appsearch (604.57s)
--- PASS: TestAccDeployment_enterpriseSearch (841.21s)
--- PASS: TestAccDeployment_basic (922.48s)
PASS
ok  	github.com/terraform-providers/terraform-provider-ec/ec/acc	922.976s

Types of Changes

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

@marclop marclop added enhancement New feature or request Team:Delivery labels Aug 20, 2020
@marclop marclop requested a review from a team as a code owner August 20, 2020 12:28
@marclop marclop self-assigned this Aug 20, 2020
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 good! just a small nit and a question. One more thing, I think you meant to say it resolves #22 not #8 in the description 😄

ec/ecresource/deploymentresource/schema_appsearch.go Outdated Show resolved Hide resolved
ec/ecresource/deploymentresource/schema_kibana.go Outdated Show resolved Hide resolved
Comment on lines -112 to -144
"docker_image": {
Type: schema.TypeString,
Description: `A docker URI that allows overriding of the default docker image specified for this version`,
Optional: true,
},

// APM System Settings
"debug_enabled": {
Type: schema.TypeBool,
Description: `Optionally enable debug mode for APM servers - defaults to false`,
Optional: true,
Default: false,
},
"elasticsearch_password": {
Type: schema.TypeString,
Description: `Optionally override the account within APM - defaults to a system account that always exists (if specified, the username must also be specified)`,
Optional: true,
},
"elasticsearch_url": {
Type: schema.TypeString,
Description: `Optionally override the URL to which to send data (for advanced users only, if unspecified the system selects an internal URL)`,
Optional: true,
},
"elasticsearch_username": {
Type: schema.TypeString,
Description: `Optionally override the account within APM - defaults to a system account that always exists (if specified, the password must also be specified)`,
Optional: true,
},
"kibana_url": {
Type: schema.TypeString,
Description: `Optionally override the URL to which to send data (for advanced users only, if unspecified the system selects an internal URL)`,
Optional: true,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

What happened to all of these fields? I assume the idea is to parse everything from raw JSON/YAML? just double checking

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These fields shouldn't be settable by API users and have the potential to cause breakage in the deployment, so removing them because they're not a good thing to have :D. I talked to Stack and Solutions about it and think that's the best course of action too.

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.

🏅

@marclop marclop merged commit 7f59a06 into elastic:master Aug 25, 2020
@marclop marclop deleted the f/add-all-statless-config-settings branch December 15, 2020 07:59
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
2 participants