You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/well-architected-framework/docs/docs/define-and-automate-processes/automate/cicd.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,6 @@ In this section of Automate your workflows, you learned how to implement CI/CD p
31
31
32
32
Visit the following documents to learn more about the automation workflow:
33
33
34
-
-[Automate testing](/well-architected-framework/define-and-automate-processes/automate/testing)- Implement automated testing in your CI/CD pipeline
35
-
-[Automate deployments](/well-architected-framework/define-and-automate-processes/automate/deployments) - Deploy applications through your CI/CD pipeline
36
-
-[Running Terraform in automation](/terraform/tutorials/automation/automate-terraform)
34
+
-[Automate testing](/well-architected-framework/define-and-automate-processes/automate/testing) in your CI/CD pipelines
35
+
-[Automate application deployments](/well-architected-framework/define-and-automate-processes/automate/deployments through your CI/CD pipeline
36
+
-Learn how to orchestrate [Terraform runs](/terraform/tutorials/automation/automate-terraform) to ensure consistency between runs.
Copy file name to clipboardExpand all lines: content/well-architected-framework/docs/docs/optimize-systems/lifecycle-management/decommission-infrastructure.mdx
+40-16Lines changed: 40 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,20 +15,6 @@ When you decommission unused resources, you gain the following benefits:
15
15
16
16
To successfully decommission resources, you need to create a well-defined plan that includes dependency analysis, stakeholder communication, and a gradual removal process. Depending on how your infrastructure implementation is done, either manually or automatically, you may need to adjust your decommissioning approach.
17
17
18
-
## Find resources to decommission
19
-
20
-
Before you begin decommissioning resources, you need to identify which resources exist in your environment and determine which ones are candidates for removal. This discovery phase helps you avoid accidentally removing resources that are still in use and ensures you target the right components for decommissioning.
21
-
22
-
Start by creating an inventory of your infrastructure. Most cloud providers offer resource tagging and billing reports that help identify unused or underutilized resources. Pay particular attention to active resources created for temporary purposes, like testing or proof-of-concepts.
23
-
24
-
Terraform tracks all infrastructure it manages with state files. You can use the `terraform state list` to see all managed resources and `terraform show` to examine their current configurations. This list of resources will help you identify which resources are still in use and which ones you can decommission.
25
-
26
-
## Create a communication plan
27
-
28
-
Your plan should outline how you will inform stakeholders about the decommissioning process, including timelines and potential impacts. Effective communication prevents surprises and ensures all affected teams can prepare for the changes.
29
-
30
-
Start by identifying all stakeholders who might be affected by the decommissioning, including development teams, operations staff, end users, and business owners. Create a notification timeline that provides adequate warning. Your communications should explain what resources you are removing, when the decommissioning will occur, and what actions stakeholders need to take.
31
-
32
18
## Create a dependency plan
33
19
34
20
Your plan should analyze which services, applications, or other resources rely on the components you plan to remove. Your plan will lower the risk of unexpected outages by identifying and addressing dependencies before decommissioning.
@@ -49,7 +35,24 @@ You need to install Graphviz on your system to use the `terraform graph` command
Before you begin decommissioning resources, you need to identify which resources exist in your environment and determine which ones are candidates for removal. This discovery phase helps you avoid accidentally removing resources that are still in use and ensures you target the right components for decommissioning.
43
+
44
+
Start by creating an inventory of your infrastructure. Most cloud providers offer resource tagging and billing reports that help identify unused or underutilized resources. Pay particular attention to active resources created for temporary purposes, like testing or proof-of-concepts.
45
+
46
+
Terraform tracks all infrastructure it manages with state files. You can use the `terraform state list` to see all managed resources and `terraform show` to examine their current configurations. This list of resources will help you identify which resources are still in use and which ones you can decommission.
47
+
48
+
If you're using HCP Terraform, you can use the [workspace explorer](/terraform/cloud-docs/workspaces/explorer) feature to gain visibility into the resources your organization manages with Terraform. The explorer provides a visual representation of your infrastructure, making it easier to identify resources that you no longer need.
49
+
50
+
51
+
## Create a communication plan
52
+
53
+
Your plan should outline how you will inform stakeholders about the decommissioning process, including timelines and potential impacts. Effective communication prevents surprises and ensures all affected teams can prepare for the changes.
54
+
55
+
Start by identifying all stakeholders who might be affected by the decommissioning, including development teams, operations staff, end users, and business owners. Create a notification timeline that provides adequate warning. Your communications should explain what resources you are removing, when the decommissioning will occur, and what actions stakeholders need to take.
You can also use Terraform to create [AWS EBS snapshots](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ebs_snapshot) before decommissioning instances. The following example creates an EBS snapshot of the root volume of an EC2 instance:
79
+
80
+
```hcl
81
+
resource "aws_ebs_volume" "example" {
82
+
availability_zone = "us-west-2a"
83
+
size = 40
84
+
85
+
tags = {
86
+
Name = "HelloWorld"
87
+
}
88
+
}
89
+
90
+
resource "aws_ebs_snapshot" "example_snapshot" {
91
+
volume_id = aws_ebs_volume.example.id
92
+
93
+
tags = {
94
+
Name = "HelloWorld_snap"
95
+
}
96
+
}
97
+
```
98
+
75
99
## Gradually remove resources
76
100
77
101
Implement a phased approach to removing resources instead of doing it all at once. Start by redirecting traffic away from the resource, and monitor user traffic to ensure you don't negatively impact users.
0 commit comments