Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 9 additions & 0 deletions api/types/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ type Integration interface {

// GetAzureOIDCIntegrationSpec returns the `azure-oidc` spec fields.
GetAzureOIDCIntegrationSpec() *AzureOIDCIntegrationSpecV1
// SetAzureOIDCIntegrationSpec sets the `azure-oidc` spec fields.
SetAzureOIDCIntegrationSpec(*AzureOIDCIntegrationSpecV1)

// GetGitHubIntegrationSpec returns the GitHub spec.
GetGitHubIntegrationSpec() *GitHubIntegrationSpecV1
Expand Down Expand Up @@ -401,6 +403,13 @@ func (ig *IntegrationV1) GetAzureOIDCIntegrationSpec() *AzureOIDCIntegrationSpec
return ig.Spec.GetAzureOIDC()
}

// SetAzureOIDCIntegrationSpec sets the `azure-oidc` spec fields.
func (ig *IntegrationV1) SetAzureOIDCIntegrationSpec(spec *AzureOIDCIntegrationSpecV1) {
ig.Spec.SubKindSpec = &IntegrationSpecV1_AzureOIDC{
AzureOIDC: spec,
}
}

// GetGitHubIntegrationSpec returns the GitHub spec.
func (ig *IntegrationV1) GetGitHubIntegrationSpec() *GitHubIntegrationSpecV1 {
return ig.Spec.GetGitHub()
Expand Down
2 changes: 2 additions & 0 deletions tool/tctl/common/resource_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,8 @@ func (rc *ResourceCommand) createIntegration(ctx context.Context, client *authcl
existingIntegration.SetGitHubIntegrationSpec(integration.GetGitHubIntegrationSpec())
case types.IntegrationSubKindAWSRolesAnywhere:
existingIntegration.SetAWSRolesAnywhereIntegrationSpec(integration.GetAWSRolesAnywhereIntegrationSpec())
case types.IntegrationSubKindAzureOIDC:
existingIntegration.SetAzureOIDCIntegrationSpec(integration.GetAzureOIDCIntegrationSpec())
default:
return trace.BadParameter("subkind %q is not supported", integration.GetSubKind())
}
Expand Down
Loading