-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduced new protocol v6 server and muxing server to old provider
- Loading branch information
1 parent
33e7960
commit a968af9
Showing
6 changed files
with
104 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package octopusdeploy | ||
|
||
import ( | ||
"context" | ||
"github.com/hashicorp/terraform-plugin-framework/datasource" | ||
"github.com/hashicorp/terraform-plugin-framework/provider/schema" | ||
"github.com/hashicorp/terraform-plugin-framework/resource" | ||
"github.com/hashicorp/terraform-plugin-framework/types" | ||
|
||
"github.com/hashicorp/terraform-plugin-framework/provider" | ||
) | ||
|
||
type octopusDeployProviderV6 struct { | ||
Address types.String `tfsdk:"address"` | ||
ApiKey types.String `tfsdk:"api_key"` | ||
SpaceID types.String `tfsdk:"space_id"` | ||
} | ||
|
||
var _ provider.Provider = (*octopusDeployProviderV6)(nil) | ||
var _ provider.ProviderWithMetaSchema = (*octopusDeployProviderV6)(nil) | ||
|
||
func NewOctopusDeployProviderV6() *octopusDeployProviderV6 { | ||
return &octopusDeployProviderV6{} | ||
} | ||
|
||
func (p *octopusDeployProviderV6) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse) { | ||
} | ||
|
||
func (p *octopusDeployProviderV6) MetaSchema(ctx context.Context, request provider.MetaSchemaRequest, response *provider.MetaSchemaResponse) { | ||
|
||
} | ||
|
||
func (p *octopusDeployProviderV6) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) { | ||
} | ||
|
||
func (p *octopusDeployProviderV6) DataSources(ctx context.Context) []func() datasource.DataSource { | ||
return []func() datasource.DataSource{} | ||
} | ||
|
||
func (p *octopusDeployProviderV6) Resources(ctx context.Context) []func() resource.Resource { | ||
return []func() resource.Resource{} | ||
} | ||
|
||
func (p *octopusDeployProviderV6) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse) { | ||
resp.Schema = schema.Schema{ | ||
Attributes: map[string]schema.Attribute{ | ||
"address": schema.StringAttribute{ | ||
Optional: false, | ||
Required: true, | ||
Description: "The endpoint of the Octopus REST API", | ||
}, | ||
"api_key": schema.StringAttribute{ | ||
Optional: false, | ||
Required: true, | ||
Description: "The API key to use with the Octopus REST API", | ||
}, | ||
"space_id": schema.StringAttribute{ | ||
Optional: true, | ||
Description: "The space ID to target", | ||
}, | ||
}, | ||
} | ||
} |