{"id":15654997,"url":"https://github.com/iann0036/cfn-remediate-drift","last_synced_at":"2025-05-01T13:13:26.384Z","repository":{"id":69948210,"uuid":"279706752","full_name":"iann0036/cfn-remediate-drift","owner":"iann0036","description":"Automated CloudFormation drift remediation using Import functionality","archived":false,"fork":false,"pushed_at":"2022-02-23T08:47:42.000Z","size":33,"stargazers_count":27,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-01T12:49:43.236Z","etag":null,"topics":["aws","cloudformation","drift-detection"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iann0036.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-14T22:33:25.000Z","updated_at":"2025-04-17T00:52:22.000Z","dependencies_parsed_at":"2023-02-27T09:00:31.578Z","dependency_job_id":null,"html_url":"https://github.com/iann0036/cfn-remediate-drift","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iann0036%2Fcfn-remediate-drift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iann0036%2Fcfn-remediate-drift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iann0036%2Fcfn-remediate-drift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iann0036%2Fcfn-remediate-drift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iann0036","download_url":"https://codeload.github.com/iann0036/cfn-remediate-drift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251879117,"owners_count":21658690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cloudformation","drift-detection"],"created_at":"2024-10-03T12:55:20.854Z","updated_at":"2025-05-01T13:13:26.360Z","avatar_url":"https://github.com/iann0036.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudFormation Remediate Drift\n\n**Update 2022: Check out https://github.com/WeAreCloudar/cfn-drift-remediation for a new, better way to achieve this**\n\nThe following script will programmatically perform the following steps:\n\n* Check for drifted resources\n* Using CloudFormation outputs, extract any references to resources that have drifted and replace the references with the dereferenced values temporarily\n* Remove any *supported* drifted resources from the stack, whilst retaining the resource\n* Import the resources with their current state back into the stack\n* Perform an update on the stack back to its original template, effectively remediating the resources\n\n\u003e :exclamation: This script is not thoroughly tested and you should attempt to use this on a non-critical resource before real-world usage as some resources refuse to re-import for a variety of reasons. I am not responsible for your data loss.\n\n## Usage\n\n```\npython3 index.py MyStackName\n```\n\nor to specify a region\n\n```\npython3 index.py MyStackName us-east-1\n```\n\n### Supported Resources\n\nThe following resources are supported for import operations (other resources will be ignored, even if drift is detected):\n\n* AWS::ACMPCA::Certificate\n* AWS::ACMPCA::CertificateAuthority\n* AWS::ACMPCA::CertificateAuthorityActivation\n* AWS::AccessAnalyzer::Analyzer\n* AWS::ApiGateway::Authorizer\n* AWS::ApiGateway::Deployment\n* AWS::ApiGateway::Method\n* AWS::ApiGateway::Model\n* AWS::ApiGateway::RequestValidator\n* AWS::ApiGateway::Resource\n* AWS::ApiGateway::RestApi\n* AWS::ApiGateway::Stage\n* AWS::Athena::DataCatalog\n* AWS::Athena::NamedQuery\n* AWS::Athena::WorkGroup\n* AWS::AutoScaling::AutoScalingGroup\n* AWS::AutoScaling::LaunchConfiguration\n* AWS::AutoScaling::LifecycleHook\n* AWS::AutoScaling::ScalingPolicy\n* AWS::AutoScaling::ScheduledAction\n* AWS::CE::CostCategory\n* AWS::Cassandra::Keyspace\n* AWS::Cassandra::Table\n* AWS::Chatbot::SlackChannelConfiguration\n* AWS::CloudFormation::Stack\n* AWS::CloudTrail::Trail\n* AWS::CloudWatch::Alarm\n* AWS::CloudWatch::CompositeAlarm\n* AWS::CodeGuruProfiler::ProfilingGroup\n* AWS::CodeStarConnections::Connection\n* AWS::Config::ConformancePack\n* AWS::Config::OrganizationConformancePack\n* AWS::Detective::Graph\n* AWS::Detective::MemberInvitation\n* AWS::DynamoDB::Table\n* AWS::EC2::EIP\n* AWS::EC2::FlowLog\n* AWS::EC2::GatewayRouteTableAssociation\n* AWS::EC2::Instance\n* AWS::EC2::InternetGateway\n* AWS::EC2::LocalGatewayRoute\n* AWS::EC2::LocalGatewayRouteTableVPCAssociation\n* AWS::EC2::NatGateway\n* AWS::EC2::NetworkAcl\n* AWS::EC2::NetworkInterface\n* AWS::EC2::PrefixList\n* AWS::EC2::RouteTable\n* AWS::EC2::SecurityGroup\n* AWS::EC2::Subnet\n* AWS::EC2::VPC\n* AWS::EC2::Volume\n* AWS::ECS::CapacityProvider\n* AWS::ECS::Cluster\n* AWS::ECS::PrimaryTaskSet\n* AWS::ECS::Service\n* AWS::ECS::TaskDefinition\n* AWS::ECS::TaskSet\n* AWS::EFS::AccessPoint\n* AWS::EFS::FileSystem\n* AWS::ElasticLoadBalancing::LoadBalancer\n* AWS::ElasticLoadBalancingV2::Listener\n* AWS::ElasticLoadBalancingV2::ListenerRule\n* AWS::ElasticLoadBalancingV2::LoadBalancer\n* AWS::EventSchemas::RegistryPolicy\n* AWS::Events::Rule\n* AWS::FMS::NotificationChannel\n* AWS::FMS::Policy\n* AWS::GlobalAccelerator::Accelerator\n* AWS::GlobalAccelerator::EndpointGroup\n* AWS::GlobalAccelerator::Listener\n* AWS::ImageBuilder::Component\n* AWS::ImageBuilder::DistributionConfiguration\n* AWS::ImageBuilder::Image\n* AWS::ImageBuilder::ImagePipeline\n* AWS::ImageBuilder::ImageRecipe\n* AWS::ImageBuilder::InfrastructureConfiguration\n* AWS::IoT::ProvisioningTemplate\n* AWS::IoT::Thing\n* AWS::KinesisFirehose::DeliveryStream\n* AWS::Lambda::Alias\n* AWS::Lambda::Function\n* AWS::Lambda::Version\n* AWS::Logs::LogGroup\n* AWS::Logs::MetricFilter\n* AWS::Logs::SubscriptionFilter\n* AWS::Macie::CustomDataIdentifier\n* AWS::Macie::FindingsFilter\n* AWS::Macie::Session\n* AWS::NetworkManager::CustomerGatewayAssociation\n* AWS::NetworkManager::Device\n* AWS::NetworkManager::GlobalNetwork\n* AWS::NetworkManager::Link\n* AWS::NetworkManager::LinkAssociation\n* AWS::NetworkManager::Site\n* AWS::NetworkManager::TransitGatewayRegistration\n* AWS::QLDB::Stream\n* AWS::RDS::DBCluster\n* AWS::RDS::DBInstance\n* AWS::RDS::DBProxy\n* AWS::RDS::DBProxyTargetGroup\n* AWS::ResourceGroups::Group\n* AWS::Route53::HostedZone\n* AWS::S3::AccessPoint\n* AWS::S3::Bucket\n* AWS::SES::ConfigurationSet\n* AWS::SNS::Topic\n* AWS::SQS::Queue\n* AWS::SSM::Association\n* AWS::ServiceCatalog::CloudFormationProvisionedProduct\n* AWS::Synthetics::Canary\n* AWS::WAFv2::IPSet\n* AWS::WAFv2::RegexPatternSet\n* AWS::WAFv2::RuleGroup\n* AWS::WAFv2::WebACL\n* AWS::WAFv2::WebACLAssociation\n* AWS::IAM::Group\n* AWS::IAM::InstanceProfile\n* AWS::IAM::Role\n* AWS::IAM::User\n* AWS::IAM::ManagedPolicy\n\n### Known Issues\n\n* Templates with a high amount of drifted resources may cause an error regarding too many outputs\n* Drifted resources referenced within a `Fn::Sub` string may cause the process to fail\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiann0036%2Fcfn-remediate-drift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiann0036%2Fcfn-remediate-drift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiann0036%2Fcfn-remediate-drift/lists"}