Skip to content

Commit fb20012

Browse files
committed
mirror same result from secret_access_key
1 parent 956c9e7 commit fb20012

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

mmv1/products/bigquerydatatransfer/Config.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,13 @@ properties:
228228
The Secret Access Key of the AWS account transferring data from.
229229
sensitive: true
230230
exactly_one_of:
231+
- 'sensitive_params.0.secretAccessKey'
231232
- 'sensitive_params.0.secretAccessKeyWo'
232233
- name: 'secretAccessKeyWo'
233234
type: String
234235
description: |
235236
The Secret Access Key of the AWS account transferring data from.
236237
write_only: true
237238
exactly_one_of:
239+
- 'sensitive_params.0.secretAccessKeyWo'
238240
- 'sensitive_params.0.secretAccessKey'

mmv1/templates/terraform/constants/bigquery_data_transfer.go.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var sensitiveParams = []string{"secret_access_key"}
2+
var sensitiveWoParams = []string{"secret_access_key_wo"}
23

34
func sensitiveParamCustomizeDiff(_ context.Context, diff *schema.ResourceDiff, v interface{}) error {
45
for _, sp := range sensitiveParams {

mmv1/templates/terraform/encoders/bigquery_data_transfer.go.tmpl

+7
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ for _, sp := range sensitiveParams {
4040
}
4141
}
4242

43+
for _, sp := range sensitiveWoParams {
44+
if auth, _ := d.GetRawConfigAt(cty.GetAttrPath("sensitive_params").IndexInt(0).GetAttr(sp)); !auth.IsNull() {
45+
sp = sp[:len(sp)-3] // removes _wo from the end of the param name
46+
params[sp] = auth.AsString()
47+
}
48+
}
49+
4350
obj["params"] = params
4451

4552
return obj, nil

0 commit comments

Comments
 (0)