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

Create Azure storage account and container to store HL7 files for automated testing #1280

Merged
merged 10 commits into from
Sep 4, 2024

Conversation

basiliskus
Copy link
Contributor

@basiliskus basiliskus commented Aug 28, 2024

Create Azure storage account and container to store HL7 files for automated testing

This PR creates an Azure storage account to use for the RS automated integration tests. It creates one container where we'll store the final HL7 files uploaded by RS at the end of the message flow

Issue

#1255

@basiliskus basiliskus changed the title Create Azure storage account with SFTP enabled and a bucket to store files Create Azure storage account and a container to store HL7 files for automated testing Aug 28, 2024
@@ -55,3 +55,45 @@ resource "azurerm_role_assignment" "allow_api_read_write" {
role_definition_name = "Storage Blob Data Contributor"
principal_id = azurerm_linux_web_app.api.identity.0.principal_id
}

resource "azurerm_storage_account" "automated_storage" {
Copy link
Member

Choose a reason for hiding this comment

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

Can you set this storage account with encryption with our customer managed key? You can take inspiration from CDCgov/reportstream-sftp-ingestion#144

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm adding the azurerm_storage_account_customer_managed_key for the new container. Do I also need to add a new azurerm_key_vault_access_policy unique to this new container? Similar to azurerm_key_vault_access_policy.allow_storage_storage_account_wrapping?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just added the changes here: f91a4fa

@basiliskus basiliskus changed the title Create Azure storage account and a container to store HL7 files for automated testing Create Azure storage account and container to store HL7 files for automated testing Sep 3, 2024
Copy link

sonarqubecloud bot commented Sep 4, 2024

Copy link
Member

@halprin halprin left a comment

Choose a reason for hiding this comment

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

This looks right to me!

@basiliskus basiliskus merged commit c3410c4 into main Sep 4, 2024
17 checks passed
@basiliskus basiliskus deleted the story/1255/add-azure-storage-account branch September 4, 2024 16:52
tjohnson7021 pushed a commit that referenced this pull request Oct 17, 2024
…omated testing (#1280)

* Added initial terraform config for sftp storage

* Create buckets for initial and final hl7 files. Disabled SFTP as we may not use it

* Added role assignment. Still need to figure out the principal_id

* Updated principal_id to var.deployer_id

* Added customer managed key for new container

* Commenting code as workaround for order of execution issue with terraform apply

* Uncommenting code to apply changes

---------

Co-authored-by: halprin <[email protected]>
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.

3 participants