Skip to content

Commit 6ba2e34

Browse files
authored
Merge pull request #157 from patientsknowbest/feature/PHR-16180-structure-definiton-override-2
Hide StructureDefinition from tf output PHR-16180
2 parents 5512df6 + 2cecc3a commit 6ba2e34

File tree

6 files changed

+42
-38
lines changed

6 files changed

+42
-38
lines changed

docs/resources/gcp_service_account.md

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,28 @@ description: |-
77
---
88

99
# aidbox_gcp_service_account (Resource)
10-
The `GcpServiceAccount` resource is a proprietary, custom resource used by Aidbox. It stores the email address of a Google Cloud Platform service account, allowing Aidbox to impersonate that account using workload identity.
1110

12-
This resource is most commonly referenced by other resources, such as `aidbox_sdc_config`, to grant Aidbox access to GCP services like Google Cloud Storage buckets.
11+
Aidbox GcpServiceAccount is a proprietary custom resource used to store Google Cloud Platform service account credentials for workload identity.
1312

1413
## Example Usage
1514

16-
### Basic Example
17-
1815
```terraform
19-
resource "aidbox_gcp_service_account" "sa_account" {
20-
name = "aidbox-sa"
16+
resource "aidbox_gcp_service_account" "default_gcp_account" {
17+
name = "aidbox-rc"
2118
service_account_email = "sa-email@my-project.iam.gserviceaccount.com"
22-
private_key = "-----BEGIN PRIVATE KEY-----....-----END PRIVATE KEY-----""
19+
private_key = "private-key"
2320
}
2421
```
2522

26-
### Usage with SDCConfig
27-
28-
```terraform
29-
resource "aidbox_gcp_service_account" "sa_account" {
30-
name = "aidbox-sa"
31-
service_account_email = "sa-email@my-project.iam.gserviceaccount.com"
32-
private_key = "-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----""
33-
}
34-
35-
resource "aidbox_sdc_config" "default_storage_config" {
36-
name = "forms-storage"
37-
default = true
38-
39-
storage {
40-
bucket = "attachment-store-test"
41-
account {
42-
id = aidbox_gcp_service_account.sa_account.id,
43-
resourceType = "GcpServiceAccount"
44-
}
45-
}
46-
}
47-
```
48-
## Schema
23+
<!-- schema generated by tfplugindocs -->
24+
## Schema
4925

5026
### Required
51-
- `name` (String) Computer friendly name of the resource
27+
28+
- `name` (String) Computer friendly name of the GCP Service Account. This must be unique as it is used as the resource's identifier.
29+
- `private_key` (String, Sensitive) The private key of the GCP service account.
5230
- `service_account_email` (String) The email address of the GCP service account.
53-
- `private_key` (String) Private key of the GCP service account.
5431

5532
### Read-Only
56-
- `id` (String) The ID of this resource.
5733

34+
- `id` (String) The ID of this resource.

docs/resources/sdc_config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ resource "aidbox_sdc_config" "default_storage_config" {
2020
storage {
2121
bucket = "attachment-store-rc"
2222
account {
23-
id = "aidbox-rc"
23+
id = "aidbox-rc"
2424
resourceType = "GcpServiceAccount"
2525
}
26-
}
26+
}
2727
}
2828
```
2929

docs/resources/structure_definition.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
page_title: "aidbox_structure_definition Resource - terraform-provider-aidbox"
44
subcategory: ""
55
description: |-
6-
FHIR R4 SearchParameter https://hl7.org/fhir/R4/searchparameter.html
6+
FHIR R4 StructureDefinition https://hl7.org/fhir/R4/structuredefinition.html Provides limited support to specify custom StructureDefinitions, that express customized rules extending the core FHIR spec, and get evaluated only if the caller specifies the SD's url in the request's meta.profile
77
---
88

99
# aidbox_structure_definition (Resource)
1010

11-
FHIR R4 SearchParameter https://hl7.org/fhir/R4/searchparameter.html
11+
FHIR R4 StructureDefinition https://hl7.org/fhir/R4/structuredefinition.html Provides limited support to specify custom StructureDefinitions, that express customized rules extending the core FHIR spec, and get evaluated only if the caller specifies the SD's url in the request's meta.profile
1212

1313
## Example Usage
1414

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "aidbox_structure_definition_override Resource - terraform-provider-aidbox"
4+
subcategory: ""
5+
description: |-
6+
A specialization of StructureDefinition which allows you to override the default version of StructureDefinitions that are specified inside the core FHIR IG used on the server. This means default rules of resources can be changed without having the client specify a meta.profile in their request.
7+
---
8+
9+
# aidbox_structure_definition_override (Resource)
10+
11+
A specialization of StructureDefinition which allows you to override the default version of StructureDefinitions that are specified inside the core FHIR IG used on the server. This means default rules of resources can be changed without having the client specify a meta.profile in their request.
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `structure_definition_override` (String, Sensitive) A customized StructureDefinition, based on the original one from the core FHIR spec
21+
- `url` (String) Canonical URL that's unique to this StructureDefinition
22+
23+
### Read-Only
24+
25+
- `id` (String) The ID of this resource.
26+
- `original_structure_definition` (String, Sensitive) Backup of the original StructureDefinition, which will be restored upon deleting the override

examples/resources/aidbox_sdc_config/resource.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ resource "aidbox_sdc_config" "default_storage_config" {
55
storage {
66
bucket = "attachment-store-rc"
77
account {
8-
id = "aidbox-rc"
8+
id = "aidbox-rc"
99
resourceType = "GcpServiceAccount"
1010
}
1111
}

internal/provider/resource_structure_definition_override.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func resourceSchemaStructureDefinitionOverride() map[string]*schema.Schema {
4040
Description: "A customized StructureDefinition, based on the original one from the core FHIR spec",
4141
Type: schema.TypeString,
4242
Required: true,
43+
Sensitive: true,
4344
DiffSuppressOnRefresh: true,
4445
DiffSuppressFunc: jsonDiffSuppressFunc,
4546
},

0 commit comments

Comments
 (0)