Add opentofu encryption
This commit is contained in:
		
							parent
							
								
									424e1db07f
								
							
						
					
					
						commit
						f8bb2d82c9
					
				
					 2 changed files with 19 additions and 0 deletions
				
			
		
							
								
								
									
										15
									
								
								main.tf
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								main.tf
									
										
									
									
									
								
							| 
						 | 
					@ -16,6 +16,21 @@ terraform {
 | 
				
			||||||
    skip_requesting_account_id  = true
 | 
					    skip_requesting_account_id  = true
 | 
				
			||||||
    skip_s3_checksum            = true
 | 
					    skip_s3_checksum            = true
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  encryption {
 | 
				
			||||||
 | 
					    key_provider "pbkdf2" "encryption" {
 | 
				
			||||||
 | 
					      passphrase = var.passphrase
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    method "aes_gcm" "encryption" {
 | 
				
			||||||
 | 
					      keys = key_provider.pbkdf2.encryption
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    state {
 | 
				
			||||||
 | 
					      method = method.aes_gcm.encryption
 | 
				
			||||||
 | 
					      enforced = true
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module "services" {
 | 
					module "services" {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,7 @@
 | 
				
			||||||
 | 
					variable "passphrase" {
 | 
				
			||||||
 | 
					  sensitive = true
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
variable "backend_access_key" {
 | 
					variable "backend_access_key" {
 | 
				
			||||||
  sensitive = true
 | 
					  sensitive = true
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue