shared

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AwsCredentialsSchema = &schema.Schema{
	Type:     schema.TypeList,
	Optional: true,
	Elem: &schema.Resource{
		Schema: map[string]*schema.Schema{
			"access_key_id": {
				Type:        schema.TypeString,
				Optional:    true,
				Sensitive:   true,
				Description: "The upstream AWS access key id.",
			},
			"secret_access_key": {
				Type:        schema.TypeString,
				Optional:    true,
				Sensitive:   true,
				Description: "The upstream AWS secret access key.",
			},
			"session_token": {
				Type:        schema.TypeString,
				Optional:    true,
				Sensitive:   true,
				Description: "The upstream AWS session token.",
			},
			"profile": {
				Type:        schema.TypeString,
				Optional:    true,
				Sensitive:   true,
				Description: "The upstream AWS profile.",
			},
		},
	},
	Description: "The upstream service's AWS credentials.",
}

AwsCredentialsSchema is the schema for the `aws_credentials` block. This block is used to configure the upstream service's AWS credentials. Configure `access_key_id`, `secret_access_key` and `session_token` to use static credentials, or configure `profile` to use credentials from the shared credentials file.

Functions

func FromAwsCredentials

func FromAwsCredentials(creds *common.AwsCredentials) []map[string]any

FromAwsCredentials converts the `common.AwsCredentials` struct to a `[]map[string]any` for use in the `aws_credentials` block.

func ToAwsCredentials

func ToAwsCredentials(v any, creds *common.AwsCredentials)

ToAwsCredentials converts the `aws_credentials` block to a `common.AwsCredentials` struct.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL