I am trying to call a network module which needs to reference 2x accounts, I have the accounts referenced in my root main.tf file. I have read the information on passing-providers-explicitly but can’t get it to work. Perhaps someone who uses this functionality frequently is able to spot what I’ve done wrong.
I’ve created proxy configuration blocks for the module , it was however complaining about the lack of a defined region… even though based on the documentation it can be either empty or only require an alias argument.
When I define a region the file can apply/plan, but it gives the following error . my access key Id and secret access keys for both accounts are valid and still active
Error: error using credentials to get account ID: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid.
status code: 403, request id: 4f7d308c-4e64-4f9e-8fa5-08221348c239
on Modules\dxgw_ashburn\main.tf line 1, in provider "aws":
1: provider "aws" {
Error: error using credentials to get account ID: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid.
status code: 403, request id: efe02d16-9788-4a91-a5c9-01191e817933
on Modules\dxgw_ashburn\main.tf line 5, in provider "aws":
5: provider "aws" {
The attached image, shows the root main.tf on the left and the module on the right.
Thanks