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
Terraform Version:
Terraform v1.5.7
on darwin_arm64
1Password Application:
1Password for Mac 8.10.23 (81023003)
What happened?
When an item is created using Terraform, and a field has a multiline text 1\n2\n3\n4, the behavior differs from doing the same via the UI. Subsequent edits result in data loss (the newlines are removed).
What did you expect to happen?
I'd expect that Items created via Terraform will be identical to equivalent items created using the 1Password application.
Steps to reproduce
Create an item using 1Password
Create a new item Item 1 in a vault, "San Jose," using 1Password with a field that contains the following value. New lines are significant.
```
1
2
3
4
```
It should look something like this:
Create a Terraform module
Create a service token and update the following code snippet. We'll assume you saved it as main.tf in an empty directory
Notice the text that were added is formatted with new lines.
Open Item 2 in 1Password
Note that the text is presented differently than in 1Password. If you copy and paste it, the newlines are still preserved.
Edit Item 2 in 1Password
Note how it seems the formatting is lost. Try to add a new line with the value 5. Notice that you can't (at least with 1Password I'm using). Also adding 5 removes all the newlines that previously existed, impacting formatting, and thus any application that may require strict formatting (for example, licenses, or encoded files)
Edit Item 1 in 1Password
Notice that Item 1 which was created using the 1Password application, preserves the formatting of the text that was edited, and adding a new line with 5 works as expected.
Notes & Logs
Ideally we could attach files to the item, but the Terraform provider doesn't support creating or reading them, so that's not an option. A feature #132 was requested to support it since the underlying APIs support the ability. In the meantime, using fields to store multiline text allows us to get around that problem.
When the items were dumped as JSON (see the Terraform snippet above), the formatting of the two fields look identical. It's unclear whether the defect is in the Terraform provider, 1Password infrastructure, or the 1Password application. However, I can reproduce it within my environment at will.
It's also important to note that typically these kinds of fields have their own lifecycle outside of the item in 1Password. A feature #133 was requested.
The text was updated successfully, but these errors were encountered:
Investigated this, and can say that this is not a provider issue, but something that should be solved on the 1Password side. What happens currently is, that 1Password Client Apps (for MacOS for example) support multiline fields, but Connect or CLI doesn't. I'll raise it within the team to plan the work on that.
Meanwhile, I keep this issue open and let you know what would be the next 1Password Connect and CLI versions that support the multiline fields. As soon as they are released you'll be able to use them with the current provider version to make the provider to support multi lines.
Your environment
Terraform Provider Version:
1.4.0
Connect Server Version:
N/A
CLI Version:
2.24.0
OS:
macOS Sonoma 14.2.1 (23C71)
Terraform Version:
Terraform v1.5.7
on darwin_arm64
1Password Application:
1Password for Mac 8.10.23 (81023003)
What happened?
When an item is created using Terraform, and a field has a multiline text
1\n2\n3\n4
, the behavior differs from doing the same via the UI. Subsequent edits result in data loss (the newlines are removed).What did you expect to happen?
I'd expect that Items created via Terraform will be identical to equivalent items created using the 1Password application.
Steps to reproduce
Create an item using 1Password
Create a new item
Item 1
in a vault, "San Jose," using 1Password with a field that contains the following value. New lines are significant.It should look something like this:
Create a Terraform module
Create a service token and update the following code snippet. We'll assume you saved it as
main.tf
in an empty directoryExecute the following commands:
Open
Item 1
in 1PasswordNotice the text that were added is formatted with new lines.
Open
Item 2
in 1PasswordNote that the text is presented differently than in 1Password. If you copy and paste it, the newlines are still preserved.
Edit
Item 2
in 1PasswordNote how it seems the formatting is lost. Try to add a new line with the value
5
. Notice that you can't (at least with 1Password I'm using). Also adding 5 removes all the newlines that previously existed, impacting formatting, and thus any application that may require strict formatting (for example, licenses, or encoded files)Edit
Item 1
in 1PasswordNotice that
Item 1
which was created using the 1Password application, preserves the formatting of the text that was edited, and adding a new line with 5 works as expected.Notes & Logs
Ideally we could attach files to the item, but the Terraform provider doesn't support creating or reading them, so that's not an option. A feature #132 was requested to support it since the underlying APIs support the ability. In the meantime, using fields to store multiline text allows us to get around that problem.
When the items were dumped as JSON (see the Terraform snippet above), the formatting of the two fields look identical. It's unclear whether the defect is in the Terraform provider, 1Password infrastructure, or the 1Password application. However, I can reproduce it within my environment at will.
It's also important to note that typically these kinds of fields have their own lifecycle outside of the item in 1Password. A feature #133 was requested.
The text was updated successfully, but these errors were encountered: