Difference between revisions of "Dynamic Credentials with the AWS Provider"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
* https://developer.hashicorp.com/terraform/cloud-docs/workspaces/dynamic-provider-credentials/aws-configuration
 
* https://developer.hashicorp.com/terraform/cloud-docs/workspaces/dynamic-provider-credentials/aws-configuration
 
* [[TFC_AWS_PROVIDER_AUTH]]
 
* [[TFC_AWS_RUN_ROLE_ARN]]
 
 
  
 
== Example ==
 
== Example ==
Line 32: Line 28:
 
* [[AWS_SHARED_CREDENTIALS_FILE]]
 
* [[AWS_SHARED_CREDENTIALS_FILE]]
 
* [[AWS_CONFIG_FILE]]
 
* [[AWS_CONFIG_FILE]]
 +
* [[TFC_AWS_PROVIDER_AUTH]]
 +
* [[TFC_AWS_RUN_ROLE_ARN]]
 
* [[OIDC Identity Provider]]
 
* [[OIDC Identity Provider]]
 
* [[Creating an IAM OIDC provider for your EKS cluster]]
 
* [[Creating an IAM OIDC provider for your EKS cluster]]

Revision as of 18:34, 20 February 2024

Example

variable "tfc_aws_dynamic_credentials" {
 description = "Object containing AWS dynamic credentials configuration"
 type = object({
   default = object({
     shared_config_file = string
   })
   aliases = map(object({
     shared_config_file = string
   }))
 })
}


provider "aws" {
  shared_config_files = [var.tfc_aws_dynamic_credentials.default.shared_config_file]
}

provider "aws" {
  alias = "ALIAS1"
  shared_config_files = [var.tfc_aws_dynamic_credentials.aliases["ALIAS1"].shared_config_file]
}

Related

See also

Advertising: