Skip to content

Commit

Permalink
Work around make deploy failing after manually deleting ES domain (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes-ucsc committed Sep 4, 2020
2 parents fcdf1f2 + df5120f commit 1beb517
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,8 @@ process.

# 5. Troubleshooting

`make deploy` complains

## `NoSuchBucket` during `make deploy`

```
Initializing the backend...
Expand All @@ -632,8 +633,33 @@ Error inspecting states in the "s3" backend:
`deployments/.active/.terraform/terraform.tfstate` refers to the correct bucket,
the one configured in `AZUL_VERSIONED_BUCKET`. If it doesn't, you may
have to remove that file or modify it to fix the bucket name.
##
If you get the following exception in the indexer lambda:


## `Error: Invalid index` during `make deploy`

```
aws_route53_record.service_0: Refreshing state... [id=XXXXXXXXXXXXX_service.dev.singlecell.gi.ucsc.edu_A]
Error: Invalid index
on modules.tf.json line 8, in module.chalice_indexer.es_endpoint:
8: "${aws_elasticsearch_domain.elasticsearch[0].endpoint}",
|----------------
| aws_elasticsearch_domain.elasticsearch is empty tuple
The given key does not identify an element in this collection value.
```

This may be an [issue](https://github.com/hashicorp/terraform/issues/25784) with
Terraform. To work around this, run …

```
terraform state rm aws_elasticsearch_domain.elasticsearch
```

… to update the Terraform state so that it reflects the deletion of the
Elasticsearch domain. Now running `make deploy` should succeed.

## `AccessDeniedException` in indexer lambda

If you get the following exception:
```
An error occurred (AccessDeniedException) when calling the GetParameter operation: User: arn:aws:sts::{account_id}:assumed-role/azul-indexer-{deployment_stage}/azul-indexer-{deployment_stage}-index is not authorized to perform: ssm:GetParameter on resource: arn:aws:ssm:{aws_region}:{account_id}:parameter/dcp/dss/{deployment_stage}/environment: ClientError
Traceback (most recent call last):
Expand All @@ -645,6 +671,7 @@ Check whether the DSS switched buckets. If so, the lambda policy may need to be
updated to reflect that change. To fix this, redeploy the lambdas (`make
package`) in the affected deployment.


# 6. Branch flow & development process

**This section should be considered a draft. It describes a future extension to the current branching flow.**
Expand Down

0 comments on commit 1beb517

Please sign in to comment.