Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: swap instances over #236

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Conversation

alexander-jackson
Copy link
Owner

The current instance seemed to have degraded performance (significantly, considering it was unable to respond to requests entirely at times) despite the fact the CPU performance seemed alright and the database queries were running in sub-millisecond response times.

This has been failed over locally (due to lack of desire to make multiple PRs), so this will be a no-op.

This change:

  • Swaps over to a new instance

The current instance seemed to have degraded performance (significantly,
considering it was unable to respond to requests entirely at times)
despite the fact the CPU performance seemed alright and the database
queries were running in sub-millisecond response times.

This has been failed over locally (due to lack of desire to make
multiple PRs), so this will be a no-op.

This change:
* Swaps over to a new instance
Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Terraform Validation 🤖success

Show Plan

terraform
Running plan in HCP Terraform. Output will stream here. Pressing Ctrl-C
will stop streaming the logs, but will not stop the plan running remotely.

Preparing the remote plan...

To view this run in a browser, visit:
https://app.terraform.io/app/blackboards/infrastructure/runs/run-dSsPgeZnyakVKm6B

Waiting for the plan to start...

Terraform v1.5.7
on linux_amd64
Initializing plugins and modules...
module.bucket.random_id.this: Refreshing state... [id=csAJ]
module.postgres_backups_bucket.random_id.this: Refreshing state... [id=Ze9c]
module.logging_bucket.random_id.this: Refreshing state... [id=SssY]
module.config_bucket.random_id.this: Refreshing state... [id=aPbH]
module.remote_state_bucket.random_id.this: Refreshing state... [id=WvCN]
aws_iam_policy.iac_deployer: Refreshing state... [id=arn:aws:iam::558855412466:policy/iac-deployer-policy]
module.database.data.aws_iam_policy_document.ec2_assume_role: Refreshing...
module.secondary.data.aws_iam_policy_document.ec2_assume_role: Refreshing...
aws_vpc.main: Refreshing state... [id=vpc-0d1ab7c53aec22955]
module.database.aws_iam_policy.this: Refreshing state... [id=arn:aws:iam::558855412466:policy/database-policy]
module.bucket.aws_s3_bucket.this: Refreshing state... [id=uptime-72c009]
aws_sns_topic.notifications: Refreshing state... [id=arn:aws:sns:eu-west-1:558855412466:ticket-tracker-notifications]
module.postgres_backups_bucket.aws_s3_bucket.this: Refreshing state... [id=postgres-backups-65ef5c]
data.aws_iam_policy_document.uptime_trigger_assume_role: Refreshing...
module.secondary.data.aws_iam_policy_document.ec2_assume_role: Refresh complete after 0s [id=2851119427]
aws_iam_user.image_builder: Refreshing state... [id=image.builder]
module.database.data.aws_iam_policy_document.ec2_assume_role: Refresh complete after 0s [id=2851119427]
aws_route53_zone.opentracker: Refreshing state... [id=Z03017682LQ8TW5YUFGE0]
data.aws_iam_policy_document.uptime_trigger_assume_role: Refresh complete after 0s [id=52247394]
aws_iam_user.configuration_deployer: Refreshing state... [id=configuration.deployer]
module.logging_bucket.aws_s3_bucket.this: Refreshing state... [id=logging-4acb18]
module.repositories["ticket-tracker"].aws_ecr_repository.this: Refreshing state... [id=ticket-tracker]
aws_iam_user.this: Refreshing state... [id=ticket-tracker]
aws_iam_role.iac_deployer: Refreshing state... [id=iac-deployer]
aws_sns_topic.outages: Refreshing state... [id=arn:aws:sns:eu-west-1:558855412466:outages]
aws_iam_user.postgres_backups: Refreshing state... [id=postgres.backups]
module.repositories["ticket-tracker"].aws_iam_user.builder: Refreshing state... [id=ticket-tracker-builder]
module.config_bucket.aws_s3_bucket.this: Refreshing state... [id=configuration-68f6c7]
module.remote_state_bucket.aws_s3_bucket.this: Refreshing state... [id=terraform-remote-state-5af08d]
aws_ecr_repository.uptime: Refreshing state... [id=uptime]
module.personal.aws_iam_user.this: Refreshing state... [id=alex.jackson]
aws_iam_user.github_actions: Refreshing state... [id=github.actions]
aws_key_pair.main: Refreshing state... [id=macbook-m2-pro]
data.aws_iam_policy_document.assume_role: Refreshing...
data.aws_iam_policy_document.assume_role: Refresh complete after 0s [id=2690255455]
module.secondary.aws_iam_role.this: Refreshing state... [id=secondary-role]
module.database.aws_iam_role.this: Refreshing state... [id=database-role]
aws_iam_role.uptime_trigger: Refreshing state... [id=uptime-trigger]
aws_iam_access_key.image_builder: Refreshing state... [id=AKIAYEHTA3LZI2GLLBWM]
aws_iam_access_key.configuration_deployer: Refreshing state... [id=AKIAYEHTA3LZKXOXWTYC]
aws_iam_access_key.this: Refreshing state... [id=AKIAYEHTA3LZJEQ7KL5O]
module.repositories["ticket-tracker"].aws_iam_access_key.builder: Refreshing state... [id=AKIAYEHTA3LZAHS7ZJVQ]
aws_iam_access_key.postgres_backups: Refreshing state... [id=AKIAYEHTA3LZFDVAEC42]
aws_iam_role_policy_attachment.iac_deployer: Refreshing state... [id=iac-deployer-20230421061924179000000001]
aws_sns_topic_subscription.notifications: Refreshing state... [id=arn:aws:sns:eu-west-1:558855412466:ticket-tracker-notifications:360092e1-a2d6-48be-ab1e-a973d714e068]
aws_iam_user_policy.this: Refreshing state... [id=ticket-tracker:ticket-tracker.policy]
module.personal.aws_iam_user_policy.this: Refreshing state... [id=alex.jackson:alex.jackson.policy]
module.personal.aws_iam_user_login_profile.this: Refreshing state... [id=alex.jackson]
module.personal.aws_iam_access_key.this: Refreshing state... [id=AKIAYEHTA3LZCH5CBE4Y]
aws_sns_topic_subscription.outages: Refreshing state... [id=arn:aws:sns:eu-west-1:558855412466:outages:c15a0919-9e06-484e-bef6-08ab63e662d8]
aws_iam_access_key.github_actions: Refreshing state... [id=AKIAYEHTA3LZK6JIHCYE]
aws_iam_user_policy.github_actions: Refreshing state... [id=github.actions:github.actions.policy]
aws_iam_role.uptime: Refreshing state... [id=uptime]
module.repositories["ticket-tracker"].aws_iam_user_policy.builder: Refreshing state... [id=ticket-tracker-builder:ticket-tracker-builder-policy]
aws_iam_user_policy.image_builder: Refreshing state... [id=image.builder:image.builder.policy]
module.secondary.aws_iam_instance_profile.this: Refreshing state... [id=secondary-instance-profile]
module.database.aws_iam_role_policy_attachment.this: Refreshing state... [id=database-role-20231230120447701700000002]
module.database.aws_iam_instance_profile.this: Refreshing state... [id=database-instance-profile]
module.secondary.aws_iam_policy.this: Refreshing state... [id=arn:aws:iam::558855412466:policy/secondary-policy]
aws_lambda_function.uptime: Refreshing state... [id=uptime]
module.secondary.aws_iam_role_policy_attachment.this: Refreshing state... [id=secondary-role-20240916100724361700000001]
aws_internet_gateway.main: Refreshing state... [id=igw-0aa2c09bec52493fc]
aws_subnet.main: Refreshing state... [id=subnet-07936cc0e5c7d83b1]
aws_route_table.gateway: Refreshing state... [id=rtb-0881a403738fea9c7]
aws_iam_policy.uptime_trigger: Refreshing state... [id=arn:aws:iam::558855412466:policy/uptime-trigger]
aws_scheduler_schedule.uptime: Refreshing state... [id=default/uptime-trigger]
module.bucket.aws_s3_bucket_versioning.this: Refreshing state... [id=uptime-72c009]
aws_iam_policy.uptime: Refreshing state... [id=arn:aws:iam::558855412466:policy/uptime-policy]
aws_iam_role_policy_attachment.uptime_trigger: Refreshing state... [id=uptime-trigger-20240331174144664500000001]
module.postgres_backups_bucket.aws_s3_bucket_versioning.this: Refreshing state... [id=postgres-backups-65ef5c]
aws_iam_user_policy.postgres_backups: Refreshing state... [id=postgres.backups:postgres.backups.policy]
module.logging_bucket.aws_s3_bucket_versioning.this: Refreshing state... [id=logging-4acb18]
aws_iam_role_policy_attachment.uptime: Refreshing state... [id=uptime-20240418192134073500000001]
module.secondary.data.aws_subnet.self: Refreshing...
module.database.aws_security_group.this: Refreshing state... [id=sg-0998f7db6e1ffb7eb]
module.secondary.aws_security_group.this: Refreshing state... [id=sg-0d73768902b6f2281]
module.database.data.aws_subnet.self: Refreshing...
module.database.aws_ebs_volume.this: Refreshing state... [id=vol-0ac43ea68879b3895]
aws_route_table_association.gateway: Refreshing state... [id=rtbassoc-041dbac3ebba9c5ca]
module.secondary.data.aws_subnet.self: Refresh complete after 1s [id=subnet-07936cc0e5c7d83b1]
module.config_bucket.aws_s3_bucket_versioning.this: Refreshing state... [id=configuration-68f6c7]
aws_iam_user_policy.configuration_deployer: Refreshing state... [id=configuration.deployer:configuration.deployer.policy]
module.remote_state_bucket.aws_s3_bucket_versioning.this: Refreshing state... [id=terraform-remote-state-5af08d]
module.database.aws_security_group_rule.allow_inbound_postgres: Refreshing state... [id=sgrule-3465932672]
module.database.aws_security_group_rule.allow_outbound_https: Refreshing state... [id=sgrule-1306823711]
module.database.data.aws_subnet.self: Refresh complete after 1s [id=subnet-07936cc0e5c7d83b1]
module.database.aws_security_group_rule.allow_outbound_http: Refreshing state... [id=sgrule-1983782041]
module.database.aws_security_group_rule.allow_inbound_ssh: Refreshing state... [id=sgrule-3173870365]
module.secondary.aws_security_group_rule.allow_outbound_http: Refreshing state... [id=sgrule-1989388876]
module.secondary.aws_security_group_rule.allow_outbound_subnet_postgres: Refreshing state... [id=sgrule-4233560608]
module.secondary.aws_instance.this: Refreshing state... [id=i-0409fc716bb65035c]
module.secondary.aws_security_group_rule.allow_inbound_https: Refreshing state... [id=sgrule-2667441053]
module.secondary.aws_security_group_rule.allow_outbound_postgres: Refreshing state... [id=sgrule-4077209761]
module.secondary.aws_security_group_rule.allow_outbound_https: Refreshing state... [id=sgrule-2477370193]
module.secondary.aws_security_group_rule.allow_outbound_ssh: Refreshing state... [id=sgrule-2598576755]
module.secondary.aws_security_group_rule.allow_inbound_ssh: Refreshing state... [id=sgrule-1268048112]
aws_security_group_rule.allow_inbound_connections_from_secondary: Refreshing state... [id=sgrule-2106226736]
module.database.aws_instance.this: Refreshing state... [id=i-0e48bcc2a0d16252e]
module.secondary.aws_eip.this: Refreshing state... [id=eipalloc-0d011a8ed5db76f26]
aws_route53_record.opentracker_today: Refreshing state... [id=Z03017682LQ8TW5YUFGE0_today_A]
aws_route53_record.opentracker_tags: Refreshing state... [id=Z03017682LQ8TW5YUFGE0_tags_A]
aws_route53_record.opentracker: Refreshing state... [id=Z03017682LQ8TW5YUFGE0__A]
module.database.aws_volume_attachment.this: Refreshing state... [id=vai-3516952077]
module.database.aws_security_group.this: Drift detected (update)

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

@alexander-jackson alexander-jackson merged commit f158a4f into master Sep 16, 2024
1 check passed
@alexander-jackson alexander-jackson deleted the feat/swap-instances-over branch September 16, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant