terraform-provider-sops | A Terraform provider for reading Mozilla sops files | Infrastructure Automation library
kandi X-RAY | terraform-provider-sops Summary
kandi X-RAY | terraform-provider-sops Summary
A Terraform provider for reading Mozilla sops files
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of terraform-provider-sops
terraform-provider-sops Key Features
terraform-provider-sops Examples and Code Snippets
Community Discussions
Trending Discussions on terraform-provider-sops
QUESTION
I'm pretty new to Terraform. I'm trying to use the sops provider plugin for encrypting secrets from a yaml file: Sops Provider
I need to create a Terraform user object for a later provisioning stage like this example:
...ANSWER
Answered 2022-Feb-07 at 18:46I think the "set of map of string" part of this error message is the important part: for_each
requires either a map directly (in which case the map keys become the instance identifiers) or a set of individual strings (in which case those strings become the instance identifiers).
Your example YAML file shows yaml_users
being defined as a YAML sequence of maps, which corresponds to a tuple of objects on conversion with yamldecode
.
To use that data structure with for_each
you'll need to first project it into a map whose keys will serve as the unique identifier for each instance of the resource. Assuming that the name
values are suitably unique, you could project it so that those values are the keys:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install terraform-provider-sops
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page