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

Feat: add new OIDC credentials creation and assigment (gcp resource) #782

Merged
merged 6 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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: 4 additions & 2 deletions client/cloud_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ type GcpCredentialsCreatePayload struct {
}

type GcpCredentialsValuePayload struct {
ProjectId string `json:"projectId"`
ServiceAccountKey string `json:"serviceAccountKey"`
ProjectId string `json:"projectId,omitempty"`
Yossi-kerner marked this conversation as resolved.
Show resolved Hide resolved
ServiceAccountKey string `json:"serviceAccountKey,omitempty"`
CredentialConfigurationFileContent string `json:"credentialConfigurationFileContent,omitempty"`
}

func (c *GoogleCostCredentialsCreatePayload) SetOrganizationId(organizationId string) {
Expand All @@ -102,6 +103,7 @@ const (
AwsOidcCredentialsType AwsCredentialsType = "AWS_OIDC"
GoogleCostCredentialsType GcpCredentialsType = "GCP_CREDENTIALS"
GcpServiceAccountCredentialsType GcpCredentialsType = "GCP_SERVICE_ACCOUNT_FOR_DEPLOYMENT"
GcpOidcCredentialsType GcpCredentialsType = "GCP_OIDC"
AzureCostCredentialsType AzureCredentialsType = "AZURE_CREDENTIALS"
AzureServicePrincipalCredentialsType AzureCredentialsType = "AZURE_SERVICE_PRINCIPAL_FOR_DEPLOYMENT"
AzureOidcCredentialsType AzureCredentialsType = "AZURE_OIDC"
Expand Down
2 changes: 2 additions & 0 deletions env0/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const (
AZURE_COST_TYPE CloudType = "azure_cost"
AZURE_OIDC_TYPE CloudType = "azure_oidc"
GCP_TYPE CloudType = "gcp"
GCP_OIDC_TYPE CloudType = "gcp_oidc"
GCP_COST_TYPE CloudType = "google_cost"
)

Expand All @@ -34,6 +35,7 @@ var credentialsTypeToPrefixList map[CloudType][]string = map[CloudType][]string{
AZURE_OIDC_TYPE: {string(client.AzureOidcCredentialsType)},
GCP_TYPE: {string(client.GcpServiceAccountCredentialsType)},
GCP_COST_TYPE: {string(client.GoogleCostCredentialsType)},
GCP_OIDC_TYPE: {string(client.GcpOidcCredentialsType)},
}

func getCredentialsByName(name string, prefixList []string, meta interface{}) (client.Credentials, error) {
Expand Down
119 changes: 0 additions & 119 deletions env0/data_aws_oidc_credentials_test.go
Yossi-kerner marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

119 changes: 0 additions & 119 deletions env0/data_azure_oidc_credentials_test.go
Yossi-kerner marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

Loading
Loading