hashicorp / hashicorp/terraform-plugin-sdk

How to convert schema.ResourceData to go map or json in resourceXXXCreate?

Open
#148 3 comments 2 reactions 0 assignees View on GitHub
enhancement subsystem/types
Dominant language
Go
Stars
485
Forks
244
Avg merge
19h 57m
Merged PRs (30d)
4

Description

Hi,
i am writing a customized terraform provider, in resourceXXXCreate, I need to covert the input schema.ResourceData to a go map or json to import the object data, is there any function in https://godoc.org/github.com/hashicorp/terraform/helper/schema I can use?
thanks

Contributor guide

Open the contributing guide

Research direction

Start with the helper/schema.ResourceData API and the resourceXXXCreate entry point named in the question. Check the SDK documentation and existing provider examples for supported ways to access the input, then confirm whether a map or JSON conversion is available. Done means providing a documented, working conversion path or clearly recording that the SDK does not support one.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, terraform
Domain
infrastructure, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.