Skip to content

Expose custom root-level fields #337

@benjamin-pilgrim

Description

@benjamin-pilgrim

Summary

The 1Password Terraform provider does not expose custom root-level fields (fields not in sections) for
items, even though these fields are accessible via the 1Password CLI and web
interface.

Use cases

When using items to store API tokens and related configuration, users need to access custom fields that are logically part of the credential but don't fit the standard schema.

Currently, terraform can access credential and username but silently ignores the custom fields.

Proposed solution

Extend the provider to expose root-level custom fields, similar to how sectioned custom fields are
already exposed.

Is there a workaround to accomplish this today?

Workaround 1: Move custom fields into a named section in 1Password, then access via section_map:
data.onepassword_item.slack.section_map["config"].field_map["channel"].value

Workaround 2: Abuse existing mapped fields (use standard fields instead of custom fields (i.e. url / database)

References & Prior Work

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedCommunity contributions are welcome.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions