diff --git a/aws/config.go b/aws/config.go index 871bf571f63..897d57eaaab 100644 --- a/aws/config.go +++ b/aws/config.go @@ -170,6 +170,7 @@ type Config struct { S3Endpoint string S3ControlEndpoint string SesEndpoint string + SfnEndpoint string SnsEndpoint string SqsEndpoint string StsEndpoint string @@ -457,7 +458,7 @@ func (c *Config) Client() (interface{}, error) { securityhubconn: securityhub.New(sess), serverlessapplicationrepositoryconn: serverlessapplicationrepository.New(sess), sesConn: ses.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.SesEndpoint)})), - sfnconn: sfn.New(sess), + sfnconn: sfn.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.SfnEndpoint)})), shieldconn: shield.New(sess), simpledbconn: simpledb.New(sess), snsconn: sns.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.SnsEndpoint)})), diff --git a/aws/provider.go b/aws/provider.go index 2d3cf404c90..310a9b88d36 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -853,6 +853,8 @@ func init() { "ses_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "sfn_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "sns_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", "sqs_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", @@ -968,6 +970,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) { config.S3Endpoint = endpoints["s3"].(string) config.S3ControlEndpoint = endpoints["s3control"].(string) config.SesEndpoint = endpoints["ses"].(string) + config.SfnEndpoint = endpoints["sfn"].(string) config.SnsEndpoint = endpoints["sns"].(string) config.SqsEndpoint = endpoints["sqs"].(string) config.StsEndpoint = endpoints["sts"].(string) @@ -1201,6 +1204,12 @@ func endpointsSchema() *schema.Schema { Default: "", Description: descriptions["ses_endpoint"], }, + "sfn": { + Type: schema.TypeString, + Optional: true, + Default: "", + Description: descriptions["sfn_endpoint"], + }, "sns": { Type: schema.TypeString, Optional: true, @@ -1254,6 +1263,7 @@ func endpointsToHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", m["redshift"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["s3"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["ses"].(string))) + buf.WriteString(fmt.Sprintf("%s-", m["sfn"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["sns"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["sqs"].(string))) diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index 0369b9ed4f8..60f26bf6c09 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -388,6 +388,10 @@ Nested `endpoints` block supports the following: URL constructed from the `region`. It's typically used to connect to custom SNS endpoints. +* `sfn` - (Optional) Use this to override the default endpoint + URL constructed from the `region`. It's typically used to connect to + custom SFN endpoints. + * `sns` - (Optional) Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to custom SNS endpoints.