azure

package
v0.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner)

NewCommand creates a new cobra command for registering an Azure cloud provider credential for a Radius installation, which requires a service principal with the Contributor or Owner role assigned to the provided resource group.

Types

type Runner

type Runner struct {
	ConfigHolder      *framework.ConfigHolder
	ConnectionFactory connections.Factory
	Output            output.Interface
	Format            string
	Workspace         *workspaces.Workspace

	ClientID     string
	ClientSecret string
	TenantID     string
	KubeContext  string
}

Runner is the runner implementation for the `rad credential register azure` command.

func NewRunner

func NewRunner(factory framework.Factory) *Runner

NewRunner creates a new instance of the `rad credential register azure` runner.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) error

Run registers a credential for the Azure cloud provider in the Radius installation, updates the server-side to add/change credentials. It returns an error if any of the steps fail.

func (*Runner) Validate

func (r *Runner) Validate(cmd *cobra.Command, args []string) error

Validate checks for the presence of a workspace, output format, client ID, client secret and tenant ID, and sets them in the Runner struct if they are present. If any of these are not present, an error is returned.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL