Skip to content

Commit

Permalink
Add ephemeral resource support (GoogleCloudPlatform#11843)
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahFrench authored and BBBmau committed Oct 23, 2024
1 parent 9a44f96 commit 26eb8ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/ephemeral"
"github.com/hashicorp/terraform-plugin-framework/function"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/provider"
Expand All @@ -31,6 +32,7 @@ var (
_ provider.Provider = &FrameworkProvider{}
_ provider.ProviderWithMetaSchema = &FrameworkProvider{}
_ provider.ProviderWithFunctions = &FrameworkProvider{}
_ provider.ProviderWithEphemeralResources = &FrameworkProvider{}
)

// New is a helper function to simplify provider server and testing implementation.
Expand Down Expand Up @@ -301,3 +303,10 @@ func (p *FrameworkProvider) Functions(_ context.Context) []func() function.Funct
functions.NewZoneFromIdFunction,
}
}

// EphemeralResources defines the resources that are of ephemeral type implemented in the provider.
func (p *FrameworkProvider) EphemeralResources(_ context.Context) []func() ephemeral.EphemeralResource {
return []func() ephemeral.EphemeralResource{
// TODO!
}
}
2 changes: 1 addition & 1 deletion mmv1/third_party/terraform/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/terraform-json v0.22.1
github.com/hashicorp/terraform-plugin-framework v1.7.0
github.com/hashicorp/terraform-plugin-framework v1.11.1-0.20240813185813-fe2b7dbbdad8
github.com/hashicorp/terraform-plugin-framework-validators v0.9.0
github.com/hashicorp/terraform-plugin-go v0.23.0
github.com/hashicorp/terraform-plugin-log v0.9.0
Expand Down

0 comments on commit 26eb8ed

Please sign in to comment.