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

Add support for env variables for box and reasource_box PHR-12343 #66

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

ratkayandras
Copy link
Contributor

Jira ticket

Support environment variables in aidbox provider

This work is needed so we can create aidbox boxes in our multibox deployment with various enviromnet variables set on the box level. WIth this we should be able to bring up boxes with additional features (e.g.: support for aidbox forms)

What to look for

In box.go I added

Env map[string]string `json:"env,omitempty"`

The reason for this beaing a map is that I conformed to the aidbox api for creating boxes.

in resource_box.go I map between []string and map[string]string because on the terraform side we set the enfironment variables as a list string:

resource "aidbox_box" "my_box" {
  id           = "my-box"
  fhir_version = "fhir-3.0.1"
  description  = "A box instance within multibox, a multi-tenant aidbox server"
  env = [
    "ENV1=foo",
    "ENV2=bar"
  ]
}

Setting the evironment variables is optional so every existing test passed and I added a new test which tests if the variables are properly set.

@ratkayandras ratkayandras added team/PHRA CQS PRs related to Complex Questionnaires Service labels Mar 21, 2023
@ratkayandras ratkayandras temporarily deployed to acceptance tests March 21, 2023 14:11 — with GitHub Actions Inactive
@ratkayandras ratkayandras temporarily deployed to acceptance tests March 21, 2023 14:11 — with GitHub Actions Inactive
Copy link
Contributor

@MFAshby MFAshby left a comment

Choose a reason for hiding this comment

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

LGTM

@MFAshby MFAshby merged commit 3d4c8e4 into main Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CQS PRs related to Complex Questionnaires Service team/PHRA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants