Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all: Go package documentation updates post datasource, provider, and …
- Loading branch information
Showing
7 changed files
with
91 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
// Package datasource contains all interfaces, request types, and response | ||
// types for a data source implementation. | ||
// | ||
// In Terraform, a data source is a concept which enables provider developers | ||
// to offer practitioners a read-only source of information, which is saved | ||
// into the Terraform state and can be referenced by other parts of a | ||
// configuration. Data sources are defined by a data source type/name, such as | ||
// "example_thing", a schema representing the structure and data types of | ||
// configuration and state, and read logic. | ||
// | ||
// The main starting point for implementations in this package is the | ||
// DataSource type which represents an instance of a data source type that has | ||
// its own configuration, read logic, and state. A DataSource is instantiated | ||
// from a provider.DataSourceType type NewDataSource method, which also defines | ||
// the data source schema. The provider.DataSourceType types are referenced by | ||
// a provider.Provider type GetDataSources method, which enables the data | ||
// source for practitioner and testing usage. | ||
package datasource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
// Package provider contains all interfaces, request types, and response | ||
// types for a provider implementation. | ||
// | ||
// In Terraform, a provider is a concept which enables provider developers | ||
// to offer practitioners data sources and managed resources. Those concepts | ||
// are described in more detail in their respective datasource and resource | ||
// packages. | ||
// | ||
// Providers generally store any infrastructure clients or shared data that is | ||
// applicable across data sources and managed resources. Providers are | ||
// generally configured early in Terraform operations, such as plan and apply, | ||
// before data source and managed resource logic is called. However, this early | ||
// provider configuration is not guaranteed in the case there are unknown | ||
// Terraform configuration values, so additional logic checks may be required | ||
// throughout an implementation to handle this case. Providers may contain a | ||
// schema representing the structure and data types of Terraform-based | ||
// configuration. | ||
// | ||
// The main starting point for implementations in this package is the | ||
// Provider type which represents an instance of a provider that has | ||
// its own configuration. | ||
package provider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
// Package providerserver implements functionality for serving a provider, | ||
// such as directly starting a server in a production binary and conversion | ||
// functions for testing. | ||
// | ||
// For production usage, call the Serve function from binary startup, such as | ||
// from the provider codebase main package. If multiplexing the provider server | ||
// via terraform-plugin-mux functionality, use the NewProtocol* functions and | ||
// call the Serve function from that Go module. For testing usage, call the | ||
// NewProtocol* functions. | ||
// | ||
// All functionality in this package requires the provider.Provider type, which | ||
// contains the provider implementation including all managed resources and | ||
// data sources. | ||
package providerserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
// Package resource contains all interfaces, request types, and response types | ||
// for a managed resource implementation. | ||
// | ||
// In Terraform, a managed resource is a concept which enables provider | ||
// developers to offer practitioners full lifecycle management (create, read, | ||
// update, and delete) of a infrastructure component. Managed resources can | ||
// also stand in for one-time infrastructure operations that require tracking, | ||
// by implementing create logic, while omitting update and delete logic. | ||
// | ||
// Resources are saved into the Terraform state and can be referenced by other | ||
// parts of a configuration. Resources are defined by a resource type/name, | ||
// such as "example_thing", a schema representing the structure and data types | ||
// of configuration, plan, and state, and lifecycle logic. | ||
// | ||
// The main starting point for implementations in this package is the | ||
// Resource type which represents an instance of a resource type that has | ||
// its own configuration, plan, state, and lifecycle logic. A Resource is | ||
// instantiated from a provider.ResourceType type NewResource method, which | ||
// also defines the resource schema. The provider.ResourceType types are | ||
// referenced by a provider.Provider type GetResources method, which enables | ||
// the resource for practitioner and testing usage. | ||
package resource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters