From 484b29a83d41844ee70c28b168e25642a4094e5e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Mon, 11 Sep 2023 16:56:36 -0400 Subject: [PATCH 1/6] Fix names --- .github/labeler-issue-triage.yml | 4 +- .github/labeler-pr-triage.yml | 6 +- infrastructure/repository/labels-service.tf | 2 +- internal/conns/awsclient_gen.go | 4 +- names/consts_gen.go | 2 +- names/names_data.csv | 2 +- website/allowed-subcategories.txt | 2 +- .../guides/custom-service-endpoints.html.md | 352 ++++++++++++++++++ 8 files changed, 363 insertions(+), 11 deletions(-) create mode 100644 website/docs/guides/custom-service-endpoints.html.md diff --git a/.github/labeler-issue-triage.yml b/.github/labeler-issue-triage.yml index 3aed81ff203b..10a64da1d567 100644 --- a/.github/labeler-issue-triage.yml +++ b/.github/labeler-issue-triage.yml @@ -377,12 +377,12 @@ service/lambda: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_lambda_' service/lexmodels: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_lex_' -service/lexmodelsv2: - - '((\*|-)\s*`?|(data|resource)\s+"?)aws_lexv2models_' service/lexruntime: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_lexruntime_' service/lexruntimev2: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_lexruntimev2_' +service/lexv2models: + - '((\*|-)\s*`?|(data|resource)\s+"?)aws_lexv2models_' service/licensemanager: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_licensemanager_' service/lightsail: diff --git a/.github/labeler-pr-triage.yml b/.github/labeler-pr-triage.yml index a8ea9662c5bc..afd9edb0c510 100644 --- a/.github/labeler-pr-triage.yml +++ b/.github/labeler-pr-triage.yml @@ -623,15 +623,15 @@ service/lambda: service/lexmodels: - 'internal/service/lexmodels/**/*' - 'website/**/lex_*' -service/lexmodelsv2: - - 'internal/service/lexmodelsv2/**/*' - - 'website/**/lexmodelsv2_*' service/lexruntime: - 'internal/service/lexruntime/**/*' - 'website/**/lexruntime_*' service/lexruntimev2: - 'internal/service/lexruntimev2/**/*' - 'website/**/lexruntimev2_*' +service/lexv2models: + - 'internal/service/lexv2models/**/*' + - 'website/**/lexv2models_*' service/licensemanager: - 'internal/service/licensemanager/**/*' - 'website/**/licensemanager_*' diff --git a/infrastructure/repository/labels-service.tf b/infrastructure/repository/labels-service.tf index 3a437da592b6..6428c532502c 100644 --- a/infrastructure/repository/labels-service.tf +++ b/infrastructure/repository/labels-service.tf @@ -176,9 +176,9 @@ variable "service_labels" { "lakeformation", "lambda", "lexmodels", - "lexmodelsv2", "lexruntime", "lexruntimev2", + "lexv2models", "licensemanager", "lightsail", "location", diff --git a/internal/conns/awsclient_gen.go b/internal/conns/awsclient_gen.go index e22e23c5868b..d84353737172 100644 --- a/internal/conns/awsclient_gen.go +++ b/internal/conns/awsclient_gen.go @@ -722,8 +722,8 @@ func (c *AWSClient) LexModelsConn(ctx context.Context) *lexmodelbuildingservice_ return errs.Must(conn[*lexmodelbuildingservice_sdkv1.LexModelBuildingService](ctx, c, names.LexModels)) } -func (c *AWSClient) LexModelsV2Client(ctx context.Context) *lexmodelsv2_sdkv2.Client { - return errs.Must(client[*lexmodelsv2_sdkv2.Client](ctx, c, names.LexModelsV2)) +func (c *AWSClient) LexV2ModelsClient(ctx context.Context) *lexmodelsv2_sdkv2.Client { + return errs.Must(client[*lexmodelsv2_sdkv2.Client](ctx, c, names.LexV2Models)) } func (c *AWSClient) LicenseManagerConn(ctx context.Context) *licensemanager_sdkv1.LicenseManager { diff --git a/names/consts_gen.go b/names/consts_gen.go index bfc9fb72e0f9..ca8a4297198f 100644 --- a/names/consts_gen.go +++ b/names/consts_gen.go @@ -122,7 +122,7 @@ const ( LakeFormation = "lakeformation" Lambda = "lambda" LexModels = "lexmodels" - LexModelsV2 = "lexmodelsv2" + LexV2Models = "lexv2models" LicenseManager = "licensemanager" Lightsail = "lightsail" Location = "location" diff --git a/names/names_data.csv b/names/names_data.csv index d9036e34bcd3..fb3a690acc9d 100644 --- a/names/names_data.csv +++ b/names/names_data.csv @@ -213,7 +213,7 @@ lakeformation,lakeformation,lakeformation,lakeformation,,lakeformation,,,LakeFor lambda,lambda,lambda,lambda,,lambda,,,Lambda,Lambda,,1,2,,aws_lambda_,,lambda_,Lambda,AWS,,,,,, ,,,,,,,,,,,,,,,,,Launch Wizard,AWS,x,,,,,No SDK support lex-models,lexmodels,lexmodelbuildingservice,lexmodelbuildingservice,,lexmodels,,lexmodelbuilding;lexmodelbuildingservice;lex,LexModels,LexModelBuildingService,,1,,aws_lex_,aws_lexmodels_,,lex_,Lex Model Building,Amazon,,,,,, -lexv2-models,lexv2models,lexmodelsv2,lexmodelsv2,,lexmodelsv2,,lexv2models,LexModelsV2,LexModelsV2,,,2,aws_lexv2models_,aws_lexmodelsv2_,,lexmodelsv2_,Lex Models V2,Amazon,,,,,, +lexv2-models,lexv2models,lexmodelsv2,lexmodelsv2,,lexv2models,,lexmodelsv2,LexV2Models,LexModelsV2,,,2,,aws_lexv2models_,,lexv2models_,Lex V2 Models,Amazon,,,,,, lex-runtime,lexruntime,lexruntimeservice,lexruntimeservice,,lexruntime,,lexruntimeservice,LexRuntime,LexRuntimeService,,1,,,aws_lexruntime_,,lexruntime_,Lex Runtime,Amazon,,x,,,, lexv2-runtime,lexv2runtime,lexruntimev2,lexruntimev2,,lexruntimev2,,lexv2runtime,LexRuntimeV2,LexRuntimeV2,,1,,,aws_lexruntimev2_,,lexruntimev2_,Lex Runtime V2,Amazon,,x,,,, license-manager,licensemanager,licensemanager,licensemanager,,licensemanager,,,LicenseManager,LicenseManager,,1,,,aws_licensemanager_,,licensemanager_,License Manager,AWS,,,,,, diff --git a/website/allowed-subcategories.txt b/website/allowed-subcategories.txt index c8e44bdd65d8..ea0af8687890 100644 --- a/website/allowed-subcategories.txt +++ b/website/allowed-subcategories.txt @@ -127,7 +127,7 @@ Kinesis Video Lake Formation Lambda Lex Model Building -Lex Models V2 +Lex V2 Models License Manager Lightsail Location diff --git a/website/docs/guides/custom-service-endpoints.html.md b/website/docs/guides/custom-service-endpoints.html.md new file mode 100644 index 000000000000..c80013716258 --- /dev/null +++ b/website/docs/guides/custom-service-endpoints.html.md @@ -0,0 +1,352 @@ +--- +subcategory: "" +layout: "aws" +page_title: "Terraform AWS Provider Custom Service Endpoint Configuration" +description: |- + Configuring the Terraform AWS Provider to connect to custom AWS service endpoints and AWS compatible solutions. +--- + + + +# Custom Service Endpoint Configuration + +The Terraform AWS Provider configuration can be customized to connect to non-default AWS service endpoints and AWS compatible solutions. This may be useful for environments with specific compliance requirements, such as using [AWS FIPS 140-2 endpoints](https://aws.amazon.com/compliance/fips/), connecting to AWS Snowball, SC2S, or C2S environments, or local testing. + +This guide outlines how to get started with customizing endpoints, the available endpoint configurations, and offers example configurations for working with certain local development and testing solutions. + +~> **NOTE:** Support for connecting the Terraform AWS Provider with custom endpoints and AWS compatible solutions is offered as best effort. Individual Terraform resources may require compatibility updates to work in certain environments. Integration testing by HashiCorp during provider changes is exclusively done against default AWS endpoints at this time. + + + +- [Getting Started with Custom Endpoints](#getting-started-with-custom-endpoints) +- [Available Endpoint Customizations](#available-endpoint-customizations) +- [Connecting to Local AWS Compatible Solutions](#connecting-to-local-aws-compatible-solutions) + - [DynamoDB Local](#dynamodb-local) + - [LocalStack](#localstack) + + + +## Getting Started with Custom Endpoints + +To configure the Terraform AWS Provider to use customized endpoints, it can be done within `provider` declarations using the `endpoints` configuration block, e.g., + +```terraform +provider "aws" { + # ... potentially other provider configuration ... + + endpoints { + dynamodb = "http://localhost:4569" + s3 = "http://localhost:4572" + } +} +``` + +If multiple, different Terraform AWS Provider configurations are required, see the [Terraform documentation on multiple provider instances](https://www.terraform.io/docs/configuration/providers.html#alias-multiple-provider-instances) for additional information about the `alias` provider configuration and its usage. + +## Available Endpoint Customizations + +The Terraform AWS Provider allows the following endpoints to be customized. + +**Note:** The Provider allows some service endpoints to be customized despite not supporting those services. + +**Note:** For backward compatibility, some endpoints can be assigned using multiple service "keys" (_e.g._, `dms`, `databasemigration`, or `databasemigrationservice`). If you use more than one equivalent service key in your configuration, the provider will use the _first_ endpoint value set. For example, in the configuration below we have set the DMS service endpoints using both `dms` and `databasemigration`. The provider will set the endpoint to whichever appears first. Subsequent values are ignored. + +```terraform +provider "aws" { + endpoints { + dms = "http://this.value.will.be.used.com" + databasemigration = "http://this.value.will.be.ignored.com" + } +} +``` + + + + +
+ +
+ + +As a convenience, for compatibility with the [Terraform S3 Backend](https://www.terraform.io/language/settings/backends/s3), +the following service endpoints can be configured using environment variables: + +* DynamoDB: `TF_AWS_DYNAMODB_ENDPOINT` (or **Deprecated** `AWS_DYNAMODB_ENDPOINT`) +* IAM: `TF_AWS_IAM_ENDPOINT` (or **Deprecated** `AWS_IAM_ENDPOINT`) +* S3: `TF_AWS_S3_ENDPOINT` (or **Deprecated** `AWS_S3_ENDPOINT`) +* STS: `TF_AWS_STS_ENDPOINT` (or **Deprecated** `AWS_STS_ENDPOINT`) + +## Connecting to Local AWS Compatible Solutions + +~> **NOTE:** This information is not intended to be exhaustive for all local AWS compatible solutions or necessarily authoritative configurations for those documented. Check the documentation for each of these solutions for the most up to date information. + +### DynamoDB Local + +The Amazon DynamoDB service offers a downloadable version for writing and testing applications without accessing the DynamoDB web service. For more information about this solution, see the [DynamoDB Local documentation in the Amazon DynamoDB Developer Guide](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html). + +An example provider configuration: + +```terraform +provider "aws" { + access_key = "mock_access_key" + region = "us-east-1" + secret_key = "mock_secret_key" + skip_credentials_validation = true + skip_metadata_api_check = true + skip_requesting_account_id = true + + endpoints { + dynamodb = "http://localhost:8000" + } +} +``` + +### LocalStack + +[LocalStack](https://localstack.cloud/) provides an easy-to-use test/mocking framework for developing Cloud applications. + +An example provider configuration: + +```terraform +provider "aws" { + access_key = "mock_access_key" + region = "us-east-1" + s3_use_path_style = true + secret_key = "mock_secret_key" + skip_credentials_validation = true + skip_metadata_api_check = true + skip_requesting_account_id = true + + endpoints { + apigateway = "http://localhost:4566" + cloudformation = "http://localhost:4566" + cloudwatch = "http://localhost:4566" + dynamodb = "http://localhost:4566" + es = "http://localhost:4566" + firehose = "http://localhost:4566" + iam = "http://localhost:4566" + kinesis = "http://localhost:4566" + lambda = "http://localhost:4566" + route53 = "http://localhost:4566" + redshift = "http://localhost:4566" + s3 = "http://localhost:4566" + secretsmanager = "http://localhost:4566" + ses = "http://localhost:4566" + sns = "http://localhost:4566" + sqs = "http://localhost:4566" + ssm = "http://localhost:4566" + stepfunctions = "http://localhost:4566" + sts = "http://localhost:4566" + } +} +``` From 03454fe6559e674d8c43c0fca8082d93ddb2ac91 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Mon, 11 Sep 2023 17:48:19 -0400 Subject: [PATCH 2/6] Fix lexv2models generate --- .ci/.semgrep-service-name0.yml | 15 ++ .ci/.semgrep-service-name1.yml | 72 ++++++-- .ci/.semgrep-service-name2.yml | 173 ++++++++++-------- .ci/.semgrep-service-name3.yml | 15 ++ .../components/generated/services_all.kt | 1 + internal/provider/service_packages_gen.go | 2 + internal/service/lexv2models/generate.go | 7 + .../lexv2models/service_package_gen.go | 55 ++++++ internal/sweep/service_packages_gen_test.go | 2 + 9 files changed, 255 insertions(+), 87 deletions(-) create mode 100644 internal/service/lexv2models/generate.go create mode 100644 internal/service/lexv2models/service_package_gen.go diff --git a/.ci/.semgrep-service-name0.yml b/.ci/.semgrep-service-name0.yml index bacf0025268e..c5087b586850 100644 --- a/.ci/.semgrep-service-name0.yml +++ b/.ci/.semgrep-service-name0.yml @@ -3448,3 +3448,18 @@ rules: patterns: - pattern-regex: "(?i)ComputeOptimizer" severity: WARNING + - id: configservice-in-func-name + languages: + - go + message: Do not use "ConfigService" in func name inside configservice package + paths: + include: + - internal/service/configservice + patterns: + - pattern: func $NAME( ... ) { ... } + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)ConfigService" + - pattern-not-regex: ^TestAcc.* + severity: WARNING diff --git a/.ci/.semgrep-service-name1.yml b/.ci/.semgrep-service-name1.yml index 529cf6a12283..c40d57e572b9 100644 --- a/.ci/.semgrep-service-name1.yml +++ b/.ci/.semgrep-service-name1.yml @@ -1,20 +1,5 @@ # Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT. rules: - - id: configservice-in-func-name - languages: - - go - message: Do not use "ConfigService" in func name inside configservice package - paths: - include: - - internal/service/configservice - patterns: - - pattern: func $NAME( ... ) { ... } - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)ConfigService" - - pattern-not-regex: ^TestAcc.* - severity: WARNING - id: configservice-in-test-name languages: - go @@ -3424,3 +3409,60 @@ rules: - pattern-not-regex: "^TestAccInspector2" - pattern-regex: ^TestAcc.* severity: WARNING + - id: inspector2-in-const-name + languages: + - go + message: Do not use "Inspector2" in const name inside inspector2 package + paths: + include: + - internal/service/inspector2 + patterns: + - pattern: const $NAME = ... + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)Inspector2" + severity: WARNING + - id: inspector2-in-var-name + languages: + - go + message: Do not use "Inspector2" in var name inside inspector2 package + paths: + include: + - internal/service/inspector2 + patterns: + - pattern: var $NAME = ... + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)Inspector2" + severity: WARNING + - id: inspectorv2-in-func-name + languages: + - go + message: Do not use "inspectorv2" in func name inside inspector2 package + paths: + include: + - internal/service/inspector2 + patterns: + - pattern: func $NAME( ... ) { ... } + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)inspectorv2" + - pattern-not-regex: ^TestAcc.* + severity: WARNING + - id: inspectorv2-in-const-name + languages: + - go + message: Do not use "inspectorv2" in const name inside inspector2 package + paths: + include: + - internal/service/inspector2 + patterns: + - pattern: const $NAME = ... + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)inspectorv2" + severity: WARNING diff --git a/.ci/.semgrep-service-name2.yml b/.ci/.semgrep-service-name2.yml index 275b6061ecce..a1ca3c0ab4ad 100644 --- a/.ci/.semgrep-service-name2.yml +++ b/.ci/.semgrep-service-name2.yml @@ -1,62 +1,5 @@ # Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT. rules: - - id: inspector2-in-const-name - languages: - - go - message: Do not use "Inspector2" in const name inside inspector2 package - paths: - include: - - internal/service/inspector2 - patterns: - - pattern: const $NAME = ... - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)Inspector2" - severity: WARNING - - id: inspector2-in-var-name - languages: - - go - message: Do not use "Inspector2" in var name inside inspector2 package - paths: - include: - - internal/service/inspector2 - patterns: - - pattern: var $NAME = ... - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)Inspector2" - severity: WARNING - - id: inspectorv2-in-func-name - languages: - - go - message: Do not use "inspectorv2" in func name inside inspector2 package - paths: - include: - - internal/service/inspector2 - patterns: - - pattern: func $NAME( ... ) { ... } - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)inspectorv2" - - pattern-not-regex: ^TestAcc.* - severity: WARNING - - id: inspectorv2-in-const-name - languages: - - go - message: Do not use "inspectorv2" in const name inside inspector2 package - paths: - include: - - internal/service/inspector2 - patterns: - - pattern: const $NAME = ... - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)inspectorv2" - severity: WARNING - id: inspectorv2-in-var-name languages: - go @@ -1259,6 +1202,107 @@ rules: patterns: - pattern-regex: "(?i)LexModels" severity: WARNING + - id: lexmodelsv2-in-func-name + languages: + - go + message: Do not use "lexmodelsv2" in func name inside lexv2models package + paths: + include: + - internal/service/lexv2models + patterns: + - pattern: func $NAME( ... ) { ... } + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)lexmodelsv2" + - pattern-not-regex: ^TestAcc.* + severity: WARNING + - id: lexmodelsv2-in-const-name + languages: + - go + message: Do not use "lexmodelsv2" in const name inside lexv2models package + paths: + include: + - internal/service/lexv2models + patterns: + - pattern: const $NAME = ... + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)lexmodelsv2" + severity: WARNING + - id: lexmodelsv2-in-var-name + languages: + - go + message: Do not use "lexmodelsv2" in var name inside lexv2models package + paths: + include: + - internal/service/lexv2models + patterns: + - pattern: var $NAME = ... + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)lexmodelsv2" + severity: WARNING + - id: lexv2models-in-func-name + languages: + - go + message: Do not use "LexV2Models" in func name inside lexv2models package + paths: + include: + - internal/service/lexv2models + patterns: + - pattern: func $NAME( ... ) { ... } + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)LexV2Models" + - pattern-not-regex: ^TestAcc.* + severity: WARNING + - id: lexv2models-in-test-name + languages: + - go + message: Include "LexV2Models" in test name + paths: + include: + - internal/service/lexv2models/*_test.go + patterns: + - pattern: func $NAME( ... ) { ... } + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-not-regex: "^TestAccLexV2Models" + - pattern-regex: ^TestAcc.* + severity: WARNING + - id: lexv2models-in-const-name + languages: + - go + message: Do not use "LexV2Models" in const name inside lexv2models package + paths: + include: + - internal/service/lexv2models + patterns: + - pattern: const $NAME = ... + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)LexV2Models" + severity: WARNING + - id: lexv2models-in-var-name + languages: + - go + message: Do not use "LexV2Models" in var name inside lexv2models package + paths: + include: + - internal/service/lexv2models + patterns: + - pattern: var $NAME = ... + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)LexV2Models" + severity: WARNING - id: licensemanager-in-func-name languages: - go @@ -3420,18 +3464,3 @@ rules: patterns: - pattern-regex: "(?i)Redshift" severity: WARNING - - id: redshiftdata-in-func-name - languages: - - go - message: Do not use "RedshiftData" in func name inside redshiftdata package - paths: - include: - - internal/service/redshiftdata - patterns: - - pattern: func $NAME( ... ) { ... } - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)RedshiftData" - - pattern-not-regex: ^TestAcc.* - severity: WARNING diff --git a/.ci/.semgrep-service-name3.yml b/.ci/.semgrep-service-name3.yml index 1184c1a2839b..e1ded6815b13 100644 --- a/.ci/.semgrep-service-name3.yml +++ b/.ci/.semgrep-service-name3.yml @@ -1,5 +1,20 @@ # Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT. rules: + - id: redshiftdata-in-func-name + languages: + - go + message: Do not use "RedshiftData" in func name inside redshiftdata package + paths: + include: + - internal/service/redshiftdata + patterns: + - pattern: func $NAME( ... ) { ... } + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)RedshiftData" + - pattern-not-regex: ^TestAcc.* + severity: WARNING - id: redshiftdata-in-test-name languages: - go diff --git a/.teamcity/components/generated/services_all.kt b/.teamcity/components/generated/services_all.kt index 96e7ece18979..05d919907249 100644 --- a/.teamcity/components/generated/services_all.kt +++ b/.teamcity/components/generated/services_all.kt @@ -118,6 +118,7 @@ val services = mapOf( "lakeformation" to ServiceSpec("Lake Formation"), "lambda" to ServiceSpec("Lambda", vpcLock = true), "lexmodels" to ServiceSpec("Lex Model Building"), + "lexv2models" to ServiceSpec("Lex V2 Models"), "licensemanager" to ServiceSpec("License Manager"), "lightsail" to ServiceSpec("Lightsail", regionOverride = "us-east-1"), "location" to ServiceSpec("Location"), diff --git a/internal/provider/service_packages_gen.go b/internal/provider/service_packages_gen.go index 0ee612df1e2e..222c9e8a80fa 100644 --- a/internal/provider/service_packages_gen.go +++ b/internal/provider/service_packages_gen.go @@ -126,6 +126,7 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/service/lakeformation" "github.com/hashicorp/terraform-provider-aws/internal/service/lambda" "github.com/hashicorp/terraform-provider-aws/internal/service/lexmodels" + "github.com/hashicorp/terraform-provider-aws/internal/service/lexv2models" "github.com/hashicorp/terraform-provider-aws/internal/service/licensemanager" "github.com/hashicorp/terraform-provider-aws/internal/service/lightsail" "github.com/hashicorp/terraform-provider-aws/internal/service/location" @@ -335,6 +336,7 @@ func servicePackages(ctx context.Context) []conns.ServicePackage { lakeformation.ServicePackage(ctx), lambda.ServicePackage(ctx), lexmodels.ServicePackage(ctx), + lexv2models.ServicePackage(ctx), licensemanager.ServicePackage(ctx), lightsail.ServicePackage(ctx), location.ServicePackage(ctx), diff --git a/internal/service/lexv2models/generate.go b/internal/service/lexv2models/generate.go new file mode 100644 index 000000000000..a6650f8dfa53 --- /dev/null +++ b/internal/service/lexv2models/generate.go @@ -0,0 +1,7 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +//go:generate go run ../../generate/servicepackage/main.go +// ONLY generate directives and package declaration! Do not add anything else to this file. + +package lexv2models diff --git a/internal/service/lexv2models/service_package_gen.go b/internal/service/lexv2models/service_package_gen.go new file mode 100644 index 000000000000..db745222bf8f --- /dev/null +++ b/internal/service/lexv2models/service_package_gen.go @@ -0,0 +1,55 @@ +// Code generated by internal/generate/servicepackages/main.go; DO NOT EDIT. + +package lexv2models + +import ( + "context" + + aws_sdkv2 "github.com/aws/aws-sdk-go-v2/aws" + lexmodelsv2_sdkv2 "github.com/aws/aws-sdk-go-v2/service/lexmodelsv2" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/types" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type servicePackage struct{} + +func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*types.ServicePackageFrameworkDataSource { + return []*types.ServicePackageFrameworkDataSource{} +} + +func (p *servicePackage) FrameworkResources(ctx context.Context) []*types.ServicePackageFrameworkResource { + return []*types.ServicePackageFrameworkResource{ + { + Factory: newResourceBot, + Name: "Bot", + }, + } +} + +func (p *servicePackage) SDKDataSources(ctx context.Context) []*types.ServicePackageSDKDataSource { + return []*types.ServicePackageSDKDataSource{} +} + +func (p *servicePackage) SDKResources(ctx context.Context) []*types.ServicePackageSDKResource { + return []*types.ServicePackageSDKResource{} +} + +func (p *servicePackage) ServicePackageName() string { + return names.LexV2Models +} + +// NewClient returns a new AWS SDK for Go v2 client for this service package's AWS API. +func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) (*lexmodelsv2_sdkv2.Client, error) { + cfg := *(config["aws_sdkv2_config"].(*aws_sdkv2.Config)) + + return lexmodelsv2_sdkv2.NewFromConfig(cfg, func(o *lexmodelsv2_sdkv2.Options) { + if endpoint := config["endpoint"].(string); endpoint != "" { + o.BaseEndpoint = aws_sdkv2.String(endpoint) + } + }), nil +} + +func ServicePackage(ctx context.Context) conns.ServicePackage { + return &servicePackage{} +} diff --git a/internal/sweep/service_packages_gen_test.go b/internal/sweep/service_packages_gen_test.go index 8ba0793448ac..ba6934466607 100644 --- a/internal/sweep/service_packages_gen_test.go +++ b/internal/sweep/service_packages_gen_test.go @@ -126,6 +126,7 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/service/lakeformation" "github.com/hashicorp/terraform-provider-aws/internal/service/lambda" "github.com/hashicorp/terraform-provider-aws/internal/service/lexmodels" + "github.com/hashicorp/terraform-provider-aws/internal/service/lexv2models" "github.com/hashicorp/terraform-provider-aws/internal/service/licensemanager" "github.com/hashicorp/terraform-provider-aws/internal/service/lightsail" "github.com/hashicorp/terraform-provider-aws/internal/service/location" @@ -335,6 +336,7 @@ func servicePackages(ctx context.Context) []conns.ServicePackage { lakeformation.ServicePackage(ctx), lambda.ServicePackage(ctx), lexmodels.ServicePackage(ctx), + lexv2models.ServicePackage(ctx), licensemanager.ServicePackage(ctx), lightsail.ServicePackage(ctx), location.ServicePackage(ctx), From 7cb47369ee5b70d3b6f8a518e34b4485e2fb97ff Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Mon, 11 Sep 2023 17:58:48 -0400 Subject: [PATCH 3/6] Remove fake bot resource --- internal/service/lexv2models/service_package_gen.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/service/lexv2models/service_package_gen.go b/internal/service/lexv2models/service_package_gen.go index db745222bf8f..25c038d098b2 100644 --- a/internal/service/lexv2models/service_package_gen.go +++ b/internal/service/lexv2models/service_package_gen.go @@ -19,12 +19,7 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*types.Serv } func (p *servicePackage) FrameworkResources(ctx context.Context) []*types.ServicePackageFrameworkResource { - return []*types.ServicePackageFrameworkResource{ - { - Factory: newResourceBot, - Name: "Bot", - }, - } + return []*types.ServicePackageFrameworkResource{} } func (p *servicePackage) SDKDataSources(ctx context.Context) []*types.ServicePackageSDKDataSource { From 738df80625ce1601b368150b476f66f20bc216c3 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 12 Sep 2023 10:45:57 -0400 Subject: [PATCH 4/6] Fix links --- .ci/.markdownlinkcheck.json | 2 +- docs/prioritization.md | 2 +- website/docs/d/kms_secret.html.markdown | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/.markdownlinkcheck.json b/.ci/.markdownlinkcheck.json index 37d1bf95cfe3..aed9231fe478 100644 --- a/.ci/.markdownlinkcheck.json +++ b/.ci/.markdownlinkcheck.json @@ -37,7 +37,7 @@ "replacement": "file:///github/workspace/website/docs/d/$1.markdown$2" }, { - "pattern": "^file:///github/workspace/website/docs/r/(cognito_identity_pool|cognito_user_pool|iam_role_policy_attachment|iam_user_policy_attachment|network_interface|ram_principal_association|ram_resource_share|ram_resource_share_accepter)\\.html\\.markdown(#.*)?$", + "pattern": "^file:///github/workspace/website/docs/r/(cognito_identity_pool|iam_user_policy_attachment|network_interface|ram_principal_association|ram_resource_share|ram_resource_share_accepter)\\.html\\.markdown(#.*)?$", "replacement": "file:///github/workspace/website/docs/r/$1.markdown$2" } ] diff --git a/docs/prioritization.md b/docs/prioritization.md index c436b6a7ece4..44653a7ad929 100644 --- a/docs/prioritization.md +++ b/docs/prioritization.md @@ -8,7 +8,7 @@ This document describes how we handle prioritization of work from a variety of i ### What this document is not -Due to the variety of input sources, the scale of the provider, and resource constraints, it is impossible to give a hard number on how each of the factors outlined in this document are weighted. Instead, the goal of the document is to give a transparent, but generalized assessment of each of the sources of input so that the community has a better idea of why things are prioritized the way they are. Additional information may be found in the [FAQ](https://github.com/hashicorp/terraform-provider-aws/blob/main/docs/contributing/faq.md#how-do-you-decide-what-gets-merged-for-each-release). +Due to the variety of input sources, the scale of the provider, and resource constraints, it is impossible to give a hard number on how each of the factors outlined in this document are weighted. Instead, the goal of the document is to give a transparent, but generalized assessment of each of the sources of input so that the community has a better idea of why things are prioritized the way they are. Additional information may be found in the [FAQ](faq.md#how-do-you-decide-what-gets-merged-for-each-release). ## Prioritization diff --git a/website/docs/d/kms_secret.html.markdown b/website/docs/d/kms_secret.html.markdown index d5313bfd6126..11e818051ede 100644 --- a/website/docs/d/kms_secret.html.markdown +++ b/website/docs/d/kms_secret.html.markdown @@ -8,4 +8,4 @@ description: |- # Data Source: aws_kms_secret -!> **WARNING:** This data source was removed in version 2.0.0 of the Terraform AWS Provider. You can migrate existing configurations to the [`aws_kms_secrets` data source](/docs/providers/aws/d/kms_secrets.html) following instructions available in the [Version 2 Upgrade Guide](/docs/providers/aws/guides/version-2-upgrade.html#data-source-aws_kms_secret). +!> **WARNING:** This data source was removed in version 2.0.0 of the Terraform AWS Provider. You can migrate existing configurations to the [`aws_kms_secrets` data source](/docs/providers/aws/d/kms_secrets.html) following instructions available in the [Version 2 Upgrade Guide](../guides/version-2-upgrade.html.markdown#data-source-aws_kms_secret). From 79602f6fc6ef40e477520e98b45ff3f693381cf3 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 12 Sep 2023 10:52:18 -0400 Subject: [PATCH 5/6] kms_secret: Fix link --- website/docs/d/kms_secret.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/d/kms_secret.html.markdown b/website/docs/d/kms_secret.html.markdown index 11e818051ede..09d27e288407 100644 --- a/website/docs/d/kms_secret.html.markdown +++ b/website/docs/d/kms_secret.html.markdown @@ -8,4 +8,4 @@ description: |- # Data Source: aws_kms_secret -!> **WARNING:** This data source was removed in version 2.0.0 of the Terraform AWS Provider. You can migrate existing configurations to the [`aws_kms_secrets` data source](/docs/providers/aws/d/kms_secrets.html) following instructions available in the [Version 2 Upgrade Guide](../guides/version-2-upgrade.html.markdown#data-source-aws_kms_secret). +!> **WARNING:** This data source was removed in version 2.0.0 of the Terraform AWS Provider. You can migrate existing configurations to the [`aws_kms_secrets` data source](/docs/providers/aws/d/kms_secrets.html) following instructions available in the [Version 2 Upgrade Guide](../guides/version-2-upgrade.html#data-source-aws_kms_secret). From e6aef3759d5fa3d12ddd1068508150057b5799e2 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 12 Sep 2023 11:52:58 -0400 Subject: [PATCH 6/6] Fix markdown link check --- .ci/.markdownlinkcheck.json | 12 +- .ci/scripts/markdown-link-check.sh | 2 +- internal/generate/customends/main.go | 2 +- .../custom-service-endpoints.html.markdown | 2 +- .../guides/custom-service-endpoints.html.md | 352 ------------------ .../guides/version-4-upgrade.html.markdown | 2 +- 6 files changed, 6 insertions(+), 366 deletions(-) delete mode 100644 website/docs/guides/custom-service-endpoints.html.md diff --git a/.ci/.markdownlinkcheck.json b/.ci/.markdownlinkcheck.json index aed9231fe478..e1814c8fc9e1 100644 --- a/.ci/.markdownlinkcheck.json +++ b/.ci/.markdownlinkcheck.json @@ -26,19 +26,11 @@ }, { "pattern": "^(custom-service-endpoints|resource-tagging|version-2-upgrade|version-3-upgrade).html.markdown(#.*)?$", - "replacement": "file:///github/workspace/website/docs/guides/$1.html.md$2" + "replacement": "file:///github/workspace/website/docs/guides/$1.html.markdown$2" }, { "pattern": "^file:///github/workspace/website/docs/guides/(.*)\\.markdown(#.*)?$", - "replacement": "file:///github/workspace/website/docs/guides/$1.md$2" - }, - { - "pattern": "^file:///github/workspace/website/docs/d/(cognito_user_pools)\\.html\\.markdown(#.*)?$", - "replacement": "file:///github/workspace/website/docs/d/$1.markdown$2" - }, - { - "pattern": "^file:///github/workspace/website/docs/r/(cognito_identity_pool|iam_user_policy_attachment|network_interface|ram_principal_association|ram_resource_share|ram_resource_share_accepter)\\.html\\.markdown(#.*)?$", - "replacement": "file:///github/workspace/website/docs/r/$1.markdown$2" + "replacement": "file:///github/workspace/website/docs/guides/$1.markdown$2" } ] } \ No newline at end of file diff --git a/.ci/scripts/markdown-link-check.sh b/.ci/scripts/markdown-link-check.sh index 89c447c6455d..cbb0f5a3f436 100755 --- a/.ci/scripts/markdown-link-check.sh +++ b/.ci/scripts/markdown-link-check.sh @@ -36,7 +36,7 @@ docker run --rm -i -t \ -w /github/workspace \ --entrypoint /usr/bin/find \ "${link_check_container}" \ - website \( -type f -name "*.md" -or -name "*.markdown" \) -exec /src/markdown-link-check --config .ci/.markdownlinkcheck.json --quiet --verbose {} \; \ + website \( -type f -name "*.md" -or -name "*.markdown" \) -not -path "website/docs/cdktf/*" -exec /src/markdown-link-check --config .ci/.markdownlinkcheck.json --quiet --verbose {} \; \ | tee -a "${output_file}" touch "${error_file}" diff --git a/internal/generate/customends/main.go b/internal/generate/customends/main.go index ba94dfa1e532..651760ac95c2 100644 --- a/internal/generate/customends/main.go +++ b/internal/generate/customends/main.go @@ -32,7 +32,7 @@ type TemplateData struct { func main() { const ( - filename = `../../../website/docs/guides/custom-service-endpoints.html.md` + filename = `../../../website/docs/guides/custom-service-endpoints.html.markdown` namesDataFile = "../../../names/names_data.csv" ) g := common.NewGenerator() diff --git a/website/docs/guides/custom-service-endpoints.html.markdown b/website/docs/guides/custom-service-endpoints.html.markdown index 017d372137d6..c80013716258 100644 --- a/website/docs/guides/custom-service-endpoints.html.markdown +++ b/website/docs/guides/custom-service-endpoints.html.markdown @@ -190,7 +190,7 @@ provider "aws" {
  • lakeformation
  • lambda
  • lexmodels (or lexmodelbuilding or lexmodelbuildingservice or lex)
  • -
  • lexmodelsv2 (or lexv2models)
  • +
  • lexv2models (or lexmodelsv2)
  • licensemanager
  • lightsail
  • location (or locationservice)
  • diff --git a/website/docs/guides/custom-service-endpoints.html.md b/website/docs/guides/custom-service-endpoints.html.md deleted file mode 100644 index c80013716258..000000000000 --- a/website/docs/guides/custom-service-endpoints.html.md +++ /dev/null @@ -1,352 +0,0 @@ ---- -subcategory: "" -layout: "aws" -page_title: "Terraform AWS Provider Custom Service Endpoint Configuration" -description: |- - Configuring the Terraform AWS Provider to connect to custom AWS service endpoints and AWS compatible solutions. ---- - - - -# Custom Service Endpoint Configuration - -The Terraform AWS Provider configuration can be customized to connect to non-default AWS service endpoints and AWS compatible solutions. This may be useful for environments with specific compliance requirements, such as using [AWS FIPS 140-2 endpoints](https://aws.amazon.com/compliance/fips/), connecting to AWS Snowball, SC2S, or C2S environments, or local testing. - -This guide outlines how to get started with customizing endpoints, the available endpoint configurations, and offers example configurations for working with certain local development and testing solutions. - -~> **NOTE:** Support for connecting the Terraform AWS Provider with custom endpoints and AWS compatible solutions is offered as best effort. Individual Terraform resources may require compatibility updates to work in certain environments. Integration testing by HashiCorp during provider changes is exclusively done against default AWS endpoints at this time. - - - -- [Getting Started with Custom Endpoints](#getting-started-with-custom-endpoints) -- [Available Endpoint Customizations](#available-endpoint-customizations) -- [Connecting to Local AWS Compatible Solutions](#connecting-to-local-aws-compatible-solutions) - - [DynamoDB Local](#dynamodb-local) - - [LocalStack](#localstack) - - - -## Getting Started with Custom Endpoints - -To configure the Terraform AWS Provider to use customized endpoints, it can be done within `provider` declarations using the `endpoints` configuration block, e.g., - -```terraform -provider "aws" { - # ... potentially other provider configuration ... - - endpoints { - dynamodb = "http://localhost:4569" - s3 = "http://localhost:4572" - } -} -``` - -If multiple, different Terraform AWS Provider configurations are required, see the [Terraform documentation on multiple provider instances](https://www.terraform.io/docs/configuration/providers.html#alias-multiple-provider-instances) for additional information about the `alias` provider configuration and its usage. - -## Available Endpoint Customizations - -The Terraform AWS Provider allows the following endpoints to be customized. - -**Note:** The Provider allows some service endpoints to be customized despite not supporting those services. - -**Note:** For backward compatibility, some endpoints can be assigned using multiple service "keys" (_e.g._, `dms`, `databasemigration`, or `databasemigrationservice`). If you use more than one equivalent service key in your configuration, the provider will use the _first_ endpoint value set. For example, in the configuration below we have set the DMS service endpoints using both `dms` and `databasemigration`. The provider will set the endpoint to whichever appears first. Subsequent values are ignored. - -```terraform -provider "aws" { - endpoints { - dms = "http://this.value.will.be.used.com" - databasemigration = "http://this.value.will.be.ignored.com" - } -} -``` - - - - -
    -
      -
    • accessanalyzer
    • -
    • account
    • -
    • acm
    • -
    • acmpca
    • -
    • amp (or prometheus or prometheusservice)
    • -
    • amplify
    • -
    • apigateway
    • -
    • apigatewayv2
    • -
    • appautoscaling (or applicationautoscaling)
    • -
    • appconfig
    • -
    • appflow
    • -
    • appintegrations (or appintegrationsservice)
    • -
    • applicationinsights
    • -
    • appmesh
    • -
    • apprunner
    • -
    • appstream
    • -
    • appsync
    • -
    • athena
    • -
    • auditmanager
    • -
    • autoscaling
    • -
    • autoscalingplans
    • -
    • backup
    • -
    • batch
    • -
    • budgets
    • -
    • ce (or costexplorer)
    • -
    • chime
    • -
    • chimesdkmediapipelines
    • -
    • chimesdkvoice
    • -
    • cleanrooms
    • -
    • cloud9
    • -
    • cloudcontrol (or cloudcontrolapi)
    • -
    • cloudformation
    • -
    • cloudfront
    • -
    • cloudhsmv2 (or cloudhsm)
    • -
    • cloudsearch
    • -
    • cloudtrail
    • -
    • cloudwatch
    • -
    • codeartifact
    • -
    • codebuild
    • -
    • codecatalyst
    • -
    • codecommit
    • -
    • codegurureviewer
    • -
    • codepipeline
    • -
    • codestarconnections
    • -
    • codestarnotifications
    • -
    • cognitoidentity
    • -
    • cognitoidp (or cognitoidentityprovider)
    • -
    • comprehend
    • -
    • computeoptimizer
    • -
    • configservice (or config)
    • -
    • connect
    • -
    • controltower
    • -
    • cur (or costandusagereportservice)
    • -
    • dataexchange
    • -
    • datapipeline
    • -
    • datasync
    • -
    • dax
    • -
    • deploy (or codedeploy)
    • -
    • detective
    • -
    • devicefarm
    • -
    • directconnect
    • -
    • dlm
    • -
    • dms (or databasemigration or databasemigrationservice)
    • -
    • docdb
    • -
    • docdbelastic
    • -
    • ds (or directoryservice)
    • -
    • dynamodb
    • -
    • ec2
    • -
    • ecr
    • -
    • ecrpublic
    • -
    • ecs
    • -
    • efs
    • -
    • eks
    • -
    • elasticache
    • -
    • elasticbeanstalk (or beanstalk)
    • -
    • elasticsearch (or es or elasticsearchservice)
    • -
    • elastictranscoder
    • -
    • elb (or elasticloadbalancing)
    • -
    • elbv2 (or elasticloadbalancingv2)
    • -
    • emr
    • -
    • emrcontainers
    • -
    • emrserverless
    • -
    • events (or eventbridge or cloudwatchevents)
    • -
    • evidently (or cloudwatchevidently)
    • -
    • finspace
    • -
    • firehose
    • -
    • fis
    • -
    • fms
    • -
    • fsx
    • -
    • gamelift
    • -
    • glacier
    • -
    • globalaccelerator
    • -
    • glue
    • -
    • grafana (or managedgrafana or amg)
    • -
    • greengrass
    • -
    • guardduty
    • -
    • healthlake
    • -
    • iam
    • -
    • identitystore
    • -
    • imagebuilder
    • -
    • inspector
    • -
    • inspector2 (or inspectorv2)
    • -
    • internetmonitor
    • -
    • iot
    • -
    • iotanalytics
    • -
    • iotevents
    • -
    • ivs
    • -
    • ivschat
    • -
    • kafka (or msk)
    • -
    • kafkaconnect
    • -
    • kendra
    • -
    • keyspaces
    • -
    • kinesis
    • -
    • kinesisanalytics
    • -
    • kinesisanalyticsv2
    • -
    • kinesisvideo
    • -
    • kms
    • -
    • lakeformation
    • -
    • lambda
    • -
    • lexmodels (or lexmodelbuilding or lexmodelbuildingservice or lex)
    • -
    • lexv2models (or lexmodelsv2)
    • -
    • licensemanager
    • -
    • lightsail
    • -
    • location (or locationservice)
    • -
    • logs (or cloudwatchlog or cloudwatchlogs)
    • -
    • macie2
    • -
    • mediaconnect
    • -
    • mediaconvert
    • -
    • medialive
    • -
    • mediapackage
    • -
    • mediastore
    • -
    • memorydb
    • -
    • mq
    • -
    • mwaa
    • -
    • neptune
    • -
    • networkfirewall
    • -
    • networkmanager
    • -
    • oam (or cloudwatchobservabilityaccessmanager)
    • -
    • opensearch (or opensearchservice)
    • -
    • opensearchserverless
    • -
    • opsworks
    • -
    • organizations
    • -
    • outposts
    • -
    • pinpoint
    • -
    • pipes
    • -
    • pricing
    • -
    • qldb
    • -
    • quicksight
    • -
    • ram
    • -
    • rbin (or recyclebin)
    • -
    • rds
    • -
    • redshift
    • -
    • redshiftdata (or redshiftdataapiservice)
    • -
    • redshiftserverless
    • -
    • resourceexplorer2
    • -
    • resourcegroups
    • -
    • resourcegroupstaggingapi (or resourcegroupstagging)
    • -
    • rolesanywhere
    • -
    • route53
    • -
    • route53domains
    • -
    • route53recoverycontrolconfig
    • -
    • route53recoveryreadiness
    • -
    • route53resolver
    • -
    • rum (or cloudwatchrum)
    • -
    • s3 (or s3api)
    • -
    • s3control
    • -
    • s3outposts
    • -
    • sagemaker
    • -
    • scheduler
    • -
    • schemas
    • -
    • secretsmanager
    • -
    • securityhub
    • -
    • securitylake
    • -
    • serverlessrepo (or serverlessapprepo or serverlessapplicationrepository)
    • -
    • servicecatalog
    • -
    • servicediscovery
    • -
    • servicequotas
    • -
    • ses
    • -
    • sesv2
    • -
    • sfn (or stepfunctions)
    • -
    • shield
    • -
    • signer
    • -
    • simpledb (or sdb)
    • -
    • sns
    • -
    • sqs
    • -
    • ssm
    • -
    • ssmcontacts
    • -
    • ssmincidents
    • -
    • ssoadmin
    • -
    • storagegateway
    • -
    • sts
    • -
    • swf
    • -
    • synthetics
    • -
    • timestreamwrite
    • -
    • transcribe (or transcribeservice)
    • -
    • transfer
    • -
    • verifiedpermissions
    • -
    • vpclattice
    • -
    • waf
    • -
    • wafregional
    • -
    • wafv2
    • -
    • worklink
    • -
    • workspaces
    • -
    • xray
    • -
    -
    - - -As a convenience, for compatibility with the [Terraform S3 Backend](https://www.terraform.io/language/settings/backends/s3), -the following service endpoints can be configured using environment variables: - -* DynamoDB: `TF_AWS_DYNAMODB_ENDPOINT` (or **Deprecated** `AWS_DYNAMODB_ENDPOINT`) -* IAM: `TF_AWS_IAM_ENDPOINT` (or **Deprecated** `AWS_IAM_ENDPOINT`) -* S3: `TF_AWS_S3_ENDPOINT` (or **Deprecated** `AWS_S3_ENDPOINT`) -* STS: `TF_AWS_STS_ENDPOINT` (or **Deprecated** `AWS_STS_ENDPOINT`) - -## Connecting to Local AWS Compatible Solutions - -~> **NOTE:** This information is not intended to be exhaustive for all local AWS compatible solutions or necessarily authoritative configurations for those documented. Check the documentation for each of these solutions for the most up to date information. - -### DynamoDB Local - -The Amazon DynamoDB service offers a downloadable version for writing and testing applications without accessing the DynamoDB web service. For more information about this solution, see the [DynamoDB Local documentation in the Amazon DynamoDB Developer Guide](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html). - -An example provider configuration: - -```terraform -provider "aws" { - access_key = "mock_access_key" - region = "us-east-1" - secret_key = "mock_secret_key" - skip_credentials_validation = true - skip_metadata_api_check = true - skip_requesting_account_id = true - - endpoints { - dynamodb = "http://localhost:8000" - } -} -``` - -### LocalStack - -[LocalStack](https://localstack.cloud/) provides an easy-to-use test/mocking framework for developing Cloud applications. - -An example provider configuration: - -```terraform -provider "aws" { - access_key = "mock_access_key" - region = "us-east-1" - s3_use_path_style = true - secret_key = "mock_secret_key" - skip_credentials_validation = true - skip_metadata_api_check = true - skip_requesting_account_id = true - - endpoints { - apigateway = "http://localhost:4566" - cloudformation = "http://localhost:4566" - cloudwatch = "http://localhost:4566" - dynamodb = "http://localhost:4566" - es = "http://localhost:4566" - firehose = "http://localhost:4566" - iam = "http://localhost:4566" - kinesis = "http://localhost:4566" - lambda = "http://localhost:4566" - route53 = "http://localhost:4566" - redshift = "http://localhost:4566" - s3 = "http://localhost:4566" - secretsmanager = "http://localhost:4566" - ses = "http://localhost:4566" - sns = "http://localhost:4566" - sqs = "http://localhost:4566" - ssm = "http://localhost:4566" - stepfunctions = "http://localhost:4566" - sts = "http://localhost:4566" - } -} -``` diff --git a/website/docs/guides/version-4-upgrade.html.markdown b/website/docs/guides/version-4-upgrade.html.markdown index 4dc0cacbced4..25537992645e 100644 --- a/website/docs/guides/version-4-upgrade.html.markdown +++ b/website/docs/guides/version-4-upgrade.html.markdown @@ -2956,7 +2956,7 @@ such that they no longer return an error if zero results are found. * [aws_ec2_local_gateways](/docs/providers/aws/d/ec2_local_gateways.html) * [aws_ec2_transit_gateway_route_tables](/docs/providers/aws/d/ec2_transit_gateway_route_tables.html) * [aws_efs_access_points](/docs/providers/aws/d/efs_access_points.html) -* [aws_emr_release_labels](/docs/providers/aws/d/emr_release_labels.markdown) +* [aws_emr_release_labels](/docs/providers/aws/d/emr_release_labels.html) * [aws_inspector_rules_packages](/docs/providers/aws/d/inspector_rules_packages.html) * [aws_ip_ranges](/docs/providers/aws/d/ip_ranges.html) * [aws_network_acls](/docs/providers/aws/d/network_acls.html)