Assignment

Manages a Lighthouse Assignment to a subscription, or to a resource group.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Azure.Lighthouse.Assignment("example", new Azure.Lighthouse.AssignmentArgs
        {
            LighthouseDefinitionId = "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/00000000-0000-0000-0000-000000000000",
            Scope = "/subscription/00000000-0000-0000-0000-000000000000",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/lighthouse"
	"github.com/pulumi/pulumi/sdk/v3/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 pulumi
import pulumi_azure as azure

example = azure.lighthouse.Assignment("example",
    lighthouse_definition_id="/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/00000000-0000-0000-0000-000000000000",
    scope="/subscription/00000000-0000-0000-0000-000000000000")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.lighthouse.Assignment("example", {
    lighthouseDefinitionId: "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/00000000-0000-0000-0000-000000000000",
    scope: "/subscription/00000000-0000-0000-0000-000000000000",
});

Create a Assignment Resource

new Assignment(name: string, args: AssignmentArgs, opts?: CustomResourceOptions);
@overload
def Assignment(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               lighthouse_definition_id: Optional[str] = None,
               name: Optional[str] = None,
               scope: Optional[str] = None)
@overload
def Assignment(resource_name: str,
               args: AssignmentArgs,
               opts: Optional[ResourceOptions] = None)
func NewAssignment(ctx *Context, name string, args AssignmentArgs, opts ...ResourceOption) (*Assignment, error)
public Assignment(string name, AssignmentArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AssignmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AssignmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Assignment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Assignment resource accepts the following input properties:

LighthouseDefinitionId string
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.
Scope string
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.
Name string
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.
LighthouseDefinitionId string
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.
Scope string
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.
Name string
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.
lighthouseDefinitionId string
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.
scope string
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.
name string
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.
lighthouse_definition_id str
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.
scope str
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.
name str
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.

Outputs

All input properties are implicitly available as output properties. Additionally, the Assignment resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Assignment Resource

Get an existing Assignment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AssignmentState, opts?: CustomResourceOptions): Assignment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        lighthouse_definition_id: Optional[str] = None,
        name: Optional[str] = None,
        scope: Optional[str] = None) -> Assignment
func GetAssignment(ctx *Context, name string, id IDInput, state *AssignmentState, opts ...ResourceOption) (*Assignment, error)
public static Assignment Get(string name, Input<string> id, AssignmentState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

LighthouseDefinitionId string
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.
Name string
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.
Scope string
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.
LighthouseDefinitionId string
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.
Name string
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.
Scope string
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.
lighthouseDefinitionId string
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.
name string
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.
scope string
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.
lighthouse_definition_id str
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.
name str
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.
scope str
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.

Import

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

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

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.