func NewExtension(ctx *pulumi.Context,
	name string, args *ExtensionArgs, opts ...pulumi.ResourceOption) (*Extension, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}

	if args.Publisher == nil {
		return nil, errors.New("invalid value for required argument 'Publisher'")
	}
	if args.Type == nil {
		return nil, errors.New("invalid value for required argument 'Type'")
	}
	if args.TypeHandlerVersion == nil {
		return nil, errors.New("invalid value for required argument 'TypeHandlerVersion'")
	}
	if args.VirtualMachineId == nil {
		return nil, errors.New("invalid value for required argument 'VirtualMachineId'")
	}
	var resource Extension
	err := ctx.RegisterResource("azure:compute/extension:Extension", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
// NewExtension registers a new resource with the given unique name, arguments, and options.
NewExtension registers a new resource with the given unique name, arguments, and options.
// NewExtension registers a new resource with the given unique name arguments and options .
func NewExtension(ctx *pulumi.Context,
	name string, args *ExtensionArgs, opts ...pulumi.ResourceOption) (*Extension, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}
	if args.Publisher == nil {
		return nil, errors.New("invalid value for required argument 'Publisher'")
	}
	if args.Type == nil {
		return nil, errors.New("invalid value for required argument 'Type'")
	}
	if args.TypeHandlerVersion == nil {
		return nil, errors.New("invalid value for required argument 'TypeHandlerVersion'")
	}
	if args.VirtualMachineId == nil {
		return nil, errors.New("invalid value for required argument 'VirtualMachineId'")
	}
	var resource Extension
	err := ctx.RegisterResource("azure:compute/extension:Extension", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
func NewExtension ( ctx * pulumi . Context , name string , args * ExtensionArgs , opts ... pulumi . ResourceOption ) ( * Extension , error ) { if args == nil { return nil , errors . New ( " " ) } if args . Publisher == nil { return nil , errors . New ( " " ) } if args . Type == nil { return nil , errors . New ( " " ) } if args . TypeHandlerVersion == nil { return nil , errors . New ( " " ) } if args . VirtualMachineId == nil { return nil , errors . New ( " " ) } var resource Extension err := ctx . RegisterResource ( " " , name , args , & resource , opts ... ) if err != nil { return nil , err } return & resource , nil }
NewExtension registers a new resource with the given unique name, arguments, and options.
NewExtension registers a new resource with the given unique name arguments and options .