@@ -0,0 +1,2412 @@
+from pentagon import migration%0Afrom pentagon.migration import *%0Afrom pentagon.component import core, inventory%0Afrom pentagon.helpers import merge_dict%0A%0Aimport re%0A%0A%0Aclass Migration(migration.Migration):%0A    _starting_version = '2.5.0'%0A    _ending_version = '2.6.0'%0A%0A    def run(self):%0A        for item in self.inventory:%0A            inventory_path = %22inventory/%7B%7D%22.format(item)%0A            logging.debug(%0A                'Processing Inventory Item: %7B%7D'%0A                .format(inventory_path)%0A            )%0A%0A            # Update version of VPC TF module%0A            aws_vpc_file = %22%7B%7D/terraform/aws_vpc.tf%22.format(inventory_path)%0A            if os.path.exists(aws_vpc_file):%0A                aws_vpc_file_content = self.get_file_content(aws_vpc_file)%0A                aws_vpc_file_content = re.sub(r'terraform-vpc.git%5C?ref=v%5Cd+%5C.%5Cd+.%5Cd+', 'terraform-vpc.git?ref=v3.0.0', aws_vpc_file_content)%0A                aws_vpc_file_content = re.sub(r'%5Cn%5Cs*aws_secret_key%5Cs+=.+', '', aws_vpc_file_content)%0A                aws_vpc_file_content = re.sub(r'%5Cn%5Cs*aws_access_key%5Cs+=.+', '', aws_vpc_file_content)%0A                self.overwrite_file(aws_vpc_file, aws_vpc_file_content)%0A                logging.info('Terraform VPC module updated to 3.0.0 in %7B%7D'.format(item))%0A%0A            # Remove TF AWS provider variables from secrets. No longer referenced directly in VPC module.%0A            secret_file = %22%7B%7D/config/private/secrets.yml%22.format(inventory_path)%0A            if os.path.exists(secret_file):%0A                secrets_file_content = self.get_file_content(secret_file)%0A                original_secrets_content = secrets_file_content%0A                secrets_file_content = re.sub(r'# Terraform.*%5Cn', '', secrets_file_content)%0A                secrets_file_content = re.sub(r'TF_VAR_aws_secret_key:.*%5Cn', '', secrets_file_content)%0A                secrets_file_content = re.sub(r'TF_VAR_aws_access_key:.*%5Cn%5Cn?', '', secrets_file_content)%0A                self.overwrite_file(secret_file, secrets_file_content)%0A                %0A                if original_secrets_content != secrets_file_content:%0A                    logging.warn(%22####### IMPORTANT: Secrets file has been updated #######%22)%0A                    logging.warn(%22  Update changed secrets file in 1Password: %7B%7D%22.format(secret_file))%0A                    logging.warn(%22  Terraform AWS provider variables removed in VPC module update and no longer needed in secrets.%22)%0A

Add migration for VPC module update