-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
initial ephemeral poc #11824
base: FEATURE-BRANCH-ephemeral-resource
Are you sure you want to change the base?
initial ephemeral poc #11824
Conversation
Making a note: the Go rewrite was just merged into the feature branch via the sync PR. This has caused some conflicts, and the .go.erb files are no longer valid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good start, thanks for opening this PR to show the POC!
I think our next steps should be to:
- Open a PR that adds support for ephemeral resources but includes none.
- Open a PR that pulls out the ephemeral_service_account_access_token work and completes it, along with acc tests, and does that in a way that's not blocked by the muxing fixes
- i.e. we'll get my muxing fixes merged, into the feature branch via a sync, and then rebase any open PRs we have
return | ||
} | ||
|
||
// Required for accessing project, region, zone and tokenSource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
// Required for accessing project, region, zone and tokenSource |
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Copyright (c) HashiCorp, Inc. | |
// SPDX-License-Identifier: MPL-2.0 | |
// Copyright (c) HashiCorp, Inc. | |
// SPDX-License-Identifier: MPL-2.0 |
// EphemeralResources defines the resources that are of ephemral type implemented in the provider. | ||
func (p *FrameworkProvider) EphemeralResources(_ context.Context) []func() ephemeral.EphemeralResource { | ||
return []func() ephemeral.EphemeralResource{ | ||
eph.GoogleEphemeralServiceAccountAccessToken, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you're aware of it, but making a note: these ephemeral resources should be moved into the same package as the original data sources they resemble.
@@ -517,6 +517,20 @@ func (p *FrameworkProviderConfig) SetupGrpcLogging() { | |||
) | |||
} | |||
|
|||
func (p *FrameworkProviderConfig) NewIamCredentialsClient(userAgent string) *iamcredentials.Service { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once my muxing fixes PR is merged the plugin-framework side of the provider will use the SDK-flavoured Config struct, which already has this method implemented and you can use directly in the code of this PR's work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the timelines of this project and getting the muxing fixes merged, I think we'll have to go ahead with this as a temporary fix to unblock ourselves 😬
initial work of supporting ephemeral resource
service_account_token
Has the base code for supporting ephemerals which is including in the provider config itslef. Still requires some work on supprting services such as
IAMCredentialsBasePath
which is crucial for supporting bothservice_account_token
andservice_account_jwt
Although this PR covers all of them we should only really focus on
service_account_token
.This PR can easily be closed and opened again to make the ephemeral development process much smoother.
Release Note Template for Downstream PRs (will be copied)