From 9f608e7596e4f0275a75f34fc03e35c0649ccdb8 Mon Sep 17 00:00:00 2001 From: Daniel Banck Date: Thu, 16 Nov 2023 18:15:17 +0100 Subject: [PATCH] Add sso endpoint to s3 backend (#302) --- internal/schema/backends/s3.go | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/internal/schema/backends/s3.go b/internal/schema/backends/s3.go index 0c4d4a90..0b5d2379 100644 --- a/internal/schema/backends/s3.go +++ b/internal/schema/backends/s3.go @@ -504,6 +504,41 @@ func s3Backend(v *version.Version) *schema.BodySchema { IsOptional: true, Description: lang.Markdown("Comma-separated list of hosts that should not use HTTP or HTTPS proxies."), } + bodySchema.Attributes["endpoints"] = &schema.AttributeSchema{ + Constraint: schema.Object{ + Attributes: schema.ObjectAttributes{ + "dynamodb": &schema.AttributeSchema{ + Constraint: schema.LiteralType{Type: cty.String}, + IsOptional: true, + Description: lang.Markdown("A custom endpoint for the DynamoDB API"), + }, + + "iam": &schema.AttributeSchema{ + Constraint: schema.LiteralType{Type: cty.String}, + IsOptional: true, + Description: lang.Markdown("A custom endpoint for the IAM API"), + }, + + "s3": &schema.AttributeSchema{ + Constraint: schema.LiteralType{Type: cty.String}, + IsOptional: true, + Description: lang.Markdown("A custom endpoint for the S3 API"), + }, + + "sts": &schema.AttributeSchema{ + Constraint: schema.LiteralType{Type: cty.String}, + IsOptional: true, + Description: lang.Markdown("A custom endpoint for the STS API"), + }, + + "sso": &schema.AttributeSchema{ + Constraint: schema.LiteralType{Type: cty.String}, + IsOptional: true, + Description: lang.Markdown("A custom endpoint for the IAM Identity Center (formerly known as SSO) API"), + }, + }, + }, + } } return bodySchema