mirror of
				https://github.com/kubernetes-sigs/external-dns.git
				synced 2025-10-27 00:31:09 +01:00 
			
		
		
		
	Apply suggestions from code review
Co-authored-by: Nick Jüttner <nick@juni.io>
This commit is contained in:
		
							parent
							
								
									03a28eea6e
								
							
						
					
					
						commit
						ce38a40e2b
					
				| @ -199,12 +199,13 @@ func NewAWSProvider(awsConfig AWSConfig) (*AWSProvider, error) { | ||||
| 	} | ||||
| 
 | ||||
| 	if awsConfig.AssumeRole != "" { | ||||
| 		log.Infof("Assuming role: %s", awsConfig.AssumeRole) | ||||
| 		if awsConfig.AssumeRole != "" { | ||||
| 		if awsConfig.AssumeRoleExternalID != "" { | ||||
| 			log.Infof("Assuming role: %s with external id %s", awsConfig.AssumeRole, awsConfig.AssumeRoleExternalID) | ||||
| 			session.Config.WithCredentials(stscreds.NewCredentials(session, awsConfig.AssumeRole, func(p *stscreds.AssumeRoleProvider) { | ||||
| 				p.ExternalID = &awsConfig.AssumeRoleExternalID | ||||
| 			})) | ||||
| 		} else { | ||||
|                         log.Infof("Assuming role: %s", awsConfig.AssumeRole) | ||||
| 			session.Config.WithCredentials(stscreds.NewCredentials(session, awsConfig.AssumeRole)) | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user