fix(eks): support an optional aws_profile for the kubernetes provider exec plugin - #471
Merged
Merged
Conversation
… exec plugin The kubernetes provider's exec plugin (`aws eks get-token`) had no way to select an AWS CLI profile, so it silently fell back to the default credential chain. Consumers with named profiles had to export AWS_PROFILE in their shell before running tofu, with no way to express it in code. Adds an optional aws_profile variable (default "") and threads it into the exec args, matching the pattern already used for the "aws" provider in this same module.
sebastiancorrea81
added a commit
that referenced
this pull request
Aug 7, 2026
🤖 I have created a release *beep* *boop* --- ## [6.10.0](v6.9.0...v6.10.0) (2026-08-07) ### Features * **service_definition:** forward link spec fields from the template ([#477](#477)) ([2994e6b](2994e6b)) ### Bug Fixes * **ci:** compare release PR author against REST-style bot login ([4e00860](4e00860)) * **ci:** compare release PR author against REST-style bot login ([#481](#481)) ([75a16ea](75a16ea)) * **ci:** trigger release PR auto-merge via workflow_run instead of pull_request ([e7eff48](e7eff48)) * **ci:** trigger release PR auto-merge via workflow_run instead of pull_request ([#479](#479)) ([80738de](80738de)) * **eks:** support an optional aws_profile for the kubernetes provider exec plugin ([#471](#471)) ([ccb2f5f](ccb2f5f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kubernetesprovider'sexecplugin (aws eks get-token) had no way to select an AWS CLI profile, so it silently fell back to the default credential chain.AWS_PROFILEin their shell before runningtofu/terraform, with no way to express it in code.aws_profilevariable (default"", backward compatible) and threads it into the exec args via the sameconcat(cond ? [...] : [], [...])pattern already used elsewhere in this repo.Test plan
awsbinary that--profile <value>is now present in the actualexecinvocation argv, withAWS_PROFILEunset in the shell.tofu planagainst a real cluster (this module vendored locally) shows no unexpected diff — only pre-existing addon-version drift unrelated to this change.