Skip to content
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

echoprovider: Add a new test-only v6 provider that echoes ephemeral provider data #389

Merged
merged 21 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/FEATURES-20241111-165312.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: FEATURES
body: 'echoprovider: Introduced new `echoprovider` package, which contains a v6 Terraform
provider that can be used to test ephemeral resource data.'
time: 2024-11-11T16:53:12.399802-05:00
custom:
Issue: "389"
6 changes: 6 additions & 0 deletions .changes/unreleased/NOTES-20241111-165206.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: NOTES
body: 'echoprovider: The `echoprovider` package is considered experimental and may
be altered or removed in a subsequent release'
time: 2024-11-11T16:52:06.287978-05:00
custom:
Issue: "389"
2 changes: 1 addition & 1 deletion .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- run: go mod download
- run: go test -coverprofile=coverage.out ./...
- run: go test -v -coverprofile=coverage.out ./...
env:
TF_ACC: "1"
- name: Remove wildcard suffix from TF version
Expand Down
20 changes: 20 additions & 0 deletions echoprovider/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

// Package echoprovider contains a protocol v6 Terraform provider that can be used to transfer data from
// provider configuration to state via a managed resource. This is only meant for provider acceptance testing
// of data that cannot be stored in Terraform artifacts (plan/state), such as an ephemeral resource.
//
// Example Usage:
//
// // Ephemeral resource that is under test
// ephemeral "examplecloud_thing" "this" {
// name = "thing-one"
// }
//
// provider "echo" {
// data = ephemeral.examplecloud_thing.this
// }
//
// resource "echo" "test" {} // The `echo.test.data` attribute will contain the ephemeral data from `ephemeral.examplecloud_thing.this`
package echoprovider
Loading
Loading