-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provider multiplexing - Phase 1 #25715
Provider multiplexing - Phase 1 #25715
Conversation
…raform Protocol v5 provider's.
…ramework-phase1' into f-protov5-mux-terraform-plugin-framework-phase1
% make semall providerlint golangci-lint
==> Running Semgrep checks locally (must have semgrep installed)...
Scanning 4065 files with 37 go rules.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|4065/4065 tasks
Some files were skipped or only partially analyzed.
Scan was limited to files tracked by git.
Scan skipped: 1613 files matching .semgrepignore patterns
For a full list of skipped files, run semgrep with the --verbose flag.
Ran 37 rules on 4065 files: 0 findings.
If Semgrep missed a finding, please send us feedback to let us know!
$ semgrep shouldafound --help
Scanning 4065 files with 24 go rules.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|4065/4065 tasks
Some files were skipped or only partially analyzed.
Scan was limited to files tracked by git.
Scan skipped: 1613 files matching .semgrepignore patterns
For a full list of skipped files, run semgrep with the --verbose flag.
Ran 24 rules on 4065 files: 0 findings.
If Semgrep missed a finding, please send us feedback to let us know!
$ semgrep shouldafound --help
Scanning 1543 files with 4 go rules.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|1543/1543 tasks
Some files were skipped or only partially analyzed.
Scan was limited to files tracked by git.
Scan skipped: 1613 files matching .semgrepignore patterns
For a full list of skipped files, run semgrep with the --verbose flag.
Ran 4 rules on 1543 files: 0 findings.
If Semgrep missed a finding, please send us feedback to let us know!
$ semgrep shouldafound --help
Scanning 924 files with 201 go rules.
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|924/924 tasks
Some files were skipped or only partially analyzed.
Scan was limited to files tracked by git.
Scan skipped: 1613 files matching .semgrepignore patterns
For a full list of skipped files, run semgrep with the --verbose flag.
Ran 201 rules on 924 files: 0 findings.
If Semgrep missed a finding, please send us feedback to let us know!
$ semgrep shouldafound --help
Scanning 1072 files with 200 go rules.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|1072/1072 tasks
Some files were skipped or only partially analyzed.
Scan was limited to files tracked by git.
Scan skipped: 1613 files matching .semgrepignore patterns
For a full list of skipped files, run semgrep with the --verbose flag.
Ran 201 rules on 1072 files: 0 findings.
If Semgrep missed a finding, please send us feedback to let us know!
$ semgrep shouldafound --help
Scanning 838 files with 197 go rules.
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|838/838 tasks
Some files were skipped or only partially analyzed.
Scan was limited to files tracked by git.
Scan skipped: 1613 files matching .semgrepignore patterns
For a full list of skipped files, run semgrep with the --verbose flag.
Ran 201 rules on 838 files: 0 findings.
If Semgrep missed a finding, please send us feedback to let us know!
$ semgrep shouldafound --help
Scanning 1115 files with 201 go rules.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|1115/1115 tasks
Some files were skipped or only partially analyzed.
Scan was limited to files tracked by git.
Scan skipped: 1613 files matching .semgrepignore patterns
For a full list of skipped files, run semgrep with the --verbose flag.
Ran 201 rules on 1115 files: 0 findings.
If Semgrep missed a finding, please send us feedback to let us know!
$ semgrep shouldafound --help
==> Checking source code with providerlint...
==> Checking source code with golangci-lint... |
Acceptance test output: % make testacc TESTARGS='-run=TestAccVPC_basic' PKG=ec2 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run=TestAccVPC_basic -timeout 180m === RUN TestAccVPC_basic === PAUSE TestAccVPC_basic === CONT TestAccVPC_basic --- PASS: TestAccVPC_basic (25.00s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 31.950s
This functionality has been released in v4.23.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Relates #23948.
Relates #25606.
Introduces a minimal second step for combining (using
terraform-plugin-mux
) into a single binary the current resource and data sources implemented using Terraform Plugin SDK v2 with other future implementations (such as using Terraform Plugin Framework).This PR
internal/provider/fwprovider
) a minimal provider implementation that uses the Terraform Plugin Framework and multiplexes it with the current Terraform Plugin SDK v2-based provider's server. This new skeleton providerDefault
values from the Terraform Plugin SDK v2-based provider's schema declaration as the Terraform Framework-based provider does not have that facility. All butmax_retries
were declaring superfluous zero value defaults. Themax_retries
default value of 25 is now handled in the provider'sConfigureFunc
Primary Provider
Now that more than 1 provider is being multiplexed into a single provider server I have introduced the idea of the primary provider. The (single) primary provider in the mux set is the provider which parses the practitioner-provided provider configuration block (
provider "aws" { ... }
) and holds the provider instance state (currentlyconns.AWSClient
). The other, secondary, members of the mux set can use the provider instance state through a reference to the primary provider (via a suitable interface), injected on construction. The secondary providers need do nothing in their ownConfigure
methods.