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

CM-1047: Terraform updates #1061

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions infrastructure/aws-opensearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OpenSearch is Amazon's community-driven, 100% open-source version of Elastisearc

## Updating DEV

* Connect to the BC Governemtn AWS login application and get your credentials to paste into a terminal
* Connect to the BC Government AWS login application and get your credentials to paste into a terminal
* `cd infrastructure/aws-opensearch/dev`
* `terragrunt apply`
* Update the main-elasticsearch-secret and develop-elasticsearch-secret on DEV and TEST OpenShift environments to ensure that the settings match AWS.
Expand All @@ -20,13 +20,13 @@ OpenSearch is Amazon's community-driven, 100% open-source version of Elastisearc

## Updating PROD

* Connect to the BC Governemtn AWS login application and get your credentials to paste into a terminal
* Connect to the BC Government AWS login application and get your credentials to paste into a terminal
* `cd infrastructure/aws-opensearch/prod`
* `terragrunt apply`
* Update the main-elasticsearch-secret on the PROD OpenShift environments to ensure that the settings match AWS.

## Tearing down an environment

* Connect to the BC Governemtn AWS login application and get your credentials to paste into a terminal
* Connect to the BC Government AWS login application and get your credentials to paste into a terminal
* `cd infrastructure/aws-opensearch/<ENVIRONMENT>`
* `terragrunt destroy` should work, but you might need to use `terragrunt run-all destroy`
6 changes: 6 additions & 0 deletions infrastructure/aws-opensearch/setup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Setting up terraform S3 state

- Log into your terminal with the correct environment creds
- Run `terraform init`
- Run `terraform apply`
- Delete all the extra files and folders that were created
4 changes: 4 additions & 0 deletions infrastructure/aws-opensearch/setup/tfstate.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
variable "environment" {
description = "AWS workload account env (e.g. dev, test, prod, tools)"
}

resource "aws_s3_bucket" "terraform_state" {
bucket = "bcparks-opensearch-${var.environment}-terraform-remote-state"
force_destroy = true
Expand Down