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

Currently, the SSM resolution must always resolve to String. Boolean and Numerics become strings #16

Open
terrywbrady opened this issue Nov 2, 2023 · 0 comments

Comments

@terrywbrady
Copy link
Contributor

terrywbrady commented Nov 2, 2023

The true/false value is not resolving properly. In DEV, we use docker and do not have SSL. In Prod/Stage, we need SSL.

  opensearch:
    host: "{!SSM: objhealth/opensearch_host}"
    user: "{!SSM: objhealth/opensearch_user}"
    password: "{!SSM: objhealth/opensearch_password}"
    transport_options:
      ssl: 
        verify: "{!SSM: objhealth/opensearch_ssl}"

As a workaround, I had to do the following

    osconfig = @config.fetch("opensearch", {})
    osconfig[:transport_options] = osconfig.fetch(:transport_options, {})
    osconfig[:transport_options][:ssl] = osconfig[:transport_options].fetch(:ssl, {})
    osconfig[:transport_options][:ssl][:verify] = osconfig[:transport_options][:ssl].fetch(:verify, "false") == "true"
    @osclient = OpenSearch::Client.new(@config.fetch("opensearch", {}))

If we solve this in the ruby implementation, we should also resolve this in the Java implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant