Update deploying-fleet-on-aws-with-terraform.md (#8748)

Changed some wording under "Deployments" to remove confusion, and
updated instructions for "Prepare the database" to better reflect the
previous outputs from the terraform apply.

Co-authored-by: Katheryn Satterlee <me@ksatter.com>
This commit is contained in:
creedjax 2023-01-06 15:40:24 -06:00 committed by GitHub
parent 656e5bfc70
commit b204647c49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ in order to create the database from a previous snapshot.
## Deployment
Next, well update the terraform setup in the `/aws` directory's [main.tf](https://github.com/fleetdm/fleet/tree/main/infrastructure/dogfood/terraform/aws/main.tf) to use the S3 Bucket and DynamoDB created above:
Next, well update the terraform setup in the `/aws` directory's [main.tf](https://github.com/fleetdm/fleet/tree/main/infrastructure/dogfood/terraform/aws/main.tf) to use the S3 Bucket and DynamoDB referenced above:
```
terraform {
@ -178,10 +178,10 @@ We'll need some of these values in the next step.
Now all we need to do is prepare the database for use. We'll run an AWS ECS Task that will migrate the database and prepare it for use.
```
aws ecs run-task --cluster fleet-backend --task-definition fleet-migrate:<latest_migration_version> --launch-type FARGATE --network-configuration "awsvpcConfiguration={subnets=[<private_subnet_id>],securityGroups=[<desired_security_group>]}"
aws ecs run-task --cluster <ecs_cluster_name> --task-definition fleet-migrate:<fleet-migration-task-revision> --launch-type FARGATE --network-configuration "awsvpcConfiguration={subnets=[<private_subnet_id>],securityGroups=[<backend_security_group_id>]}"
```
Where `<migration_version>` is `fleet-migration-task-revision`, `<private_subnet_id>` is one of the private subnets, and `<desired_security_group>` is the security group from the previous output.
Replace `<backend_security_group_id>`, `<ecs_cluster_name>`, and `<fleet-migration-task-revision>` with the corresponding values from the previous output. Replace `<private_subnet_id>` with one of the private subnets from the previous output.
For the example output from `terraform apply` in the previous step, the command would look like this: