AWS code-library documentation change
Summary
Added resource tagging throughout VPC creation workflow including subnets, gateways, route tables, security groups, key pairs, and EC2 instances
Security assessment
All modifications are organizational tags for resource management. Security configurations like security group rules, NACLs, or key pair usage remain unchanged. Tags don't impact network security or access controls.
Diff
diff --git a/code-library/latest/ug/ec2_example_vpc_GettingStartedCLI_section.md b/code-library/latest/ug/ec2_example_vpc_GettingStartedCLI_section.md index f4b12aab6..0cfd8fe5e 100644 --- a//code-library/latest/ug/ec2_example_vpc_GettingStartedCLI_section.md +++ b//code-library/latest/ug/ec2_example_vpc_GettingStartedCLI_section.md @@ -155 +155 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - VPC_ID=$(aws ec2 create-vpc --cidr-block 10.0.0.0/16 --tag-specifications 'ResourceType=vpc,Tags=[{Key=Name,Value=MyVPC}]' --query 'Vpc.VpcId' --output text) + VPC_ID=$(aws ec2 create-vpc --cidr-block 10.0.0.0/16 --tag-specifications 'ResourceType=vpc,Tags=[{Key=Name,Value=MyVPC},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' --query 'Vpc.VpcId' --output text) @@ -186 +186 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Public-Subnet-AZ1}]' \ + --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Public-Subnet-AZ1},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \ @@ -202 +202 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Public-Subnet-AZ2}]' \ + --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Public-Subnet-AZ2},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \ @@ -219 +219 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Private-Subnet-AZ1}]' \ + --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Private-Subnet-AZ1},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \ @@ -235 +235 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Private-Subnet-AZ2}]' \ + --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Private-Subnet-AZ2},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \ @@ -249 +249 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - --tag-specifications 'ResourceType=internet-gateway,Tags=[{Key=Name,Value=MyIGW}]' \ + --tag-specifications 'ResourceType=internet-gateway,Tags=[{Key=Name,Value=MyIGW},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \ @@ -268 +268 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - --tag-specifications 'ResourceType=route-table,Tags=[{Key=Name,Value=Public-RT}]' \ + --tag-specifications 'ResourceType=route-table,Tags=[{Key=Name,Value=Public-RT},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \ @@ -306 +306 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - --tag-specifications 'ResourceType=route-table,Tags=[{Key=Name,Value=Private-RT}]' \ + --tag-specifications 'ResourceType=route-table,Tags=[{Key=Name,Value=Private-RT},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \ @@ -338 +338 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - EIP_ALLOC=$(aws ec2 allocate-address --domain vpc --query 'AllocationId' --output text) + EIP_ALLOC=$(aws ec2 allocate-address --domain vpc --tag-specifications 'ResourceType=elastic-ip,Tags=[{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' --query 'AllocationId' --output text) @@ -352 +352 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - --tag-specifications 'ResourceType=natgateway,Tags=[{Key=Name,Value=MyNATGateway}]' \ + --tag-specifications 'ResourceType=natgateway,Tags=[{Key=Name,Value=MyNATGateway},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \ @@ -383,0 +384 @@ There's more on GitHub. Find the complete example and learn how to set up and ru + --tag-specifications 'ResourceType=security-group,Tags=[{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \ @@ -409,0 +411 @@ There's more on GitHub. Find the complete example and learn how to set up and ru + --tag-specifications 'ResourceType=security-group,Tags=[{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \ @@ -468 +470 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - aws ec2 create-key-pair --key-name "$KEY_NAME" --query 'KeyMaterial' --output text > "${KEY_NAME}.pem" || handle_error "Failed to create key pair" + aws ec2 create-key-pair --key-name "$KEY_NAME" --tag-specifications 'ResourceType=key-pair,Tags=[{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' --query 'KeyMaterial' --output text > "${KEY_NAME}.pem" || handle_error "Failed to create key pair" @@ -496 +498 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=WebServer}]' \ + --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=WebServer},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \ @@ -526 +528 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=DBServer}]' \ + --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=DBServer},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \