Skip to content

Commit

Permalink
Provider configurations > AWS OIDC.
Browse files Browse the repository at this point in the history
  • Loading branch information
DayS1eeper committed Jul 13, 2023
1 parent 9394b40 commit ac55fe2
Showing 1 changed file with 73 additions and 70 deletions.
143 changes: 73 additions & 70 deletions provider_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,31 @@ type ProviderConfigurationsList struct {

// ProviderConfiguration represents a Scalr provider configuration.
type ProviderConfiguration struct {
ID string `jsonapi:"primary,provider-configurations"`
Name string `jsonapi:"attr,name"`
ProviderName string `jsonapi:"attr,provider-name"`
ExportShellVariables bool `jsonapi:"attr,export-shell-variables"`
IsShared bool `jsonapi:"attr,is-shared"`
IsCustom bool `jsonapi:"attr,is-custom"`
AwsAccessKey string `jsonapi:"attr,aws-access-key"`
AwsSecretKey string `jsonapi:"attr,aws-secret-key"`
AwsAccountType string `jsonapi:"attr,aws-account-type"`
AwsCredentialsType string `jsonapi:"attr,aws-credentials-type"`
AwsTrustedEntityType string `jsonapi:"attr,aws-trusted-entity-type"`
AwsRoleArn string `jsonapi:"attr,aws-role-arn"`
AwsExternalId string `jsonapi:"attr,aws-external-id"`
AzurermClientId string `jsonapi:"attr,azurerm-client-id"`
AzurermClientSecret string `jsonapi:"attr,azurerm-client-secret"`
AzurermSubscriptionId string `jsonapi:"attr,azurerm-subscription-id"`
AzurermTenantId string `jsonapi:"attr,azurerm-tenant-id"`
GoogleAuthType string `jsonapi:"attr,google-auth-type"`
GoogleServiceAccountEmail string `jsonapi:"attr,google-service-account-email"`
GoogleWorkloadProviderName string `jsonapi:"attr,google-workload-provider-name"`
GoogleProject string `jsonapi:"attr,google-project"`
GoogleCredentials string `jsonapi:"attr,google-credentials"`
ScalrHostname string `jsonapi:"attr,scalr-hostname"`
ScalrToken string `jsonapi:"attr,scalr-token"`
ID string `jsonapi:"primary,provider-configurations"`
Name string `jsonapi:"attr,name"`
ProviderName string `jsonapi:"attr,provider-name"`
ExportShellVariables bool `jsonapi:"attr,export-shell-variables"`
IsShared bool `jsonapi:"attr,is-shared"`
IsCustom bool `jsonapi:"attr,is-custom"`
AwsAccessKey string `jsonapi:"attr,aws-access-key"`
AwsSecretKey string `jsonapi:"attr,aws-secret-key"`
AwsAccountType string `jsonapi:"attr,aws-account-type"`
AwsCredentialsType string `jsonapi:"attr,aws-credentials-type"`
AwsTrustedEntityType string `jsonapi:"attr,aws-trusted-entity-type"`
AwsRoleArn string `jsonapi:"attr,aws-role-arn"`
AwsExternalId string `jsonapi:"attr,aws-external-id"`
AwsWorkloadIdentityAudience string `jsonapi:"attr,aws-workload-identity-audience"`
AzurermClientId string `jsonapi:"attr,azurerm-client-id"`
AzurermClientSecret string `jsonapi:"attr,azurerm-client-secret"`
AzurermSubscriptionId string `jsonapi:"attr,azurerm-subscription-id"`
AzurermTenantId string `jsonapi:"attr,azurerm-tenant-id"`
GoogleAuthType string `jsonapi:"attr,google-auth-type"`
GoogleServiceAccountEmail string `jsonapi:"attr,google-service-account-email"`
GoogleWorkloadProviderName string `jsonapi:"attr,google-workload-provider-name"`
GoogleProject string `jsonapi:"attr,google-project"`
GoogleCredentials string `jsonapi:"attr,google-credentials"`
ScalrHostname string `jsonapi:"attr,scalr-hostname"`
ScalrToken string `jsonapi:"attr,scalr-token"`

Account *Account `jsonapi:"relation,account"`
Parameters []*ProviderConfigurationParameter `jsonapi:"relation,parameters"`
Expand Down Expand Up @@ -97,30 +98,31 @@ func (s *providerConfigurations) List(ctx context.Context, options ProviderConfi

// ProviderConfigurationCreateOptions represents the options for creating a new provider configuration.
type ProviderConfigurationCreateOptions struct {
ID string `jsonapi:"primary,provider-configurations"`
Name *string `jsonapi:"attr,name"`
ProviderName *string `jsonapi:"attr,provider-name"`
ExportShellVariables *bool `jsonapi:"attr,export-shell-variables,omitempty"`
IsShared *bool `jsonapi:"attr,is-shared,omitempty"`
IsCustom *bool `jsonapi:"attr,is-custom,omitempty"`
AwsAccessKey *string `jsonapi:"attr,aws-access-key,omitempty"`
AwsSecretKey *string `jsonapi:"attr,aws-secret-key,omitempty"`
AwsAccountType *string `jsonapi:"attr,aws-account-type"`
AwsCredentialsType *string `jsonapi:"attr,aws-credentials-type"`
AwsTrustedEntityType *string `jsonapi:"attr,aws-trusted-entity-type"`
AwsRoleArn *string `jsonapi:"attr,aws-role-arn"`
AwsExternalId *string `jsonapi:"attr,aws-external-id"`
AzurermClientId *string `jsonapi:"attr,azurerm-client-id,omitempty"`
AzurermClientSecret *string `jsonapi:"attr,azurerm-client-secret,omitempty"`
AzurermSubscriptionId *string `jsonapi:"attr,azurerm-subscription-id,omitempty"`
AzurermTenantId *string `jsonapi:"attr,azurerm-tenant-id,omitempty"`
GoogleAuthType *string `jsonapi:"attr,google-auth-type,omitempty"`
GoogleServiceAccountEmail *string `jsonapi:"attr,google-service-account-email,omitempty"`
GoogleWorkloadProviderName *string `jsonapi:"attr,google-workload-provider-name,omitempty"`
GoogleProject *string `jsonapi:"attr,google-project,omitempty"`
GoogleCredentials *string `jsonapi:"attr,google-credentials,omitempty"`
ScalrHostname *string `jsonapi:"attr,scalr-hostname,omitempty"`
ScalrToken *string `jsonapi:"attr,scalr-token,omitempty"`
ID string `jsonapi:"primary,provider-configurations"`
Name *string `jsonapi:"attr,name"`
ProviderName *string `jsonapi:"attr,provider-name"`
ExportShellVariables *bool `jsonapi:"attr,export-shell-variables,omitempty"`
IsShared *bool `jsonapi:"attr,is-shared,omitempty"`
IsCustom *bool `jsonapi:"attr,is-custom,omitempty"`
AwsAccessKey *string `jsonapi:"attr,aws-access-key,omitempty"`
AwsSecretKey *string `jsonapi:"attr,aws-secret-key,omitempty"`
AwsAccountType *string `jsonapi:"attr,aws-account-type"`
AwsCredentialsType *string `jsonapi:"attr,aws-credentials-type"`
AwsTrustedEntityType *string `jsonapi:"attr,aws-trusted-entity-type"`
AwsWorkloadIdentityAudience *string `jsonapi:"attr,aws-workload-identity-audience"`
AwsRoleArn *string `jsonapi:"attr,aws-role-arn"`
AwsExternalId *string `jsonapi:"attr,aws-external-id"`
AzurermClientId *string `jsonapi:"attr,azurerm-client-id,omitempty"`
AzurermClientSecret *string `jsonapi:"attr,azurerm-client-secret,omitempty"`
AzurermSubscriptionId *string `jsonapi:"attr,azurerm-subscription-id,omitempty"`
AzurermTenantId *string `jsonapi:"attr,azurerm-tenant-id,omitempty"`
GoogleAuthType *string `jsonapi:"attr,google-auth-type,omitempty"`
GoogleServiceAccountEmail *string `jsonapi:"attr,google-service-account-email,omitempty"`
GoogleWorkloadProviderName *string `jsonapi:"attr,google-workload-provider-name,omitempty"`
GoogleProject *string `jsonapi:"attr,google-project,omitempty"`
GoogleCredentials *string `jsonapi:"attr,google-credentials,omitempty"`
ScalrHostname *string `jsonapi:"attr,scalr-hostname,omitempty"`
ScalrToken *string `jsonapi:"attr,scalr-token,omitempty"`

Account *Account `jsonapi:"relation,account,omitempty"`
Environments []*Environment `jsonapi:"relation,environments,omitempty"`
Expand Down Expand Up @@ -173,28 +175,29 @@ func (s *providerConfigurations) Read(ctx context.Context, configurationID strin
type ProviderConfigurationUpdateOptions struct {
ID string `jsonapi:"primary,provider-configurations"`

Name *string `jsonapi:"attr,name"`
IsShared *bool `jsonapi:"attr,is-shared,omitempty"`
Environments []*Environment `jsonapi:"relation,environments"`
ExportShellVariables *bool `jsonapi:"attr,export-shell-variables"`
AwsAccessKey *string `jsonapi:"attr,aws-access-key"`
AwsSecretKey *string `jsonapi:"attr,aws-secret-key"`
AwsAccountType *string `jsonapi:"attr,aws-account-type"`
AwsCredentialsType *string `jsonapi:"attr,aws-credentials-type"`
AwsTrustedEntityType *string `jsonapi:"attr,aws-trusted-entity-type"`
AwsRoleArn *string `jsonapi:"attr,aws-role-arn"`
AwsExternalId *string `jsonapi:"attr,aws-external-id"`
AzurermClientId *string `jsonapi:"attr,azurerm-client-id"`
AzurermClientSecret *string `jsonapi:"attr,azurerm-client-secret"`
AzurermSubscriptionId *string `jsonapi:"attr,azurerm-subscription-id"`
AzurermTenantId *string `jsonapi:"attr,azurerm-tenant-id"`
GoogleAuthType *string `jsonapi:"attr,google-auth-type"`
GoogleServiceAccountEmail *string `jsonapi:"attr,google-service-account-email"`
GoogleWorkloadProviderName *string `jsonapi:"attr,google-workload-provider-name"`
GoogleProject *string `jsonapi:"attr,google-project"`
GoogleCredentials *string `jsonapi:"attr,google-credentials"`
ScalrHostname *string `jsonapi:"attr,scalr-hostname"`
ScalrToken *string `jsonapi:"attr,scalr-token"`
Name *string `jsonapi:"attr,name"`
IsShared *bool `jsonapi:"attr,is-shared,omitempty"`
Environments []*Environment `jsonapi:"relation,environments"`
ExportShellVariables *bool `jsonapi:"attr,export-shell-variables"`
AwsAccessKey *string `jsonapi:"attr,aws-access-key"`
AwsSecretKey *string `jsonapi:"attr,aws-secret-key"`
AwsAccountType *string `jsonapi:"attr,aws-account-type"`
AwsCredentialsType *string `jsonapi:"attr,aws-credentials-type"`
AwsTrustedEntityType *string `jsonapi:"attr,aws-trusted-entity-type"`
AwsRoleArn *string `jsonapi:"attr,aws-role-arn"`
AwsExternalId *string `jsonapi:"attr,aws-external-id"`
AwsWorkloadIdentityAudience *string `jsonapi:"attr,aws-workload-identity-audience"`
AzurermClientId *string `jsonapi:"attr,azurerm-client-id"`
AzurermClientSecret *string `jsonapi:"attr,azurerm-client-secret"`
AzurermSubscriptionId *string `jsonapi:"attr,azurerm-subscription-id"`
AzurermTenantId *string `jsonapi:"attr,azurerm-tenant-id"`
GoogleAuthType *string `jsonapi:"attr,google-auth-type"`
GoogleServiceAccountEmail *string `jsonapi:"attr,google-service-account-email"`
GoogleWorkloadProviderName *string `jsonapi:"attr,google-workload-provider-name"`
GoogleProject *string `jsonapi:"attr,google-project"`
GoogleCredentials *string `jsonapi:"attr,google-credentials"`
ScalrHostname *string `jsonapi:"attr,scalr-hostname"`
ScalrToken *string `jsonapi:"attr,scalr-token"`
}

// Update an existing provider configuration.
Expand Down

0 comments on commit ac55fe2

Please sign in to comment.