lighthouse

package
v3.43.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assignment

type Assignment struct {
	pulumi.CustomResourceState

	// A Fully qualified path of the lighthouse definition, such as `/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2`. Changing this forces a new resource to be created.
	LighthouseDefinitionId pulumi.StringOutput `pulumi:"lighthouseDefinitionId"`
	// A unique UUID/GUID which identifies this lighthouse assignment- one will be generated if not specified. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The scope at which the Lighthouse Assignment applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333` or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`. Changing this forces a new resource to be created.
	Scope pulumi.StringOutput `pulumi:"scope"`
}

Manages a [Lighthouse](https://docs.microsoft.com/en-us/azure/lighthouse) Assignment to a subscription, or to a resource group.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/lighthouse"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := lighthouse.NewAssignment(ctx, "example", &lighthouse.AssignmentArgs{
			LighthouseDefinitionId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/00000000-0000-0000-0000-000000000000"),
			Scope:                  pulumi.String("/subscription/00000000-0000-0000-0000-000000000000"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Lighthouse Assignments can be imported using the `resource id`, e.g.

```sh

$ pulumi import azure:lighthouse/assignment:Assignment example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationAssignments/00000000-0000-0000-0000-000000000000

```

func GetAssignment

func GetAssignment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AssignmentState, opts ...pulumi.ResourceOption) (*Assignment, error)

GetAssignment gets an existing Assignment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAssignment

func NewAssignment(ctx *pulumi.Context,
	name string, args *AssignmentArgs, opts ...pulumi.ResourceOption) (*Assignment, error)

NewAssignment registers a new resource with the given unique name, arguments, and options.

func (Assignment) ElementType added in v3.31.1

func (Assignment) ElementType() reflect.Type

func (Assignment) ToAssignmentOutput added in v3.31.1

func (i Assignment) ToAssignmentOutput() AssignmentOutput

func (Assignment) ToAssignmentOutputWithContext added in v3.31.1

func (i Assignment) ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput

type AssignmentArgs

type AssignmentArgs struct {
	// A Fully qualified path of the lighthouse definition, such as `/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2`. Changing this forces a new resource to be created.
	LighthouseDefinitionId pulumi.StringInput
	// A unique UUID/GUID which identifies this lighthouse assignment- one will be generated if not specified. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The scope at which the Lighthouse Assignment applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333` or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`. Changing this forces a new resource to be created.
	Scope pulumi.StringInput
}

The set of arguments for constructing a Assignment resource.

func (AssignmentArgs) ElementType

func (AssignmentArgs) ElementType() reflect.Type

type AssignmentInput added in v3.31.1

type AssignmentInput interface {
	pulumi.Input

	ToAssignmentOutput() AssignmentOutput
	ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput
}

type AssignmentOutput added in v3.31.1

type AssignmentOutput struct {
	*pulumi.OutputState
}

func (AssignmentOutput) ElementType added in v3.31.1

func (AssignmentOutput) ElementType() reflect.Type

func (AssignmentOutput) ToAssignmentOutput added in v3.31.1

func (o AssignmentOutput) ToAssignmentOutput() AssignmentOutput

func (AssignmentOutput) ToAssignmentOutputWithContext added in v3.31.1

func (o AssignmentOutput) ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput

type AssignmentState

type AssignmentState struct {
	// A Fully qualified path of the lighthouse definition, such as `/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2`. Changing this forces a new resource to be created.
	LighthouseDefinitionId pulumi.StringPtrInput
	// A unique UUID/GUID which identifies this lighthouse assignment- one will be generated if not specified. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The scope at which the Lighthouse Assignment applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333` or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`. Changing this forces a new resource to be created.
	Scope pulumi.StringPtrInput
}

func (AssignmentState) ElementType

func (AssignmentState) ElementType() reflect.Type

type Definition

type Definition struct {
	pulumi.CustomResourceState

	// An authorization block as defined below.
	Authorizations DefinitionAuthorizationArrayOutput `pulumi:"authorizations"`
	// A description of the Lighthouse Definition.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// A unique UUID/GUID which identifies this lighthouse definition - one will be generated if not specified. Changing this forces a new resource to be created.
	LighthouseDefinitionId pulumi.StringOutput `pulumi:"lighthouseDefinitionId"`
	// The ID of the managing tenant.
	ManagingTenantId pulumi.StringOutput `pulumi:"managingTenantId"`
	// The name of the Lighthouse Definition.
	Name  pulumi.StringOutput `pulumi:"name"`
	Scope pulumi.StringOutput `pulumi:"scope"`
}

Manages a [Lighthouse](https://docs.microsoft.com/en-us/azure/lighthouse) Definition.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/lighthouse"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "b24988ac-6180-42a0-ab88-20f7382dd24c"
		contributor, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{
			RoleDefinitionId: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		_, err = lighthouse.NewDefinition(ctx, "example", &lighthouse.DefinitionArgs{
			Description:      pulumi.String("This is a lighthouse definition created IaC"),
			ManagingTenantId: pulumi.String("00000000-0000-0000-0000-000000000000"),
			Authorizations: lighthouse.DefinitionAuthorizationArray{
				&lighthouse.DefinitionAuthorizationArgs{
					PrincipalId:      pulumi.String("00000000-0000-0000-0000-000000000000"),
					RoleDefinitionId: pulumi.String(contributor.RoleDefinitionId),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Lighthouse Definitions can be imported using the `resource id`, e.g.

```sh

$ pulumi import azure:lighthouse/definition:Definition example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/00000000-0000-0000-0000-000000000000

```

func GetDefinition

func GetDefinition(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *DefinitionState, opts ...pulumi.ResourceOption) (*Definition, error)

GetDefinition gets an existing Definition resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewDefinition

func NewDefinition(ctx *pulumi.Context,
	name string, args *DefinitionArgs, opts ...pulumi.ResourceOption) (*Definition, error)

NewDefinition registers a new resource with the given unique name, arguments, and options.

func (Definition) ElementType added in v3.31.1

func (Definition) ElementType() reflect.Type

func (Definition) ToDefinitionOutput added in v3.31.1

func (i Definition) ToDefinitionOutput() DefinitionOutput

func (Definition) ToDefinitionOutputWithContext added in v3.31.1

func (i Definition) ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput

type DefinitionArgs

type DefinitionArgs struct {
	// An authorization block as defined below.
	Authorizations DefinitionAuthorizationArrayInput
	// A description of the Lighthouse Definition.
	Description pulumi.StringPtrInput
	// A unique UUID/GUID which identifies this lighthouse definition - one will be generated if not specified. Changing this forces a new resource to be created.
	LighthouseDefinitionId pulumi.StringPtrInput
	// The ID of the managing tenant.
	ManagingTenantId pulumi.StringInput
	// The name of the Lighthouse Definition.
	Name  pulumi.StringPtrInput
	Scope pulumi.StringInput
}

The set of arguments for constructing a Definition resource.

func (DefinitionArgs) ElementType

func (DefinitionArgs) ElementType() reflect.Type

type DefinitionAuthorization

type DefinitionAuthorization struct {
	// Principal ID of the security group/service principal/user that would be assigned permissions to the projected subscription.
	PrincipalId string `pulumi:"principalId"`
	// The role definition identifier. This role will define the permissions that are granted to the principal. This cannot be an `Owner` role.
	RoleDefinitionId string `pulumi:"roleDefinitionId"`
}

type DefinitionAuthorizationArgs

type DefinitionAuthorizationArgs struct {
	// Principal ID of the security group/service principal/user that would be assigned permissions to the projected subscription.
	PrincipalId pulumi.StringInput `pulumi:"principalId"`
	// The role definition identifier. This role will define the permissions that are granted to the principal. This cannot be an `Owner` role.
	RoleDefinitionId pulumi.StringInput `pulumi:"roleDefinitionId"`
}

func (DefinitionAuthorizationArgs) ElementType

func (DefinitionAuthorizationArgs) ToDefinitionAuthorizationOutput

func (i DefinitionAuthorizationArgs) ToDefinitionAuthorizationOutput() DefinitionAuthorizationOutput

func (DefinitionAuthorizationArgs) ToDefinitionAuthorizationOutputWithContext

func (i DefinitionAuthorizationArgs) ToDefinitionAuthorizationOutputWithContext(ctx context.Context) DefinitionAuthorizationOutput

type DefinitionAuthorizationArray

type DefinitionAuthorizationArray []DefinitionAuthorizationInput

func (DefinitionAuthorizationArray) ElementType

func (DefinitionAuthorizationArray) ToDefinitionAuthorizationArrayOutput

func (i DefinitionAuthorizationArray) ToDefinitionAuthorizationArrayOutput() DefinitionAuthorizationArrayOutput

func (DefinitionAuthorizationArray) ToDefinitionAuthorizationArrayOutputWithContext

func (i DefinitionAuthorizationArray) ToDefinitionAuthorizationArrayOutputWithContext(ctx context.Context) DefinitionAuthorizationArrayOutput

type DefinitionAuthorizationArrayInput

type DefinitionAuthorizationArrayInput interface {
	pulumi.Input

	ToDefinitionAuthorizationArrayOutput() DefinitionAuthorizationArrayOutput
	ToDefinitionAuthorizationArrayOutputWithContext(context.Context) DefinitionAuthorizationArrayOutput
}

DefinitionAuthorizationArrayInput is an input type that accepts DefinitionAuthorizationArray and DefinitionAuthorizationArrayOutput values. You can construct a concrete instance of `DefinitionAuthorizationArrayInput` via:

DefinitionAuthorizationArray{ DefinitionAuthorizationArgs{...} }

type DefinitionAuthorizationArrayOutput

type DefinitionAuthorizationArrayOutput struct{ *pulumi.OutputState }

func (DefinitionAuthorizationArrayOutput) ElementType

func (DefinitionAuthorizationArrayOutput) Index

func (DefinitionAuthorizationArrayOutput) ToDefinitionAuthorizationArrayOutput

func (o DefinitionAuthorizationArrayOutput) ToDefinitionAuthorizationArrayOutput() DefinitionAuthorizationArrayOutput

func (DefinitionAuthorizationArrayOutput) ToDefinitionAuthorizationArrayOutputWithContext

func (o DefinitionAuthorizationArrayOutput) ToDefinitionAuthorizationArrayOutputWithContext(ctx context.Context) DefinitionAuthorizationArrayOutput

type DefinitionAuthorizationInput

type DefinitionAuthorizationInput interface {
	pulumi.Input

	ToDefinitionAuthorizationOutput() DefinitionAuthorizationOutput
	ToDefinitionAuthorizationOutputWithContext(context.Context) DefinitionAuthorizationOutput
}

DefinitionAuthorizationInput is an input type that accepts DefinitionAuthorizationArgs and DefinitionAuthorizationOutput values. You can construct a concrete instance of `DefinitionAuthorizationInput` via:

DefinitionAuthorizationArgs{...}

type DefinitionAuthorizationOutput

type DefinitionAuthorizationOutput struct{ *pulumi.OutputState }

func (DefinitionAuthorizationOutput) ElementType

func (DefinitionAuthorizationOutput) PrincipalId

Principal ID of the security group/service principal/user that would be assigned permissions to the projected subscription.

func (DefinitionAuthorizationOutput) RoleDefinitionId

func (o DefinitionAuthorizationOutput) RoleDefinitionId() pulumi.StringOutput

The role definition identifier. This role will define the permissions that are granted to the principal. This cannot be an `Owner` role.

func (DefinitionAuthorizationOutput) ToDefinitionAuthorizationOutput

func (o DefinitionAuthorizationOutput) ToDefinitionAuthorizationOutput() DefinitionAuthorizationOutput

func (DefinitionAuthorizationOutput) ToDefinitionAuthorizationOutputWithContext

func (o DefinitionAuthorizationOutput) ToDefinitionAuthorizationOutputWithContext(ctx context.Context) DefinitionAuthorizationOutput

type DefinitionInput added in v3.31.1

type DefinitionInput interface {
	pulumi.Input

	ToDefinitionOutput() DefinitionOutput
	ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput
}

type DefinitionOutput added in v3.31.1

type DefinitionOutput struct {
	*pulumi.OutputState
}

func (DefinitionOutput) ElementType added in v3.31.1

func (DefinitionOutput) ElementType() reflect.Type

func (DefinitionOutput) ToDefinitionOutput added in v3.31.1

func (o DefinitionOutput) ToDefinitionOutput() DefinitionOutput

func (DefinitionOutput) ToDefinitionOutputWithContext added in v3.31.1

func (o DefinitionOutput) ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput

type DefinitionState

type DefinitionState struct {
	// An authorization block as defined below.
	Authorizations DefinitionAuthorizationArrayInput
	// A description of the Lighthouse Definition.
	Description pulumi.StringPtrInput
	// A unique UUID/GUID which identifies this lighthouse definition - one will be generated if not specified. Changing this forces a new resource to be created.
	LighthouseDefinitionId pulumi.StringPtrInput
	// The ID of the managing tenant.
	ManagingTenantId pulumi.StringPtrInput
	// The name of the Lighthouse Definition.
	Name  pulumi.StringPtrInput
	Scope pulumi.StringPtrInput
}

func (DefinitionState) ElementType

func (DefinitionState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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