INNER CODE UNIT · Go

func

hashicorp/terraform-provider-random · internal/provider/ephemeral_bytes.go:37

func (e *bytesEphemeralResource) Metadata(ctx context.Context, req ephemeral.MetadataRequest, resp *ephemeral.MetadataResponse) {
	resp.TypeName = req.ProviderTypeName + "_bytes"
}

func (e *bytesEphemeralResource) Schema(ctx context.Context, req ephemeral.SchemaRequest, resp *ephemeral.SchemaResponse) {
	resp.Schema = schema.Schema{
		Description: "-> If the managed resource doesn't have a write-only argument available for the secret (first introduced in Terraform 1.11), then the " +
			"secret can only be created with the managed resource variant of [`random_bytes`](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/bytes).\n" +
			"\n" +
			"Generates ephemeral random bytes using a cryptographic random number generator.\n" +
			"\n" +
			"The primary use-case for generating ephemeral random bytes is to be used in combination with a write-only argument " +
			"in a managed resource, which will avoid Terraform storing the secret value in the plan or state file.",
		Attributes: map[string]schema.Attribute{
			"length": schema.Int64Attribute{
				Description: "The number of bytes requested. The minimum value for length is 1.",
				Required:    true,
				Validators: []validator.Int64{

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…