Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Remove most production resources #2378

Merged
merged 3 commits into from Mar 9, 2023
Merged

Conversation

nanotubing
Copy link
Contributor

@nanotubing nanotubing commented Mar 3, 2023

Overview

we're updating the terraform to remove all resources from the OAR production environment, except for cloudfront and its related DNS and certificate resources.

Connects #2376

Demo

attached is the output from running scripts/infra plan in this branch
2376_plan_output.txt

Notes

Testing Instructions

  • Run a scripts/infra plan in this branch and review the output to verify that nothing necessary is being removed

Checklist

  • fixup! commits have been squashed
  • CI passes after rebase
  • CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines
  • This PR is targeted at the correct branch (develop vs. ogr/develop)
  • If this PR applies to both OAR and OGR a companion PR has been created

we're updating the terraform to remove all resources from the OAR
production environment, except for cloudfront and its related
DNS and certificate resources.

The infra stage of the Jenkinsfile has been removed. Because the
staging environment no longer exists, if this hadn't been done,
merging a PR into the development branch would recreate staging
resources, which is not what we want.
@nanotubing nanotubing force-pushed the feature/cs/remove_oar_resources branch from f116da5 to a3b5795 Compare March 6, 2023 19:36
@nanotubing
Copy link
Contributor Author

I updated my commit, which is now also removing the infra stage from the Jenkinsfile to avoid re-creating resources in the staging environment.

It is not expected that the output of scripts/infra plan would have changed based on this update, but the current plan output is attached anyway.

2376_plan_output_b.txt

Copy link
Contributor

@jwalgran jwalgran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to run plan against production successfully. This looks correct. There are two resources that look like we may also be able to remove.

  • The SNS topic in alarms.tf. I do not think there are any resources remaining that publish to this topic.
  • The "internal" hosted zone in dns.tf When I search in the terraform directory I do not see any remaining references to internal
  • The VPC in networking.tf. Since our remaining resources are not within the VPC it looks like we may be able to remove this as well.

The VPC, the SNS topic, and the internal hosted zone are all being
removed, since the resources remaining should not rely on these
@nanotubing
Copy link
Contributor Author

I was able to run plan against production successfully. This looks correct. There are two resources that look like we may also be able to remove.

I pushed another commit that removes these resources. I did not get any errors in the plan output, and everything seems correct to my eyes
2376_plan_output_c.txt

@jwalgran jwalgran removed their assignment Mar 7, 2023
@nanotubing
Copy link
Contributor Author

This terraform changeset has been applied, and the OAR production environment is gone.

@nanotubing nanotubing merged commit 1817407 into develop Mar 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants