Skip to content

Conversation

@ryantam626
Copy link

Issue #, if available:

Description of changes:

Fix the documentation surrounding AWS_EC2_METADATA_DISABLED, it's treated as a CMake style flag when it isn't.

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
    (Explanation: Just doc changes)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.
    (Unsure if I should tick this)

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…Provider with `AWS_EC2_METADATA_DISABLED` env var

A quick grep through the codebase[*] shows that `AWS_EC2_METADATA_DISABLED`
is not a CMake style flag where (one of ON or OFF) is expected, instead
it's an environment variable where only TRUE (case-insensitive) means it's
active. Update docs to reflect that.

[*]
```
> grep -r AWS_EC2_METADATA_DISABLED src
src/aws-cpp-sdk-core/source/auth/AWSCredentialsProviderChain.cpp:static const char AWS_EC2_METADATA_DISABLED[] = "AWS_EC2_METADATA_DISABLED";
src/aws-cpp-sdk-core/source/auth/AWSCredentialsProviderChain.cpp:    const auto ec2MetadataDisabled = Aws::Environment::GetEnv(AWS_EC2_METADATA_DISABLED);
src/aws-cpp-sdk-core/source/auth/AWSCredentialsProviderChain.cpp:    AWS_LOGSTREAM_DEBUG(DefaultCredentialsProviderChainTag, "The environment variable value " << AWS_EC2_METADATA_DISABLED
src/aws-cpp-sdk-core/source/auth/AWSCredentialsProviderChain.cpp:    const auto ec2MetadataDisabled = Aws::Environment::GetEnv(AWS_EC2_METADATA_DISABLED);
src/aws-cpp-sdk-core/source/auth/AWSCredentialsProviderChain.cpp:    AWS_LOGSTREAM_DEBUG(DefaultCredentialsProviderChainTag, "The environment variable value " << AWS_EC2_METADATA_DISABLED
src/aws-cpp-sdk-core/source/client/ClientConfiguration.cpp:        Aws::Utils::StringUtils::ToLower(Aws::Environment::GetEnv("AWS_EC2_METADATA_DISABLED").c_str()) != "true")
src/aws-cpp-sdk-core/source/client/ClientConfiguration.cpp:        Aws::Utils::StringUtils::ToLower(Aws::Environment::GetEnv("AWS_EC2_METADATA_DISABLED").c_str()) != "true")
src/aws-cpp-sdk-core/source/client/ClientConfiguration.cpp:        Aws::Utils::StringUtils::ToLower(Aws::Environment::GetEnv("AWS_EC2_METADATA_DISABLED").c_str()) != "true") {
src/aws-cpp-sdk-core/source/client/ClientConfiguration.cpp:        Aws::Utils::StringUtils::ToLower(Aws::Environment::GetEnv("AWS_EC2_METADATA_DISABLED").c_str()) != "true")
src/aws-cpp-sdk-core/source/config/defaults/ClientConfigurationDefaults.cpp:                        Aws::Utils::StringUtils::ToLower(Aws::Environment::GetEnv("AWS_EC2_METADATA_DISABLED").c_str()) != "true")
```
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

Successfully merging this pull request may close these issues.

1 participant