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
Currently, when creating a value in a custom field, line breaks get turned into spaces, although 1Password does support having values spanning several lines with text field type.
Use cases
Basically, I'd like to do something along the lines of :
When attempting to manually edit the resulting entry, I can't transform it into a multi-line string.
However, if I add a new field of type "text", I can enter multi-line values :
This leads me to believe that the underlying 1Password data model has two types of strings, one allowing multi-line values, the other not.
If that's the case, however, this is not exposed to terraform, as importing the entry after this manual addition yields this state :
resource "onepassword_item" "example" {
[...]
section {
id = "6d78330e-cf14-a8ab-44d7-d8d2e244e91e"
label = "Custom section"
field {
id = "iv33n3zfkfcnhrydqvnfruf3jm"
label = "multi-line string"
purpose = null
type = "STRING"
value = (sensitive value)
}
field {
id = "h3ehk63snul76a6raioe637w4a"
label = "manual text"
purpose = null
type = "STRING"
value = (sensitive value)
}
}
}
As you can see, terraform doesn't see the type difference between those two values.
Also, attempting to enter anything else as type (for example, TEXT), yields the following error : Error: expected section.0.field.5.type to be one of [STRING EMAIL CONCEALED URL OTP DATE MONTH_YEAR MENU], got TEXT
I haven't attempted to manipulate those entries directly from the 1Password CLI, to see if the problem is exclusively in the terraform provider, or in the underlying CLI.
Proposed solution
I'm assuming that those two strings are indeed different types in the 1Password data model, if that's not the case, those suggestions break apart :
(ideal) : Expose both types to the CLI and terraform provider
Make terraform switch its STRING type to using the underlying type allowing multi-line strings.
Is there a workaround to accomplish this today?
Not that I know of. It's still possible to create entries with multi-line strings, the line breaks will just get mangled.
Summary
Currently, when creating a value in a custom field, line breaks get turned into spaces, although 1Password does support having values spanning several lines with
text
field type.Use cases
Basically, I'd like to do something along the lines of :
This results in the following entry :
When attempting to manually edit the resulting entry, I can't transform it into a multi-line string.
However, if I add a new field of type "text", I can enter multi-line values :
This leads me to believe that the underlying 1Password data model has two types of strings, one allowing multi-line values, the other not.
If that's the case, however, this is not exposed to terraform, as importing the entry after this manual addition yields this state :
As you can see, terraform doesn't see the type difference between those two values.
Also, attempting to enter anything else as type (for example,
TEXT
), yields the following error :Error: expected section.0.field.5.type to be one of [STRING EMAIL CONCEALED URL OTP DATE MONTH_YEAR MENU], got TEXT
I haven't attempted to manipulate those entries directly from the 1Password CLI, to see if the problem is exclusively in the terraform provider, or in the underlying CLI.
Proposed solution
I'm assuming that those two strings are indeed different types in the 1Password data model, if that's not the case, those suggestions break apart :
STRING
type to using the underlying type allowing multi-line strings.Is there a workaround to accomplish this today?
Not that I know of. It's still possible to create entries with multi-line strings, the line breaks will just get mangled.
References & Prior Work
The text was updated successfully, but these errors were encountered: