You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: "A reference to a Secret Manager secret.",
98
+
Elem: &schema.Resource{
99
+
Schema: map[string]*schema.Schema{
100
+
"secret_id": {
101
+
Type: schema.TypeString,
102
+
Description: "The secret UUID.",
103
+
Required: true,
104
+
ValidateFunc: validation.IsUUID,
105
+
},
106
+
"secret_reference_id": {
107
+
Type: schema.TypeString,
108
+
Computed: true,
109
+
Description: "The secret reference UUID",
110
+
},
111
+
"secret_version": {
112
+
Type: schema.TypeString,
113
+
Description: "The secret version, default to Latest.",
114
+
Required: true,
115
+
},
116
+
"file": {
117
+
Type: schema.TypeString,
118
+
Optional: true,
119
+
Description: "The absolute file path where the secret will be mounted.",
120
+
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^(/[^/]+)+$`), "must be an absolute path to the file"),
121
+
},
122
+
"environment": {
123
+
Type: schema.TypeString,
124
+
Optional: true,
125
+
Description: "An environment variable containing the secret value.",
126
+
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[A-Z]+(_[A-Z]+)*$`), "environment variable must be composed of uppercase letters separated by an underscore"),
127
+
},
128
+
},
129
+
},
130
+
},
93
131
},
94
132
}
95
133
}
@@ -132,6 +170,12 @@ func ResourceJobDefinitionCreate(ctx context.Context, d *schema.ResourceData, m
132
170
returndiag.FromErr(err)
133
171
}
134
172
173
+
ifrawSecretReference, ok:=d.GetOk("secret_reference"); ok {
0 commit comments